Response codes

Operations related to contact databases

Event Type Mappings (GET)

ScenarioCodeResponse message
When database ID is accessible to user.200{ “eventType”: { “name”: “String”, “uri”: “String”, “code”: “String” }}
When database ID is not accessible to user.500Internal server error

Contact API (PATCH)

PATCH /databases/{databaseId}/contacts/{contactId}

ScenarioCode/levelMessage
Invalid value provided for {databaseId}404 not found – general errorsDatabase not found
Invalid value provided for {contactId}404 – general errorsNo contact found
Value provided for Email was not formatted correctly400 bad request – general errorsArgument was not a valid email
Local value provided for Email is on the system blocked list.500 internal server error – general errorsAn unexpected error occurred. If the problem continues, please contact your system administrator.
Field does not exist in the database.422 unprocessable entity – field errors{columnName}: {columnName} does not exist.
Invalid value for a Yes/No column was provided.422 – field errors{columnName}: {columnValue} is not a valid boolean; it must be Yes or No.
Invalid value for a date column was provided.422 – field errors{columnName}: {columnValue} is not in a valid date format; it must be formatted as yyyy-MM-dd.
Invalid value for a numeric column was provided.422 – field errors{columnName}: {columnValue} is not a valid number.
Invalid value for a country column was provided.422 – field errors{columnName}: {columnValue} is not a valid country name.
Invalid value for a single selection column was provided.422 – field errors{columnName}: {columnValue} is not one of the valid selections for this field.
Value provided for email was not a valid value.422 – field errors{columnName}: the given email is not valid.
Invalid value for a phone number column was provided.422 – field errors{columnName}: {columnValue} is not a valid phone number.
Invalid value for a segmenting column was provided.422 – field errors{columnName}: {columnValue} must be an integer.
Value for a column marked as required not provided in request.422 – field errors{columnName}: could not validate recipient; required column {columnName} has no value.
Invalid value for a multiselection column was provided, or valid values were provided but were not semi-colon delimited.422 – field errors{columnName}: the following selections are not valid for this field: [columnValue}.
Invalid value for a STO column was provided.422 – field errors{columnName}: {columnValue} must be an integer that is between 0 and 168.
Value exceeding 4000 characters for a text column was provided.422 – field errors{columnName}: {columnValue} exceeds the maximum length of 4000 characters.
Invalid value for a time column was provided.422 – field errors{columnName}: {columnValue} is not a valid time; it must be in the format HH:mm:ss or HH:mm.
Invalid value for a timestamp column was provided.422 – field errors{columnName}: {columnValue} is not in a valid timestamp format; it must be formatted as yyyy-MM-ddTHH:mm:ss.SSSZ.

PATCH /databases/{databaseId}/contactbylookupkey

ScenarioCode / levelMessage
Invalid value provided for {databaseId}404 not found – general errorsDatabase not found
Lookup key not provided400 bad request – general errorsInvalid request
Lookup key provided but is non existent column422 unprocessable entity – general errorsColumn not found
Lookup key provided but is not a designated lookup key422 – general errorsLookup key not found
Invalid value for channel was provided422 – general errorsChannel not found

Contact by channel

GET /databases/{databaseId}/contactbychannel/{channel}
PATCH /databases/{databaseId}/contactbychannel

When you use the GET method for the contactychannel Rest API call, you can retrieve the contact for a given database, channel, qualifier, and destination regardless of bad data.

When you use the Patch method for the contactychannel Rest API call, you will get a 422 error for bad data. Since the PATCH method is used to add or update a contact with the given contact data using channel information, the validation process will run for this call.

The error could be generated for bad data in ANY of the data fields for the record and not just for the fields that they are specifying in the Rest API call.

Operations related to programs

Retrieve a Program (GET)

ScenarioCodeMessage
Input field (Program ID) is empty.405Unsupported operation.
Input field (Program ID) is empty.404Failed to load resource.
User does not have permission.403Forbidden

Update a Program (PUT)

CodeMessage
400Program start date format is invalid.
400Program end date format is invalid.
400Last allowed entry date format is invalid.
403Forbidden – User does not have permission.
409Program is active and cannot be updated.

Create a Program (POST)

CodeMessage
400The program notes field must be 0 - 100 characters in length.
400The program name field must be 1 - 100 characters in length.
400The program name field is required and cannot be empty.
400The program name can contain letters, numbers, spaces, and the following characters: #. - _ " ( ).
400Program end date must be on or after the program start date.
400Last allowed entry date must be on or after the program start date.
400Last allowed entry date must be on or before the program end date.
400The program start date format is invalid.
400The program end date format is invalid.
400The last allowed entry date format is invalid.
403Forbidden – The user does not have permission.
400The program name that you entered is already in use. Enter a new program name.

