Debugging
Error codes, rate limits and the checks to run when a Segmentify API request fails.
Start by sending the failing request from the API reference with the same values. The reference shows the raw response, which usually names the problem.
Events API
Section titled “Events API”The Events API reports errors in the response body. If the body contains a statusCode field, the request failed.
statusCode |
Meaning | What to check |
|---|---|---|
NO_API_KEY |
The apiKey parameter is missing. |
Send your API key as the apiKey query parameter. |
NO_ACCOUNT |
The API key belongs to no Segmentify account. | Compare the key with the one under Settings > Integrations. |
FAILED_ACCOUNT |
The account of the API key is inactive. | Contact the Segmentify support team to re-activate the account. |
NO_DOMAIN_APIKEY_MATCH |
The Origin header does not match the domain of the account. |
Send the registered domain as Origin. In the reference on this site, use X-Forward-Origin. |
NO_EVENT |
The request body holds no events. | Send at least one event. |
INVALID_EVENT |
The event format is not acceptable. | Compare the event with the example of its category. |
NO_USERID |
An event has no userId. |
Add userId to every event. See Session Management. |
NO_SESSIONID |
An event has no sessionId. |
Add sessionId to every event. |
BAD_INPUT |
The body is not valid JSON. | Validate the JSON: look for missing or trailing commas and comments. |
Other checks:
- Data center: the host must be the data center of your account. A key sent to another data center is not found.
- Test mode: an event with
testMode: "true"does not affect live data, so it does not show up in live reports. - Campaign events (email, SMS, push): the values come from the UTM parameters of the landing page URL. Check that the URL carries them before sending the event. See Email, SMS and Push.
- Push endpoints are served from the push data center, not the events data center.
Customer API
Section titled “Customer API”401: the access token is missing, invalid or expired. Access tokens are short-lived; get a new pair fromPOST /auth/token/refresh, or log in again if the refresh token has expired too.- Missing version header: every endpoint needs
X-Api-Version: 1.0. - Wrong region: use the base URL of your region,
api-eqfor Türkiye orapi-gcpfor Global. - Batch requests succeed partially: a
200response does not mean every record was created. Readinvalids(records that failed validation and were not processed) andfails(valid records that could not be processed) in the response.
Contacts API
Section titled “Contacts API”400on import: the response lists each rejected field inerrors, with theindexof the record in your array, the rejectedvalueand amessage.successRecordis the number of records that were saved. Dates (birthDate,memberShipDate) must be inDD.MM.YYYYformat.400on export: thepageparameter is greater thantotalPages. ReadtotalPagesandcurrentPagefrom the previous response.429Too Many Requests: one request can carry 1000 records, and 100 successful requests are allowed per hour. More than 100 failed requests in an hour block the account for one hour.- Expired token: the access token is valid for 2 hours and the refresh token for 4 hours. Send the refresh token to
POST /oauth2/tokenwithgrantType: "REFRESH_TOKEN".
Still stuck
Section titled “Still stuck”Send the Segmentify support team the request (method, URL without the API key or token, body) and the full response, with the time of the request.