Skip to main content

Create a profile

Merge the supplied values with an existing profile or create a new profile if one doesn't already exist.

URL: https://api.courier.com/profiles/:user_id

Method: POST

Path Parameters

user_idstringrequired
A unique identifier representing the user associated with the requested profile. We do not advise using an email address or phone number for this value because those values may change over time.

Body Parameters

profileobject
+ Show Properties

Responses

status: 200 OK

statusstring

status: 400 Bad Request

messagestring
A message describing the error that occurred.
typestring
[invalid_request_error] The type of error that occurred.

Request Example

curl --request POST \
--url https://api.courier.com/profiles/0460766e-8463-4905-ae98-b72c7aef41d6 \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"profile": {
"email": "user@example.com",
"phone_number": "555-555-5555"
}
}
'

Responses Example

{
"status": "SUCCESS"
}
{
"message": "Error Message",
"type": "invalid_request_error"
}