Skip to main content

POST /profiles/:recipient_id

A recipient should be uniquely identifiable using a string ID that will not change. For this reason, you should not use data such as an email address or phone number when assigning a recipient ID. This type of data may change over time.

More Examples

The following types of requests will not change the body of an existing Profile:

JSON
// Empty Profile Object
{
"profile": {}
}

The above will result with:

200
{
"status": "SUCCESS"
}

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

Method: POST

Path Parameters

recipient_idstringrequired
A unique identifier representing the recipient associated with the requested profile.

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"
}
Was this helpful?