/v2/contacts/{id}

POST

Update an existing contact. On success, returns the updated contact entity.

The API responses shown below are static. If you want to try out the API please login, or register for an API key

API parameters

Required
NameInTypeDescriptionEnumFormat
X-Auth-Token header string Authentication token.
id path string Contact UUID.
Optional
NameInTypeDescriptionEnumFormat
first_name query string Contact first name.
last_name query string Contact last name.
email_address query string Email address.
your_reference query string User-generated reference code.
phone_number query string Phone number.
mobile_phone_number query string Mobile phone number.
login_id query string Currencycloud login ID.
status query string Contact status. enabled
disabled
locale query string Locale code ("en", "en-US", "fr-FR").
timezone query string Timezone ("Europe/London", "America/New_York").
date_of_birth query string Date of birth. ISO 8601 format YYYY-MM-DD. date
curl -X POST  --header "X-Auth-Token: XXXX-XXXXX-XXXX"  https://devapi.currencycloud.com/v2/contacts/{id}

Response

{
    "login_id": "[email protected]",
    "id": "a66ca63f-e668-47af-8bb9-74363240d781",
    "first_name": "Derik",
    "last_name": "Ford",
    "account_id": "72970a7c-7921-431c-b95f-3438724ba16f",
    "account_name": "Currency Cloud Dev Centre",
    "status": "enabled",
    "locale": "en",
    "timezone": "Europe\/London",
    "email_address": "[email protected]",
    "mobile_phone_number": null,
    "phone_number": null,
    "your_reference": null,
    "date_of_birth": null,
    "created_at": "2018-04-18T12:30:37+00:00",
    "updated_at": "2018-10-17T11:00:17+00:00"
}
Error Codes
HTTP Status Code Description Params
400 at_least_one_parameter At least one parameter should be present: first_name, last_name, email_address, phone_number, mobile_phone_number, login_id, locale, timezone, status
id_is_not_valid_uuid id should be in UUID format
first_name_is_too_short first_name can not be shorter than 1 character(s) { "minlength" => 1 }
first_name_is_too_long first_name can not be longer than 100 character(s) { "maxlength" => 100 }
last_name_is_too_short last_name can not be shorter than 1 character(s) { "minlength" => 1 }
last_name_is_too_long last_name can not be longer than 100 character(s) { "maxlength" => 100 }
email_address_is_too_short email_address can not be shorter than 1 character(s) { "minlength" => 1 }
email_address_is_too_long email_address can not be longer than 255 character(s) { "maxlength" => 255 }
email_address_is_in_invalid_format email_address is in invalid format
phone_number_is_too_short phone_number can not be shorter than 1 character(s) { "minlength" => 1 }
phone_number_is_too_long phone_number can not be longer than 100 character(s) { "maxlength" => 100 }
mobile_phone_number_is_too_short mobile_phone_number can not be shorter than 1 character(s) { "minlength" => 1 }
mobile_phone_number_is_too_long mobile_phone_number can not be longer than 100 character(s) { "maxlength" => 100 }
login_id_in_use login_id already in use: [email protected]
login_id_is_too_long login_id can not be longer than 50 character(s) { "maxlength" => 50 }
locale_is_too_short locale can not be shorter than 2 character(s) { "minlength" => 2 }
locale_is_too_long locale can not be longer than 5 character(s) { "maxlength" => 5 }
timezone_is_too_short timezone can not be shorter than 2 character(s) { "minlength" => 2 }
timezone_is_too_long timezone can not be longer than 5 character(s) { "maxlength" => 5 }
status_not_in_range status should be in range: enabled, not_enabled
date_of_birth_type_is_wrong date_of_birth should be of date type { "type" => "date" }
contact_not_found Contact was not found for this id
401 invalid_supplied_credentials Authentication failed with the supplied credentials
429 too_many_requests Too many requests have been made to the api. Please refer to the Developer Center for more information
500 internal_server_error Internal server error
503 service_unavailable Service is temporary unavailable
Was this page helpful?
Yes
No