Operations Related to Contact databases

Event Type Mappings (GET)

Scenario Response# Response Message
When database ID is accessible to user. 200 { “eventType”: { “name”: “String”, “uri”: “String”, “code”: “String” }}
When database ID is not accessible to user. 500 Internal Server Error

Contact API (PATCH)

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

Condition Status Code Error Level Error Message
Invalid value provided
for {databaseId}
404 Not Found generalErrors Database not found
Invalid value provided
for {contactId}
404 generalErrors No contact found
Value provided for
Email was not
formatted correctly
400 Bad Request generalErrors Argument was not a valid email
Local value provided
for Email is on the
system blocked list
500 Internal Server Error generalErrors
An unexpected error occurred. If the problem continues, please contact your system
administrator.
Field does not exist in
the database
422 

Unprocessable
Entity
fieldErrors
{columnName}: {columnName}
does not exist.
Invalid value for a
Yes/No column was
provided
422 fieldErrors
{columnName}: {columnValue} is
not a valid boolean; it must be
Yes or No.
Invalid value for a Date
column was provided
422 fieldErrors
{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 fieldErrors
{columnName}: {columnValue} is
not a valid number.
Invalid value for a
Country column was
provided
422 fieldErrors
{columnName}: {columnValue} is
not a valid country name.
Invalid value for a
Single Selection
column was provided
422 fieldErrors
{columnName}: {columnValue} is
not one of the valid selections
for this field.
Value provided for
Email was not a valid
value
422 fieldErrors
{columnName}: The given email
is not valid.
Invalid value for a
Phone Number column
was provided
422 fieldErrors
{columnName}: {columnValue} is
not a valid phone number.
Invalid value for a
Segmenting column
was provided
422 fieldErrors
{columnName}: {columnValue}
must be an integer.
Value for a column
marked as required not
provided in request
422 fieldErrors
{columnName}: Could not
validate recipient; required
column {columnName} has no
value.
Invalid value for a Multi
Selection column was
provided, or valid
values were provided
but were not
semi-colon delimited
422 fieldErrors
{columnName}: The following
selections are not valid for this
field: [columnValue}
Invalid value for a STO
column was provided
422 fieldErrors
{columnName}: {columnValue}
must be an integer that is
between 0 and 168.
Value exceeding 4000
characters for a Text
column was provided
422 fieldErrors
{columnName}: {columnValue}
exceeds the maximum length of
4000 characters.
Invalid value for a
Time column was
provided
422 fieldErrors
{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 fieldErrors
{columnName}: {columnValue} is
not in a valid timestamp format;
it must be formatted as
yyyy-MM-ddTHH:mm:ss.SSSZ

PATCH /databases/{databaseId}/contactbylookupkey

Condition Status Code Error Level Error Message
Invalid value provided
for {databaseId}
404 Not Found generalErrors Database not found
Lookup Key not
provided
400 Bad Request generalErrors Invalid request
Lookup Key provided
but is non existent
column
422 Unprocessable
Entity
generalErrors Column not found
Lookup Key provided
but is not a designated
Lookup Key
422 generalErrors Lookup key not found
Invalid value for
channel was provided
422 generalErrors Channel not found

Operations Related to Programs

Retrieve a Program (GET)

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

Update a Program (PUT)

Response# Response Message
400 Program Start Date format is invalid.
400 Program End Date format is invalid.
400 Last Allowed Entry Date format is invalid.
403 Forbidden – User does not have permission.
409 Program is active and cannot be updated.

Create a Program (POST)

Response# Response Message
400 The Program Notes field must be 0 – 100 characters in length.
400 The Program Name field must be 1 – 100 characters in length.
400 The Program Name field is required and cannot be empty.
400 The Program Name can contain letters, numbers, spaces, and the following characters: #. – _ ” ( ).
400 Program End Date must be on or after the Program Start Date.
400 Last Allowed Entry Date must be on or after the Program Start Date.
400 Last Allowed Entry Date must be on or before the Program End Date.
400 Program Start Date format is invalid.
400 Program End Date format is invalid.
400 Last Allowed Entry Date format is invalid.
403 Forbidden – User does not have permission.
400 The Program Name that you entered is already in use. Enter a new Program Name.

Operations Related to Organization Settings

BCC Rest API

Scenario Response# Response Message
Various 200 Success
Bcc not on for a database, contact list, or query specified in the call 403 Bcc is not enabled.
Bcc is not set with a custom email value. 403 Bcc is not configured for custom email address.
User does not have access to the Organization, database, contact list, or query. 404 Not Found.
Invalid email address. 400 Invalid email address.

Operations Related to Universal Behaviors

Submit New Behavioral Events (POST)

Scenario Response# Response Message
Event type code is not mapped to any database. 201 Success
Code is already mapped to a different database. 409 Conflict
Code is invalid/autoProvisioned. 400 Bad Request

Operations Related to Channels

Push Rich Content (GET) and (POST)

Response# Response Message
200 OK
400 Bad Request

Push Published Messages

Category Scenario Response# Response Message
Contact Source ID Contact source is not push enabled. 400 Contact source is not enabled for this channel.
Contact Source ID User calling the API is not push enabled. 403 Forbidden
Contact Source ID Contact source does not exist. 500 An unexpected error occurred. If the problem continues, contact your system administrator.
Contact Source ID Contact source is not in this org. 400 Contact source access denied
User User calling the API is not on a push enabled org. 403 Forbidden
Content ID No ID provided 404  
Content ID Provided ID does not exist. 400 Unable to find published DeliveryDraft with contentId <contentID goes here>.
Content ID Provided ID is not in this org. 403 Forbidden
Content ID Provided ID existed but was deleted. 400 Unable to find published DeliveryDraft with contentId <contentID goes here>.
Campaign Name Campaign name is too long. 500 An unexpected error occurred. If the problem continues, contact your system administrator.
Message Name Contains characters that are NOT whitelisted for use in UI 201 Success
Message Name Contains all spaces 201 Success
Message Name Has leading or trailing spaces 201 Success
Message Name Message name is not unique. 400 A Push with the name: <provided message name goes here> exists
Folder Path   400 Folder path must start with a slash ( / ).

Push Sends (POST)

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

Send Published Messages

Category Scenario Response# Response Message
Contact Source ID Contact source is not SMS enabled. 400 Contact source is not enabled for this channel.
Contact Source ID User calling the API is not SMS enabled. 403 Forbidden
Contact Source ID Contact source does not exist. 500 An unexpected error occurred. If the problem continues, contact your system administrator.
Contact Source ID Contact source is not in this org. 400 Contact source access denied
User User calling the API is not on an SMS enabled org. 403 Forbidden
Draft ID No ID provided 404  
Draft ID Provided ID does not exist. 400 Unable to find published DeliveryDraft with contentId <contentID goes here>.
Draft ID Provided ID is not in this org. 403 Forbidden
Draft ID Provided ID existed but was deleted. 400 Unable to find published DeliveryDraft with contentId <contentID goes here>.
Folder Path General error message 400 Folder path must start with a slash ( / ).
SMS Name Contains characters that are NOT whitelisted for use in UI 200 Success
SMS Name Contains all spaces 404  
SMS Name Has leading or trailing spaces 200 Success
SMS Name Message name is not unique. 400 An SMS with the name: <provided message name goes here> exists
 

Scenario Response Code Message
Success 201 Accepted
Failure 400 Failure
User is not on an SMS-enabled Org 403 Forbidden
User calling the API is not SMS enabled 403 Forbidden

Scenario Response Code Message
Success 200 Success
User is not on an SMS-enabled Org 403 Forbidden
User calling the API is not SMS enabled 403 Forbidden

Scenario Response Code Message
Success 200 OK
Status is not yet available 400 Bad 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

2 comments on"REST API Response Codes"

  1. Hyperlinks on this page are not working

Join The Discussion

Your email address will not be published. Required fields are marked *