I am testing the subscribe endpoint ‘profile-subscription-bulk-create-jobs’ with this body which was taken from the example request in the docs:
{
"data": {
"type": "profile-subscription-bulk-create-job",
"attributes": {
"list_id": "Y6nRLr",
"custom_source": "Marketing Event",
"subscriptions": [
{
"channels": {
"email": [
"MARKETING"
],
"sms": [
"MARKETING"
]
},
"email": "emily@example.com",
"phone_number": "+15005550006",
"profile_id": "01GDDKASAP8TKDDA2GRZDSVP4H"
}
]
}
}
}
But no matter what email, I am getting this error:
{
"errors": [
{
"id": "82a35350-16a7-4e32-ad2c-57784150742b",
"status": 400,
"code": "invalid",
"title": "Invalid input.",
"detail": "'subscriptions' is not a valid field for the resource 'profile-subscription-bulk-create-job'.",
"source": {
"pointer": "/data/attributes/subscriptions"
},
"meta": {}
}
]
}
I believe the above post request body is a recent change, because previously, I was using the body below, but it doesn’t pass sms consent:
{
"data": {
"type": "profile-subscription-bulk-create-job",
"attributes": {
"profiles": {
"data": [
{
"type": "profile",
"attributes": {
"email": "john@example.com"
}
}
]
}
},
"relationships": {
"list": {
"data": {
"type": "list",
"id": "some list"
}
}
}
}
}
If anyone can provide clarity on how to solve the issue that would be appreciated thanks!