Skip to main content

Hi, I am trying to subcsribve a customer to a list and i am getting an error-

 

Below is the payload

 

{

  "data": {

    "type": "subscription",

    "attributes": {

      "profiles": {

        "data": [

          {

            "type": "profile",

            "attributes": {

              "email": "jayesh789@gmail.com",

              "phone_number": "+97979799"

            }

          }

        ]

      }

    },

    "relationships": {

      "list": {

        "data": {

          "type": "list",

          "id": "Rt4K9n"

        }

      }

    }

  }

}

 

 

and i am geting below error via API 

{

    "errors": [

        {

            "id": "2b2c4d75-3341-41ab-84ac-e434821e5042",

            "status": 400,

            "code": "invalid",

            "title": "Invalid input.",

            "detail": "Invalid Company ID",

            "source": {

                "pointer": "/data"

            },

            "links": {},

            "meta": {}

        }

    ]

}

Hi there,

Can you confirm that you’re using the client-side Subscribe endpoint? And if so, can you share the entire URL that you are calling? That should include the company ID, which is likely where the issue is.


@jrdgdfg I echo Christian that my hunch is that whatever your passing for company_id to the URL eg https://a.klaviyo.com/client/subscriptions?company_id=ddddd is invalid.

Assuming that you are calling this method too

You have to enter the Public API key as specified here


Hi ​@whereisjad ​@ChristianPaget - Issue is resolved. Under company_id i was using API Key instead of Company Id.