Skip to main content
Problem Solver I
August 4, 2023
Solved

Klaviyo 'subscriptions' is not a valid field for the resource 'profile-subscription-bulk-create-job'.

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!

    This topic has been closed for replies.
    gleamdevAnswer
    Problem Solver I
    August 7, 2023

    Solved just needed to change the API verson

    5 replies

    gleamdevAuthor
    Problem Solver I
    August 7, 2023

    Klaviyo Support would you mind looking into this?

    gleamdevAuthorAnswer
    Problem Solver I
    August 7, 2023

    Solved just needed to change the API verson

    Brian Turcotte
    Klaviyo Alum
    August 7, 2023

    Hi @gleamdev!

    Glad this was resolved and thanks for sharing your solution with the Community!

     

    - Brian

    Contributor IV
    August 7, 2023

    @gleamdev where did you change that? my url is only /api without versions and i have that problem

    edit: resolved, i changed the revision.

    Contributor I
    November 19, 2023

    Hi @gleamdev @bproulx @Brian Turcotte 

     

    What should be the correct api revision for this? I tried almost all revisions available with year 2023. But still getting same error.

     

    Thanks,

    Gopi