422 - Unprocessable Entity
You will receive this response from any endpoint if you specify a body or query parameters that do not validate correctly. For example, if required fields are missing or field values are incorrectly formatted.
The JSON response will have 4 fields, code
, message
, data
and request_id
.
For some validation errors, the value of data
will be null. For errors in parsing parameters, data
will be an object where each key is the name of a parameter and the value is a string denoting the error in processing that parameter.
For example, here is the response when the body
field when calling the Send Feed Event Endpoint has an invalid CardKitSection:
{
"code": "UNPROCESSABLE_ENTITY",
"message": "Posted entity could not be processed",
"data": {
"body": "Parameter [body]'s value [{\"sections\":[{\"type\":\"header\",\"title\":\"Filler\"},{\"type\":\"qwerty\",\"file_name\":\"File Name\",\"file_ext\":\"pdf\",\"file_size\":12134,\"download_url\":\"https://api-staging.joinblink.com/file/a-ca6eb2fd-1327-443f-bbec-5f0856ba25ac\"}]}] is malformed [Invalid CardKit JSON provided: [qwerty] is not a valid CardKit section]"
},
"request_id": "RQ-c85733df-40e4-11e9-8318-fdd34b796c5f"
}
Some validation errors span multiple parameters. In that case, information about the cause of the error will be in the code
and message
parameters. For example if the Send Feed Event Endpoint is called without any user_ids
or group_ids
:
{
"code": "NO_RECIPIENTS",
"message": "No recipients specified.",
"data": null,
"request_id": "RQ-ef136765-40e7-11e9-8bb1-25670c13a55f"
}
Updated almost 6 years ago