Operations related to organization settings

BCC Rest API

ScenarioCodeMessage
Various200Success
Bcc not on for a database, contact list, or query specified in the call.403Bcc is not enabled.
Bcc is not set with a custom email value.403Bcc is not configured for custom email address.
User does not have access to the Organization, database, contact list, or query.404Not found.
Invalid email address.400Invalid email address.

Operations related to universal behaviors

Submit new behavioral events (POST)

ScenarioCodeMessage
Event type code is not mapped to any database.201Success
Code is already mapped to a different database.409Conflict
Code is invalid/auto provisioned.400Bad request

Operations related to channels

Push rich content (GET) and (POST)

CodeMessage
200OK
400Bad request

Push published messages

CategoryScenarioCodeMessage
Contact source IDContact source is not push enabled.400Contact source is not enabled for this channel.
Contact source IDUser calling the API is not push enabled.403Forbidden
Contact source IDContact source does not exist.500An unexpected error occurred. If the problem continues, contact your system administrator.
Contact source IDContact source is not in this org.400Contact source access denied.
UserUser calling the API is not on a push enabled org.403Forbidden
Content IDNo ID provided404n/a
Content IDProvided ID does not exist.400Unable to find published DeliveryDraft with contentId .
Content IDProvided ID is not in this org.403Forbidden
Content IDProvided ID existed but was deleted.400Unable to find published DeliveryDraft with contentId .
Campaign nameCampaign name is too long.500An unexpected error occurred. If the problem continues, contact your system administrator.
Message nameContains characters that are NOT whitelisted for use in UI201Success
Message nameContains all spaces201Success
Message nameHas leading or trailing spaces201Success
Message nameMessage name is not unique.400A Push with the name: exists
Folder pathn/a400Folder path must start with a slash ( / ).

Push sends (POST)

CodeMessage
202Accepted
400Appkeys or ChannelQualifiers cannot be empty.
400Contacts must contain at least one contact and cannot exceed more than 1000 contacts.
400The length of appKey is not equal to the required length of 10.
400Content cannot be empty.
400{platform} content size limit exceeded. Size {contentSize}. Limit {platform specific limit}, Platform: {platform}.
400Not all appkeys that is specified in the payload envelope is contained in the published content with contentId: {appKeys}
400Expiration date for rich content should not be empty.
400Rich content with contentId: {richContentId} has not been published.
400Cannot provide both contentId and simple/inboxMessage for content.
401Unauthorized – No access token was provided.
403Forbidden – User does not have permission.

Send published messages

CategoryScenarioCodeMessage
Contact source IDContact source is not SMS enabled.400Contact source is not enabled for this channel.
Contact source IDUser calling the API is not SMS enabled.403Forbidden
Contact source IDContact source does not exist.500An unexpected error occurred. If the problem continues, contact your system administrator.
Contact source IDContact source is not in this org.400Contact source access denied
UserUser calling the API is not on an SMS enabled org.403Forbidden
Draft IDNo ID provided404n/a
Draft IDProvided ID does not exist.400Unable to find published DeliveryDraft with contentId .
Draft IDProvided ID is not in this org.403Forbidden
Draft IDProvided ID existed but was deleted.400Unable to find published DeliveryDraft with contentId .
Folder pathGeneral error message400Folder path must start with a slash ( / ).
SMS nameContains characters that are NOT whitelisted for use in UI.200Success
SMS nameContains all spaces404n/a
SMS nameHas leading or trailing spaces200Success
SMS nameMessage name is not unique.400An SMS with the name: exists

SMS API – Send a published SMS message to contact source

ScenarioCodeMessage
Success201Accepted
Failure400Failure
User is not on an SMS-enabled org403Forbidden
User calling the API is not SMS enabled403Forbidden

SMS API – Retrieve published messages

ScenarioCodeMessage
Success200Success
User is not on an SMS-enabled org403Forbidden
User calling the API is not SMS enabled403Forbidden

SMS API – SMS sent status

ScenarioCodeMessage
Success200OK
Status is not yet available400Bad request

📘

Note:

PUT / PATCH / DELETE SMS Program APIs are only supported for organizations that have the SMS UBX Sender feature provisioned.

Status Code: 405
Message: Unsupported operation