Skip to content
Pilot program is open: 14-day free trial for up to 5 trucksApply
Preview

The Rigsight API, webhooks and embed agent are in private beta. Request access at hello@rigsight.uz or book a demo.

Errors & limits

Errors, limits and versioning

How the API reports problems, how much you can call it, how to retry safely, and how it will change over time.

Error format

Every error response has a non-2xx status and the same JSON shape. code is stable and safe to branch on; message is for humans, may change, and follows Accept-Language.

JSON
{
  "error": {
    "code": "unprocessable",
    "message": "A PTI needs at least 5 photos; 3 were declared."
  }
}

Every response also has an X-Request-Id header. Include it when contacting support.

HTTP status codes

StatuscodeMeaningRetry?
400invalid_requestMalformed JSON, missing or invalid parameter.No — fix the request.
401unauthorizedMissing, invalid or revoked API key or token.No
403forbiddenThe key or token lacks the required scope, or a signed URL expired.No
404not_foundThe object does not exist in your fleet.No
409conflictState conflict (e.g. PTI already submitted) or Idempotency-Key reused with a different body.No
413too_largeRequest body or declared file is larger than allowed.No
422unprocessableValid JSON but breaks a rule (media limits, plan limits, missing uploads).No
429rate_limitedRate limit exceeded. Wait for the number of seconds in Retry-After.Yes, after Retry-After
500internal_errorUnexpected error on our side.Yes, with backoff
503unavailableTemporarily overloaded or in maintenance. May include Retry-After.Yes, with backoff

Rate limits

  • 120 requests per minute per API key (sliding window). Test and live keys have separate limits.
  • Media uploads to signed URLs are not counted.
  • Responses include X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds).
  • When you get 429, wait Retry-After seconds before retrying. Prefer webhooks over polling to stay well below the limit.
HTTP
HTTP/1.1 429 Too Many Requests
Retry-After: 12
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 0

{ "error": { "code": "rate_limited", "message": "Rate limit of 120 requests per minute exceeded." } }

Idempotency

Network failures happen. To retry a POST safely, send an Idempotency-Key header with a unique value (a UUID v4 is ideal). If Rigsight has already processed a request with that key in the last 24 hours, it returns the original response instead of creating a second PTI, truck or review.

Shell
curl https://api.rigsight.uz/v1/ptis \
  -H "Authorization: Bearer rs_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 7c1e0a52-2f7e-4c8e-9a51-0f3b1d6e2a10" \
  -d '{ "truck": "1045", "type": "pre_trip", "media": [ … ] }'
  • Reusing a key with a different body returns 409 conflict.
  • GET, PATCH and DELETE are already idempotent and ignore the header.
  • Keys are scoped to your API key and expire after 24 hours.

Versioning

The version is part of the URL: /v1. Within a version we only make additive, backwards-compatible changes — new endpoints, new optional parameters, new response fields, new event types and new enum values. Build your client to ignore fields it does not know.

Breaking changes (removing or renaming fields, changing types or behaviour) only ship in a new version such as /v2, announced to integrators by email well in advance, with both versions running side by side during the migration period.

Preview caveat

While v1 is in private beta, details may still change based on partner feedback. Beta partners are told about every change before it ships.

Changelog

  1. 2026-11

    v1 preview

    First public description of the REST API (PTIs, signed uploads, review, trucks, defects, repairs, usage, webhooks, embed tokens), signed webhooks and the <rigsight-pti> embed agent. Available to private beta partners.