Replace a profile
When using PUT
, be sure to include all the key-value pairs required by the recipient's profile. Any key-value pairs that exist in the profile but fail to be included in the PUT
request will be removed from the profile. Remember, a PUT
update is a full replacement of the data. For partial updates, use the PATCH /profiles/{recipient_id} request.
More Examples
The following types of requests will clear out the properties of the Profile:
JSON
// Empty Profile Object
{
"profile": {}
}
The above will result with:
200
{
"status": "SUCCESS"
}
The Profile will now be:
JSON
{
"profile: {}
}
Example
Method: PUT
URL: https://api.courier.com/profiles/abcdefgh12345678
Body:
{
"profile": {
"email": "user@example.com",
"phone_number": "555-555-5555",
"name": "John Smith"
}
}