Desk API customer creation doesn't work

Trying to create a customer using the Desk API. This command fails:

curl -X POST -i -H “Content-Type: application/json” -H “SENDBIRDDESKAPITOKEN: {my_token}” ‘https://desk-api-{my_app_id}.sendbird.com/platform/v1/customers?sendbirdId={some_user_sendbird_id}’

Error:
{“code”:“desk400100”,“detail”:“Missing parameters.”}

The API doc notes only one required parameter, called “sendbirdId”, which I clearly included in my request. What do I do now? Is there another parameter that should be added to the docs?

The POST request goes to:

POST https://desk-api-{application_id}.sendbird.com/platform/v1/customers 

And in the body you send your sendbirdId (not in the URL as: ?sendbirdId=):

{
    "sendbirdId": "Cindy"
}

Interesting. So this works:

curl -X POST -i -H “Content-Type: application/json” -H “SENDBIRDDESKAPITOKEN: {my_token}” ‘https://desk-api-{my_app_id}.sendbird.com/platform/v1/customers' --data '{"sendbirdId": "some_user_sendbird_id"}'

However, the docs for user creation also ask for parameters to be sent in the body exactly like the Desk API customer creation call. See the “request body example” for user creation here: https://sendbird.com/docs/chat/v3/platform-api/guides/user. However, if I do that in the same way as above, this command fails:

 curl -X POST -i -H “Content-Type: application/json” -H "Api-Token: {my_token}" 'https://api-{my_app_id}.sendbird.com/v3/users' --data '{"user_id": "some_user_id", "nickname": "info", "profile_url": "", "issue_access_token": true}' 

The above fails with {“message”:“Invalid value: “JSON body.”.”,“code”:400403,“error”:true}.

Why are the two APIs so different? Shouldn’t both have accepted a JSON body like you explained above?

Ok I dug into this and I think I’ve found the issue.

The API calls are fine, the problem is in the Content-Type request header, which I copied without checking from Desk’s API docs.

This will NOT work:
curl -X POST -i -H “Content-Type: application/json, charset=utf8” -H “SENDBIRDDESKAPITOKEN: {my_token}” ‘https://desk-api-{my_app_id}.sendbird.com/platform/v1/customers’ --data ‘{“sendbirdId”: “some_user_sendbird_id”}’

But, this will work:
curl -X POST -i -H “Content-Type: application/json; charset=utf8” -H “SENDBIRDDESKAPITOKEN: {my_token}” ‘https://desk-api-{my_app_id}.sendbird.com/platform/v1/customers’ --data ‘{“sendbirdId”: “some_user_sendbird_id”}’

The ONLY difference is that the first one has a comma after application/json, and the second one has a semi-colon. The first one is what I copied from here: https://sendbird.com/docs/desk/v1/platform-api/getting-started/prepare-to-use-api and Desk’s API throws when you use it. The same header is also noted on the Chat API documentation, but that one seems to work just fine in either case.