Request body errors occur when the API accepts the request, but there are structural problems or missing required fields. These errors may return with either 400 status codes (rejecting the entire request) or 200 status codes with individual command failures in batch requests.
How to resolve request body errors
- Validate your JSON syntax before sending requests.
- Include all required fields for each command type.
- Verify command names match the supported values:
customersorcustomers/events. - Ensure customer_ids objects contain at least one ID type.
Error types
400 - No commands
This error occurs when the commands array in your request body is empty or missing.
Example:
Request with empty commands array:
curl --location 'https://api-cis.exponea.com/track/v2/projects/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/batch' -i \
--header 'content-type: application/json' \
--header 'Authorization: *************' \
--data-raw '{
"commands": []
}'
Response to the request:
HTTP/2 400
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json
x-request-id: deaca621-c6c6-4c09-8430-0d446b1c7555
date: Wed, 31 Jul 2024 20:59:56 GMT
{"success":false,"message":"No commands"}
JSON response example:
{
"success":false,
"message":"No commands"
}
Resolution:
Add at least one command object to the commands array with valid name and data properties.
400 - Invalid JSON
This error occurs when one of the commands is not a valid JSON object. The entire request fails.
Example:
Request with a number instead of an object in the commands array:
curl --location 'https://api-cis.exponea.com/track/v2/projects/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/batch' -i \
--header 'content-type: application/json' \
--header 'Authorization: *************' \
--data-raw '{
"commands": [
1,
{
"name": "custom_command_type",
"data": {
"customer_ids": {
"registered": "[email protected]"
},
"properties": {
"product_id": "X1"
}
}
},
{
"name": "customers",
"data": {
"customer_ids": {
"registered": "[email protected]"
},
"properties": {
"email": ""
}
}
}
]
}'
Response to the request:
HTTP/2 400
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json
x-request-id: 6f852bdd-65fa-4e66-8d4f-35008a842b06
date: Wed, 31 Jul 2024 21:10:50 GMT
{"success":false,"message":"Invalid JSON"}
JSON response example:
{
"success":false,
"message":"Invalid JSON"
}
Resolution:
Ensure all items in the commands array are valid JSON objects with proper structure.
200/400 - At least one ID should be specified
This error occurs when the customer_ids object within a command is empty or missing.
Example:
Batch request with empty customer_ids:
curl --location 'https://api-cis.exponea.com/track/v2/projects/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/batch' -i \
--header 'content-type: application/json' \
--header 'Authorization: *************' \
--data-raw '{
"commands": [
{
"name": "customers/events",
"data": {
"customer_ids": {},
"event_type": "cart_update",
"properties": {
"product_id": "X1"
}
}
},
{
"name": "customers",
"data": {
"properties": {
"email": ""
}
}
}
]
}'
Response to the request:
HTTP/2 200
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json
x-request-id: 6d12f4dd-a484-4f1b-9186-519f617bf91c
date: Wed, 31 Jul 2024 20:44:07 GMT
{
"results": [
{
"success": false,
"errors": ["At least one id should be specified."]
},
{
"success": false,
"errors": ["At least one id should be specified."]
}
],
"start_time": 1722458647.5528958,
"end_time": 1722458647.5529823,
"success": true
}
JSON response example:
{
"results": [
{
"success": false,
"errors": ["At least one id should be specified."]
},
{
"success": false,
"errors": ["At least one id should be specified."]
}
],
"start_time": 1722458647.5528958,
"end_time": 1722458647.5529823,
"success": true
}
Single endpoint behavior:
When using single-event or customer update endpoints without customer IDs, the API returns status 400.
Request to customer update endpoint without IDs:
curl -i --location 'https://api-cis.exponea.com/track/v2/projects/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/customers' \
--header 'content-type: application/json' \
--header 'Authorization: Basic *************' \
--data-raw '{
"customer_ids": {},
"properties": {
"email": "[email protected]",
"first_name": "Nikolay",
"phone": "123456"
},
"update_timestamp": 1758099531.33333336
}'
Response to the request:
HTTP/2 400
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json
x-request-id: 1cf04a47-d6ae-415a-910b-0114284476bb
date: Tue, 28 Oct 2025 13:23:57 GMT
{"success":false,"errors":["At least one id should be specified."]}
JSON response example:
{"success":false,
"errors":
["At least one id should be specified."]
}
Resolution:
Add at least one customer ID to the customer_ids object, such as registered, cookie, or email.
200/400 - Field 'event_type' is required
This error occurs when a customers/events command doesn't contain the event_type property.
Example:
Batch request with missing event_type:
curl --location 'https://api-cis.exponea.com/track/v2/projects/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/batch' -i \
--header 'content-type: application/json' \
--header 'Authorization: *************' \
--data-raw '{
"commands": [
{
"name": "customers/events",
"data": {
"customer_ids": {
"registered": "[email protected]"
},
"properties": {
"product_id": "X1"
}
}
},
{
"name": "customers",
"data": {
"customer_ids": {
"registered": "[email protected]"
},
"properties": {
"email": ""
}
}
}
]
}'
Response to the request:
HTTP/2 200
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json
x-request-id: 3a02f65f-1fe6-4032-b216-bc281aa41a2e
date: Wed, 31 Jul 2024 20:56:39 GMT
{
"results": [
{
"success": false,
"errors": ["Field 'event_type' is required."]
},
{
"success": true
}
],
"start_time": 1722459399.5080795,
"end_time": 1722459399.5105155,
"success": true
}
JSON response example:
{
"results": [
{
"success": false,
"errors": ["Field 'event_type' is required."]
},
{
"success": true
}
],
"start_time": 1722459399.5080795,
"end_time": 1722459399.5105155,
"success": true
}
Single endpoint behavior:
When using the events endpoint without event_type, the API returns status 400.
Request to events endpoint without event_type:
curl -i --location 'https://api-cis.exponea.com/track/v2/projects/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/customers/events' \
--header 'content-type: application/json' \
--header 'Authorization: Basic *************' \
--data-raw '{
"customer_ids": {
"registered": "[email protected]"
},
"properties": {
"action_type": "whatsapp",
"status": "delivered",
"recipient": "123456"
}
}'
Response to the request:
HTTP/2 400
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json
x-request-id: 052c0361-aac2-40fe-9b5a-dc76e4cb8973
date: Tue, 28 Oct 2025 13:26:43 GMT
{"success":false,"errors":["Field 'event_type' is required."]}
JSON response example:
{
"success":false,
"errors":
["Field 'event_type' is required."]
}
Resolution:
Add the event_type field to your event data with a valid event type value.
200 - Unsupported command type: unknown command
This error occurs when you use an invalid command name that isn't customers or customers/events.
Example:
Batch request with invalid command name:
curl --location 'https://api-cis.exponea.com/track/v2/projects/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/batch' -i \
--header 'content-type: application/json' \
--header 'Authorization: *************' \
--data-raw '{
"commands": [
{
"name": "custom_command_type",
"data": {
"customer_ids": {
"registered": "[email protected]"
},
"properties": {
"product_id": "X1"
}
}
},
{
"name": "customers",
"data": {
"customer_ids": {
"registered": "[email protected]"
},
"properties": {
"email": ""
}
}
}
]
}'
Response to the request:
HTTP/2 200
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json
x-request-id: 1939a956-9599-4929-97da-d6af2c6f67e4
date: Wed, 31 Jul 2024 21:02:22 GMT
{
"results": [
{
"success": false,
"errors": ["Unsupported command type: unknown command custom_command_type"]
},
{
"success": true
}
],
"start_time": 1722459742.6397655,
"end_time": 1722459742.6418943,
"success": true
}
JSON response example:
{
"results": [
{
"success": false,
"errors": ["Unsupported command type: unknown command custom_command_type"]
},
{
"success": true
}
],
"start_time": 1722459742.6397655,
"end_time": 1722459742.6418943,
"success": true
}
Resolution:
Use only the supported command names: customers for updating customer properties or customers/events for tracking events.
200 - Unsupported command type: invalid name
This error occurs when the name property is completely missing from a command object.
Example:
Batch request with missing command name:
curl --location 'https://api-cis.exponea.com/track/v2/projects/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/batch' -i \
--header 'content-type: application/json' \
--header 'Authorization: *************' \
--data-raw '{
"commands": [
{
"data": {
"customer_ids": {
"registered": "[email protected]"
},
"properties": {
"product_id": "X1"
}
}
},
{
"name": "customers",
"data": {
"customer_ids": {
"registered": "[email protected]"
},
"properties": {
"email": ""
}
}
}
]
}'
Response to the request:
HTTP/2 200
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json
x-request-id: 0459dd3a-f50a-498a-ac93-e7b464003eca
date: Wed, 31 Jul 2024 21:08:37 GMT
{
"results": [
{
"success": false,
"errors": ["unsupported command type: invalid name"]
},
{
"success": true
}
],
"start_time": 1722460117.859192,
"end_time": 1722460117.8602097,
"success": true
}
JSON response example:
{
"results": [
{
"success": false,
"errors": ["unsupported command type: invalid name"]
},
{
"success": true
}
],
"start_time": 1722460117.859192,
"end_time": 1722460117.8602097,
"success": true
}
Resolution:
Ensure every command object includes a name property with either customers or customers/events as the value.
Related resources
- Tracking API error handling: Overview of error types and retry strategies
- Authorization errors: Authentication and permission issues
