Skip to main content
September 13, 2024
Solved

Any idea on why for some campaigns the attribute.message property is not present

Hi There,

Our usecase is to fetch all campaigns using 2023-06-15 https://developers.klaviyo.com/en/v2023-06-15/reference/api_overview

 

and then use the attribute.message to retrieve the message id and then fetch the messages for each campaigns using 2023-07-15 get campaign messages https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_message 

 

 

However, I am noticing a few requests failing with a 405  with following error message and traceid.

Endpoint (notice how it does not contain an id, as none was present in one of the campaigns)

https://a.klaviyo.com/api/campaign-messages/
{"errors":[{"id":"a8cd8e00-4966-4ea7-be7f-971838b53ad4","status":405,"code":"method_not_allowed","title":"Method \"GET\" not allowed.","detail":"Method \"GET\" not allowed.","source":{"pointer":"/data/"}}]}

 

Any ideas on why that could be the case?

This topic has been closed for replies.
Klaviyo Employee
September 13, 2024

Hi parthrewind,

 

If the “message” is empty, it could mean that the campaign does not or no longer has a message for some reason.

 

To get all messages for a campaign, try the Get Campaign Campaign Messages API

 

https://a.klaviyo.com/api/campaigns/{id}/campaign-messages/

 

Thanks,

Jason

1 reply

Klaviyo Employee
September 13, 2024

Hi parthrewind,

 

If the “message” is empty, it could mean that the campaign does not or no longer has a message for some reason.

 

To get all messages for a campaign, try the Get Campaign Campaign Messages API

 

https://a.klaviyo.com/api/campaigns/{id}/campaign-messages/

 

Thanks,

Jason