Hi,
I’m unit testing my code that uses the https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs/ endpoint. It’s a simple method to subscribe a single profile to a subs list. I’m testing against my test account.
Here’s the json: {"data":{"type":"profile-subscription-bulk-create-job","attributes":{"profiles":{"data":[{"type":"profile","attributes":{"email":"MY_EMAIL_ADDRESS_HERE","subscriptions":{"email":{"marketing":{"consent":"SUBSCRIBED"}}}}}]},"custom_source":"profile-subscription-bulk-create-job call on site"},"relationships":{"list":{"data":{"type":"list","id":"TVBgA3"}}}}}
My code just fires off a curl call with plain vanilla PHP. I get an empty response, as expected, and it comes with a 202 response, as expected. The dox (https://developers.klaviyo.com/en/reference/subscribe_profiles) say this means it was successful.
However, when I look at the profile on the dashboard it hasn’t changed, and no confirmation email was sent. My profile still just says ‘never subscribed’.
Is this expected for a test account, or should I test against some of my profiles on my live account?
(PS: I get the same results for trying to unsubscribe a profile using the endpoint profile-subscription-bulk-delete-jobs).
Many thanks,
Gareth