Monitoring API LOGS

Monitor your API calls

Every call made with your API key is logged. Use the /logs endpoint to see your recent calls, find a specific request, or look into errors.

Endpoint

GET https://api.sinay.ai/{api}/api/{version}/logs
APIURL
Container Trackinghttps://api.sinay.ai/container-tracking/api/v2/logs
Webhookhttps://api.sinay.ai/webhook/api/v1/logs
Congestionhttps://api.sinay.ai/congestion/api/v1/logs
Safecubehttps://api.sinay.ai/safecube/api/v1/logs

Each endpoint only returns the logs of the API it belongs to.

Authentication

Authenticate with your API key in the API_KEY header, as for any other call.

API_KEY: <your_api_key>

The logs are scoped to your key: you only see the calls made with the key you send.

Query parameters

All parameters are optional.

NameTypeDescriptionExample
fromISO 8601 date-time (UTC)Returns calls made at or after this time2026-10-06T00:00:00Z
toISO 8601 date-time (UTC)Returns calls made at or before this time2026-10-07T00:00:00Z
statusCodeintegerReturns only calls with this HTTP status500
x-request-idUUIDReturns the call with this request IDc9fd454f-616c-4e64-81d8-45d32f254660
pageintegerPage number, starting at 0 (default 0)1
sizeintegerNumber of results per page (default 20)50

Results are sorted by eventTimestamp, newest first.

Find a call with its x-request-id

Every response from the Sinay API includes an X-Request-Id header. It is the unique ID of that call. Keep it in your own logs: you can use it to find the call here, and to send it to Sinay support when something goes wrong.

HTTP/1.1 500 Internal Server Error
X-Request-Id: 6d78ac0d-3500-4352-848a-5a36cbcab7dc

Response

{
  "number": 0,
  "results": [
    {
      "apiName": "container-tracking",
      "body": null,
      "bodyTruncated": null,
      "endpoint": "/container-tracking/api/v2/shipment",
      "eventTimestamp": "2026-10-07T13:14:08.450404Z",
      "ipSource": "176.162.49.28",
      "method": "GET",
      "queryParams": "{\"shipmentNumber\":[\"EMCU1686335\"]}",
      "statusCode": 500,
      "x-request-id": "6d78ac0d-3500-4352-848a-5a36cbcab7dc"
    },
    {
      "apiName": "container-tracking",
      "body": null,
      "bodyTruncated": null,
      "endpoint": "/container-tracking/api/v2/shipment",
      "eventTimestamp": "2026-10-06T14:43:57.404773Z",
      "ipSource": "176.162.49.28",
      "method": "GET",
      "queryParams": "{\"shipmentNumber\":[\"WBPU7087049\"]}",
      "statusCode": 200,
      "x-request-id": "c9fd454f-616c-4e64-81d8-45d32f254660"
    }
  ],
  "size": 20,
  "totalElements": 2,
  "totalPages": 1
}

Pagination

FieldDescription
numberCurrent page number (starts at 0)
sizePage size
totalElementsTotal number of logs matching your filters
totalPagesTotal number of pages

Log entry (results[])

FieldDescription
x-request-idUnique ID of the call (same value as the X-Request-Id response header)
apiNameAPI that was called
endpointPath that was called
methodHTTP method
queryParamsQuery parameters sent, as a JSON string. Sensitive values (keys, tokens, passwords) are removed
bodyRequest body. Only stored for the Webhook, Congestion and Safecube APIs, null otherwise
bodyTruncatedtrue if the body was larger than 64 KB and was cut
statusCodeHTTP status returned
eventTimestampDate and time of the call (UTC)
ipSourceIP address the call came from

Examples

Your latest calls

curl "https://api.sinay.ai/container-tracking/api/v2/logs" \
  -H "API_KEY: <your_api_key>"

Calls made in a given time window

curl -G "https://api.sinay.ai/container-tracking/api/v2/logs" \
  -H "API_KEY: <your_api_key>" \
  --data-urlencode "from=2026-10-06T00:00:00Z" \
  --data-urlencode "to=2026-10-07T00:00:00Z"

Only failed calls (here, server errors)

curl -G "https://api.sinay.ai/container-tracking/api/v2/logs" \
  -H "API_KEY: <your_api_key>" \
  --data-urlencode "statusCode=500"

One specific call

curl -G "https://api.sinay.ai/container-tracking/api/v2/logs" \
  -H "API_KEY: <your_api_key>" \
  --data-urlencode "x-request-id=6d78ac0d-3500-4352-848a-5a36cbcab7dc"

Next page, 50 results per page

curl -G "https://api.sinay.ai/webhook/api/v1/logs" \
  -H "API_KEY: <your_api_key>" \
  --data-urlencode "page=1" \
  --data-urlencode "size=50"

Good to know

  • Retention: logs are kept for 90 days.
  • Not listed: calls to /logs, /usages, /consumption and /shipment-usage, and calls rejected because the API key was missing or invalid.
  • Rate limit: up to 10 calls every 10 seconds on /logs.
  • Call counts: for monthly totals (all calls, successes, client errors, server errors, units consumed), use the /usages endpoint of each API.