Responses
Success and error responses typically conform to the following formats.
Error response
Errors returned with 4xx responses. Errors include as much information as possible to help you understand the reason for the failure.
We recommend logging all non-2XX responses. Include the entire request and response, including headers, to help you or Support troubleshoot issues.
- details object
Provides information relating to the specific
OBJECT PROPERTIESerror_codewhen possible. For400errors, this object may include thepathandlocationof validation failures.- error string
Specific information about the semantic error, helping you better understand why the request failed.
- location object
The specific line and column where the validation error occurred, if known.
OBJECT PROPERTIES- column integer
The column containing the semantic error.
- line integer
The line containing the semantic error.
- path string
The path to the key containing the validation error.
- error stringREQUIRED
A plain-text explanation of the error.
- error_code integer
The Airship error code. This is normally the HTTP error code appended with a 2-digit identifier, helping provide more specific details about the error.
Example:
40401 - ok booleanREQUIRED
2xx responses return
true; 4xx responses returnfalse.
Used in:
- Add custom events
- Associate contact
- Associate named user
- Create and send experiment (A/B test)
- Create and Send message
- Create attributes list
- Create content template
- Create email attachment
- Create list
- Create or update content template by external ID
- Create or update named user
- Create pipelines (automated message)
- Create segment
- Create tag list
- Create template
- Delete content template
- Delete content template by external ID
- Delete list
- Delete message from inbox
- Delete multiple messages from inbox
- Delete pipeline
- Delete schedule
- Delete scheduled experiment
- Delete segment
- Delete tag list
- Delete template
- Disassociate contact
- Disassociate named user
- Download list errors
- Download list errors
- Download list of mobile app channels
- Enter or exit users from Sequence
- Exit users from Sequence
- Get app opens report
- Get custom events per group summary
- Get custom events per push summary
- Get devices report
- Get experiment overview report
- Get individual push response statistics
- Get opt-in report
- Get opt-out report
- Get pipelines limits and counts
- Get push report
- Get response report
- Get time in app report
- Get web response report
- List attribute lists
- List channels
- List content templates
- List custom events details
- List deleted pipelines
- List existing pipelines
- List experiments
- List filtered pipelines
- List named user subscription lists
- List or look up named users
- List pipelines constraints
- List pushes with response details
- List regions
- List scheduled experiments
- List schedules
- List segments
- List static lists
- List subscription lists
- List tag lists
- List templates
- Look up channel
- Look up contact ID by channel ID
- Look up contact ID by named user ID
- Look up content template
- Look up content template by external ID
- Look up email address
- Look up experiment
- Look up pipeline
- Look up region
- Look up schedule
- Look up segment
- Look up static list metadata
- Look up template
- Modify channel tags
- Modify channel tags
- Modify contact tags
- Modify contact tags
- Modify email tags
- Modify email tags
- Modify named user tags
- Modify named user tags
- Modify open channel tags
- Modify open channel tags
- Modify SMS tags
- Modify SMS tags
- Pause schedule
- Perform scoped contact batch operations
- Perform scoped named user batch operations
- Register email channel
- Register new or update channel
- Remove suppression from email channel
- Replace email channel
- Resume schedule
- Schedule Create and Send message
- Schedule message with bulk ID
- Schedule notifications
- Schedule templated pushes
- Send message with bulk ID
- Send pushes
- Send templated pushes
- Set or remove attributes on channels
- Set or remove attributes on contact
- Set or remove attributes on named user
- Subscribe or unsubscribe channels to/from subscription lists
- Suppress email channel
- Trigger keyword interaction manually
- Uninstall channels
- Uninstall channels
- Uninstall email channel
- Uninstall named users
- Uninstall named users
- Uninstall open channel
- Unsubscribe email channel (custom)
- Update content template
- Update email channel
- Update list contents
- Update list metadata
- Update pipeline
- Update pipelines constraints
- Update schedule
- Update segment
- Update template
- Upload attributes list
- Upload bulk send audience
- Upload tag list
- Validate Create and Send payload
- Validate experiment
- Validate message with bulk ID
- Validate pipelines
- Validate pushes
- Validate templated pushes
Examples
400 response
{
"ok" : false,
"error" : "Could not parse request body.",
"error_code" : 40000,
"details" : {
"error" : "The key 'alert1' is not allowed in this context",
"path" : "notification.alert1",
"location" : {
"line" : 5,
"column" : 18
}
}
}
400 response without location
{
"ok": false,
"error": "Could not parse request body.",
"error_code": 40902,
"details": {
"error": "malformed sender"
}
}
404 response
{
"ok": false,
"error": "Entity not found",
"error_code": 40401
}
OK response
Returned with 2xx Responses. At a minimum, successful calls return true for the ok key. If your call includes a verbose response (as with GET requests, etc.), the ok key will appear in the top-most object, outside the verbose response.
- ok booleanREQUIRED
Success.
- operation_id string
A unique string identifying the operations that modify resources. Use the operation ID to locate and track grouped operations (i.e., a batch push operation may generate multiple
push_idstrings, but a singleoperation_id) or operations that change an existing resource.Format: uuid
Used in:
- Associate contact
- Associate named user
- Create attributes list
- Create list
- Create tag list
- Delete message from inbox
- Disassociate named user
- Enter or exit users from Sequence
- Exit users from Sequence
- Modify email tags
- Modify email tags
- Modify open channel tags
- Modify open channel tags
- Modify SMS tags
- Modify SMS tags
- Perform scoped named user batch operations
- Remove suppression from email channel
- Subscribe or unsubscribe channels to/from subscription lists
- Suppress email channel
- Uninstall channels
- Uninstall channels
- Uninstall email channel
- Uninstall named users
- Uninstall named users
- Uninstall open channel
- Update list contents
- Update list metadata
- Update pipeline
- Update pipelines constraints
- Update segment
- Upload attributes list
- Upload tag list
- Validate Create and Send payload
- Validate message with bulk ID
- Validate pipelines
- Validate pushes
- Validate templated pushes
Examples
OK response
HTTP/1.1 202 Accepted
Content-Type: application/vnd.urbanairship+json; version=3
{
"ok": true,
}
OK with identifiers
HTTP/1.1 202 Accepted
Data-Attribute: push_ids
Content-Type: application/vnd.urbanairship+json; version=3
{
"ok": true,
"operation_id": "df6a6b50-9843-0304-d5a5-743f246a4946",
"push_ids": [
"9d78a53b-b16a-c58f-b78d-181d5e242078"
]
}