API reference
REST API
Base URL https://api.rigsight.uz/v1. All requests need Authorization: Bearer rs_live_… (see Authentication). Bodies are JSON; errors follow the common error format.
PTIs
A PTI (pre-trip, post-trip or arrival inspection) moves through awaiting_upload → processing → completed (or failed). Create it, upload media to the signed URLs, submit, then read the result or wait for a webhook.
Create a PTI
/v1/ptisStarts an inspection and reserves one signed upload URL per media file you declare. The PTI stays in awaiting_upload until you call submit. Upload URLs are valid for 15 minutes.
A PTI needs 5–40 photos and at most 10 videos of up to 2 minutes each. Exact limits depend on your plan; requests outside them return 422.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| truck | string | Required | Truck unit number (e.g. 1045) or truck id (trk_…). Unknown unit numbers return 404; create the truck first. |
| trailer | string | Optional | Trailer number, if a trailer is part of the inspection. |
| type | enum | Required | pre_trip, post_trip or arrival. |
| driver_id | string | Optional | Your own driver identifier. Stored and returned as-is. |
| media | array | Required | One entry per file you will upload (see below). |
truckstringRequired- Truck unit number (e.g.
1045) or truck id (trk_…). Unknown unit numbers return 404; create the truck first. trailerstringOptional- Trailer number, if a trailer is part of the inspection.
typeenumRequiredpre_trip,post_triporarrival.driver_idstringOptional- Your own driver identifier. Stored and returned as-is.
mediaarrayRequired- One entry per file you will upload (see below).
media[] object
| Name | Type | Required | Description |
|---|---|---|---|
| kind | enum | Required | photo or video. |
| content_type | string | Required | image/jpeg, image/png, image/heic, video/mp4 or video/quicktime. |
| size_bytes | integer | Required | Exact file size. The upload is rejected if the size differs. |
| sha256 | string | Optional | Hex SHA-256 of the file. If given, storage verifies the upload against it. |
kindenumRequiredphotoorvideo.content_typestringRequiredimage/jpeg,image/png,image/heic,video/mp4orvideo/quicktime.size_bytesintegerRequired- Exact file size. The upload is rejected if the size differs.
sha256stringOptional- Hex SHA-256 of the file. If given, storage verifies the upload against it.
curl https://api.rigsight.uz/v1/ptis \
-H "Authorization: Bearer rs_live_…" \
-H "Content-Type: application/json" \
-H "Accept-Language: en" \
-H "Idempotency-Key: 7c1e0a52-2f7e-4c8e-9a51-0f3b1d6e2a10" \
-d '{
"truck": "1045",
"trailer": "T-220",
"type": "pre_trip",
"driver_id": "drv_88",
"media": [
{ "kind": "photo", "content_type": "image/jpeg", "size_bytes": 2483021 },
{ "kind": "video", "content_type": "video/mp4", "size_bytes": 48210233 }
]
}'{
"id": "pti_9f2c41d7",
"state": "awaiting_upload",
"type": "pre_trip",
"truck": { "id": "trk_12", "unit_number": "1045" },
"trailer": "T-220",
"driver_id": "drv_88",
"created_at": "2026-11-28T09:12:44Z",
"uploads": [
{
"media_id": "med_01a7",
"upload_url": "https://media.rigsight.uz/u/med_01a7?sig=…",
"method": "PUT",
"headers": { "Content-Type": "image/jpeg" },
"expires_at": "2026-11-28T09:27:44Z"
},
{
"media_id": "med_01a8",
"upload_url": "https://media.rigsight.uz/u/med_01a8?sig=…",
"method": "PUT",
"headers": { "Content-Type": "video/mp4" },
"expires_at": "2026-11-28T09:27:44Z"
}
]
}Possible errors
- 400
invalid_requestMalformed JSON or a missing required field. - 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the ptis:write scope. - 404
not_foundThe truck does not exist in your fleet. - 409
conflictSame Idempotency-Key reused with a different body. - 413
too_largeA declared file exceeds the size limit. - 422
unprocessableToo few/many photos or videos for your plan, or an unsupported content_type. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Upload media
{upload_url}Upload the raw file bytes directly to storage using the upload_url, method and headers from uploads[]. Do not send your API key: the URL is already signed. The body is the file itself, not JSON or multipart form data. Uploads do not count towards the API rate limit.
If a URL expires before you finish, call POST /v1/ptis again (a new PTI) — expired uploads cannot be resumed in the preview.
Request
| Name | Type | Required | Description |
|---|---|---|---|
| Content-Type | header | Required | Must equal the content_type declared for this media. |
| body | binary | Required | The file bytes. Length must equal size_bytes. |
Content-TypeheaderRequired- Must equal the
content_typedeclared for this media. bodybinaryRequired- The file bytes. Length must equal
size_bytes.
curl -X PUT "https://media.rigsight.uz/u/med_01a7?sig=…" \
-H "Content-Type: image/jpeg" \
--data-binary @left-front-tire.jpgHTTP/1.1 200 OK
ETag: "5d41402abc4b2a76b9719d911017c592"Possible errors
- 400
invalid_requestContent-Type or size does not match the declaration, or sha256 mismatch. - 403
forbiddenThe signature is invalid or the URL has expired (after 15 minutes). - 413
too_largeThe body is larger than the declared size_bytes.
Submit a PTI
/v1/ptis/{id}/submitTells Rigsight that all uploads have finished and starts the analysis. The PTI moves to processing; a typical result is ready in 1–3 minutes. You are notified by the pti.completed webhook, or you can poll GET /v1/ptis/{id} (no more than once every 5 seconds).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | PTI id (pti_…). |
idstringRequired- PTI id (
pti_…).
curl -X POST https://api.rigsight.uz/v1/ptis/pti_9f2c41d7/submit \
-H "Authorization: Bearer rs_live_…"{
"id": "pti_9f2c41d7",
"state": "processing",
"submitted_at": "2026-11-28T09:15:02Z"
}Possible errors
- 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the ptis:write scope. - 404
not_foundNo PTI with this id in your fleet. - 409
conflictThe PTI was already submitted, or is completed/failed. - 422
unprocessableNot all declared media have been uploaded (missing media ids are listed in the message). - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Retrieve a PTI
/v1/ptis/{id}Returns the state and, once completed, the full result of an inspection.
state:awaiting_upload|processing|completed|failed.status:PASS|NEEDS_REPAIR|OUT_OF_SERVICE;nulluntil the state iscompleted. This is the AI recommendation, not a final decision.defects[]:id,component,severity(critical|major|minor),description,recurring(seen in a previous PTI and not certified as repaired) andimage_ids(media showing the defect).unclear_components[]: parts the AI could not judge from the media (blurry, dark, not shown). Ask the driver for a re-take or inspect manually.media[]: each file with a signedurlvalid for 10 minutes. Fetch the PTI again for fresh URLs.review:nulluntil a person decides, then{ decision, user, comment, created_at }.requires_human_reviewis alwaystrue. Internal processing cost is never exposed.
If state is failed, the failure_reason field explains why (for example, unusable media). Failed PTIs are not billed.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | PTI id (pti_…). |
idstringRequired- PTI id (
pti_…).
curl https://api.rigsight.uz/v1/ptis/pti_9f2c41d7 \
-H "Authorization: Bearer rs_live_…" \
-H "Accept-Language: en"{
"id": "pti_9f2c41d7",
"state": "completed",
"type": "pre_trip",
"truck": { "id": "trk_12", "unit_number": "1045" },
"trailer": "T-220",
"driver_id": "drv_88",
"status": "OUT_OF_SERVICE",
"summary": "Left front tire tread is below the legal minimum. Brake chamber on axle 2 shows an air leak indicator.",
"defects": [
{
"id": "def_7781",
"component": "left front tire",
"severity": "critical",
"description": "Tread below 4/32\"",
"recurring": false,
"image_ids": ["med_01a7"]
},
{
"id": "def_7782",
"component": "axle 2 right brake chamber",
"severity": "major",
"description": "Possible air leak: pushrod stroke indicator visible",
"recurring": true,
"image_ids": ["med_01b2", "med_01b3"]
}
],
"unclear_components": ["fifth wheel locking jaws"],
"media": [
{
"id": "med_01a7",
"kind": "photo",
"content_type": "image/jpeg",
"url": "https://media.rigsight.uz/m/med_01a7?sig=…",
"url_expires_at": "2026-11-28T09:28:10Z"
}
],
"review": null,
"requires_human_review": true,
"created_at": "2026-11-28T09:12:44Z",
"submitted_at": "2026-11-28T09:15:02Z",
"completed_at": "2026-11-28T09:16:51Z"
}Possible errors
- 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the ptis:read scope. - 404
not_foundNo PTI with this id in your fleet. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
List PTIs
/v1/ptis?truck=&status=&from=&to=&cursor=&limit=Returns PTIs newest first, with cursor pagination. Pass next_cursor from the previous page as cursor to get the next page; next_cursor is null on the last page. List items contain the result fields but not media.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| truck | string | Optional | Filter by unit number or truck id. |
| status | enum | Optional | PASS, NEEDS_REPAIR or OUT_OF_SERVICE. |
| from | datetime | Optional | Created at or after (ISO 8601, e.g. 2026-11-01T00:00:00Z). |
| to | datetime | Optional | Created before (ISO 8601). |
| cursor | string | Optional | Opaque cursor from a previous response. |
| limit | integer | Optional | Items per page, 1–100. Default 25. |
truckstringOptional- Filter by unit number or truck id.
statusenumOptionalPASS,NEEDS_REPAIRorOUT_OF_SERVICE.fromdatetimeOptional- Created at or after (ISO 8601, e.g.
2026-11-01T00:00:00Z). todatetimeOptional- Created before (ISO 8601).
cursorstringOptional- Opaque cursor from a previous response.
limitintegerOptional- Items per page, 1–100. Default 25.
curl "https://api.rigsight.uz/v1/ptis?truck=1045&status=OUT_OF_SERVICE&limit=2" \
-H "Authorization: Bearer rs_live_…"{
"data": [
{
"id": "pti_9f2c41d7",
"state": "completed",
"type": "pre_trip",
"truck": { "id": "trk_12", "unit_number": "1045" },
"status": "OUT_OF_SERVICE",
"summary": "Left front tire tread is below the legal minimum.",
"defect_count": 2,
"review": null,
"created_at": "2026-11-28T09:12:44Z"
}
],
"next_cursor": "eyJjIjoiMjAyNi0xMS0yOCJ9"
}Possible errors
- 400
invalid_requestInvalid filter value or malformed cursor. - 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the ptis:read scope. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Record a review decision
/v1/ptis/{id}/reviewRecords the decision of a qualified person (dispatcher, safety manager or mechanic) on a completed PTI. Each decision is written to the audit log with the user and the time; a later review replaces the current decision but the history is kept. Triggers the pti.reviewed webhook.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | PTI id (pti_…). |
idstringRequired- PTI id (
pti_…).
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| decision | enum | Required | approved (truck may operate), repair (repair before or after dispatch per your policy) or oos (out of service). |
| comment | string | Optional | Free text, up to 2,000 characters. Required by policy in many fleets when overriding the AI recommendation. |
| user | string | Optional | Your identifier of the reviewer (e.g. email). Defaults to the API key name. |
decisionenumRequiredapproved(truck may operate),repair(repair before or after dispatch per your policy) oroos(out of service).commentstringOptional- Free text, up to 2,000 characters. Required by policy in many fleets when overriding the AI recommendation.
userstringOptional- Your identifier of the reviewer (e.g. email). Defaults to the API key name.
AI only recommends
status of a PTI is a recommendation; the decision recorded here is what your systems should act on.curl https://api.rigsight.uz/v1/ptis/pti_9f2c41d7/review \
-H "Authorization: Bearer rs_live_…" \
-H "Content-Type: application/json" \
-d '{
"decision": "oos",
"comment": "Confirmed tread depth 3/32\" with gauge. Tire replacement booked.",
"user": "safety@fleet.example"
}'{
"id": "pti_9f2c41d7",
"review": {
"decision": "oos",
"user": "safety@fleet.example",
"comment": "Confirmed tread depth 3/32\" with gauge. Tire replacement booked.",
"created_at": "2026-11-28T09:21:30Z"
}
}Possible errors
- 400
invalid_requestUnknown decision value. - 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the reviews:write scope. - 404
not_foundNo PTI with this id in your fleet. - 409
conflictThe PTI is not completed yet. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Trucks & defects
Trucks are the units you inspect. Defects stay open until a repair is certified.
List trucks
/v1/trucks?cursor=&limit=Returns the trucks in your fleet, sorted by unit number, with the same cursor pagination as PTIs.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| cursor | string | Optional | Opaque cursor from a previous response. |
| limit | integer | Optional | Items per page, 1–100. Default 25. |
cursorstringOptional- Opaque cursor from a previous response.
limitintegerOptional- Items per page, 1–100. Default 25.
curl https://api.rigsight.uz/v1/trucks \
-H "Authorization: Bearer rs_live_…"{
"data": [
{
"id": "trk_12",
"unit_number": "1045",
"vin": "1XKYD49X0LJ123456",
"make": "Kenworth",
"model": "T680",
"year": 2021,
"open_defects": 2,
"last_pti_at": "2026-11-28T09:16:51Z"
}
],
"next_cursor": null
}Possible errors
- 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the trucks:read scope. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Create a truck
/v1/trucksAdds a truck to your fleet. The number of active trucks is limited by your plan (see Usage).
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| unit_number | string | Required | Your fleet unit number. Unique within the fleet. |
| vin | string | Optional | 17-character VIN. |
| make | string | Optional | e.g. Freightliner. |
| model | string | Optional | e.g. Cascadia. |
| year | integer | Optional | Model year. |
unit_numberstringRequired- Your fleet unit number. Unique within the fleet.
vinstringOptional- 17-character VIN.
makestringOptional- e.g. Freightliner.
modelstringOptional- e.g. Cascadia.
yearintegerOptional- Model year.
curl https://api.rigsight.uz/v1/trucks \
-H "Authorization: Bearer rs_live_…" \
-H "Content-Type: application/json" \
-d '{ "unit_number": "1046", "vin": "3AKJHHDR5NSNA1234", "make": "Freightliner", "model": "Cascadia", "year": 2022 }'{
"id": "trk_13",
"unit_number": "1046",
"vin": "3AKJHHDR5NSNA1234",
"make": "Freightliner",
"model": "Cascadia",
"year": 2022,
"open_defects": 0,
"last_pti_at": null,
"created_at": "2026-11-28T10:02:11Z"
}Possible errors
- 400
invalid_requestMissing unit_number or malformed VIN. - 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the trucks:write scope. - 409
conflictA truck with this unit_number already exists. - 422
unprocessableYour plan's truck limit has been reached. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
List a truck's defects
/v1/trucks/{id}/defects?state=Returns defects found on a truck that are still open (not certified as repaired), including recurring ones — defects detected again in a later PTI. Use it to build a maintenance queue.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | Truck id (trk_…) or unit number. |
idstringRequired- Truck id (
trk_…) or unit number.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| state | enum | Optional | open (default), recurring (only recurring) or all (includes repaired). |
stateenumOptionalopen(default),recurring(only recurring) orall(includes repaired).
curl https://api.rigsight.uz/v1/trucks/trk_12/defects \
-H "Authorization: Bearer rs_live_…"{
"truck": { "id": "trk_12", "unit_number": "1045" },
"data": [
{
"id": "def_7782",
"component": "axle 2 right brake chamber",
"severity": "major",
"description": "Possible air leak: pushrod stroke indicator visible",
"recurring": true,
"occurrences": 3,
"first_seen_pti": "pti_71aa0c3e",
"last_seen_pti": "pti_9f2c41d7",
"first_seen_at": "2026-11-21T06:40:12Z",
"certified_at": null
}
]
}Possible errors
- 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the trucks:read scope. - 404
not_foundNo truck with this id in your fleet. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Certify a repair
/v1/defects/{id}/repairRecords that a defect has been repaired (the repair certification step of a DVIR). The defect stops counting as open and is no longer reported as recurring unless it is detected again later.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | Defect id (def_…). |
idstringRequired- Defect id (
def_…).
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| note | string | Required | What was done, e.g. part replaced. Up to 2,000 characters. |
| proof_media_id | string | Optional | Media id (med_…) of a photo of the repair, uploaded through the same signed-URL flow. |
| user | string | Optional | Your identifier of the mechanic certifying the repair. |
notestringRequired- What was done, e.g. part replaced. Up to 2,000 characters.
proof_media_idstringOptional- Media id (
med_…) of a photo of the repair, uploaded through the same signed-URL flow. userstringOptional- Your identifier of the mechanic certifying the repair.
curl https://api.rigsight.uz/v1/defects/def_7781/repair \
-H "Authorization: Bearer rs_live_…" \
-H "Content-Type: application/json" \
-d '{ "note": "Replaced left front steer tire (new tread 18/32\").", "proof_media_id": "med_02c4", "user": "mech.akmal" }'{
"id": "def_7781",
"certified_at": "2026-11-28T13:40:05Z",
"certified_by": "mech.akmal",
"note": "Replaced left front steer tire (new tread 18/32\").",
"proof_media_id": "med_02c4"
}Possible errors
- 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the reviews:write scope. - 404
not_foundNo defect with this id in your fleet. - 409
conflictThe defect is already certified as repaired. - 422
unprocessableproof_media_id is unknown, not a photo, or not uploaded yet. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Usage
Track plan consumption programmatically.
Get usage
/v1/usageReturns usage for the current calendar month (UTC). Test-key PTIs are not counted.
curl https://api.rigsight.uz/v1/usage \
-H "Authorization: Bearer rs_live_…"{
"period": "2026-11",
"pti_count": 412,
"truck_count": 38,
"truck_limit": 50,
"included_ptis": 1500,
"overage_ptis": 0
}Possible errors
- 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the usage:read scope. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Webhook endpoints
Manage where Rigsight sends events.
List webhook endpoints
/v1/webhooksReturns all webhook endpoints of your fleet. Secrets are never included.
curl https://api.rigsight.uz/v1/webhooks \
-H "Authorization: Bearer rs_live_…"{
"data": [
{
"id": "whk_3b9e",
"url": "https://tms.example.com/hooks/rigsight",
"events": ["pti.completed", "pti.out_of_service"],
"active": true,
"created_at": "2026-11-28T08:00:00Z"
}
],
"next_cursor": null
}Possible errors
- 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the webhooks:manage scope. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Create a webhook endpoint
/v1/webhooksRegisters an HTTPS URL to receive events. The response includes the signing secret (whsec_…) exactly once — store it to verify signatures. See Webhooks.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Required | Public HTTPS URL. Private IPs and plain HTTP are rejected. |
| events | string[] | Required | Any of pti.completed, pti.out_of_service, pti.reviewed, defect.recurring. |
| active | boolean | Optional | Default true. Inactive endpoints receive nothing. |
urlstringRequired- Public HTTPS URL. Private IPs and plain HTTP are rejected.
eventsstring[]Required- Any of
pti.completed,pti.out_of_service,pti.reviewed,defect.recurring. activebooleanOptional- Default true. Inactive endpoints receive nothing.
curl https://api.rigsight.uz/v1/webhooks \
-H "Authorization: Bearer rs_live_…" \
-H "Content-Type: application/json" \
-d '{ "url": "https://tms.example.com/hooks/rigsight", "events": ["pti.completed", "pti.out_of_service"] }'{
"id": "whk_3b9e",
"url": "https://tms.example.com/hooks/rigsight",
"events": ["pti.completed", "pti.out_of_service"],
"active": true,
"secret": "whsec_kP2v…",
"created_at": "2026-11-28T08:00:00Z"
}Possible errors
- 400
invalid_requestMissing url or events, or an unknown event name. - 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the webhooks:manage scope. - 422
unprocessableURL is not public HTTPS. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Retrieve a webhook endpoint
/v1/webhooks/{id}Returns one endpoint, with delivery statistics for the last 24 hours.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | Webhook id (whk_…). |
idstringRequired- Webhook id (
whk_…).
curl https://api.rigsight.uz/v1/webhooks/whk_3b9e \
-H "Authorization: Bearer rs_live_…"{
"id": "whk_3b9e",
"url": "https://tms.example.com/hooks/rigsight",
"events": ["pti.completed", "pti.out_of_service"],
"active": true,
"created_at": "2026-11-28T08:00:00Z",
"deliveries_24h": { "succeeded": 57, "failed": 1 }
}Possible errors
- 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the webhooks:manage scope. - 404
not_foundNo webhook with this id in your fleet. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Update a webhook endpoint
/v1/webhooks/{id}Changes the URL, the subscribed events or the active flag. Send only the fields you want to change. The secret does not change.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | Webhook id (whk_…). |
idstringRequired- Webhook id (
whk_…).
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Optional | New public HTTPS URL. |
| events | string[] | Optional | Replaces the event list. |
| active | boolean | Optional | Pause (false) or resume (true) deliveries. |
urlstringOptional- New public HTTPS URL.
eventsstring[]Optional- Replaces the event list.
activebooleanOptional- Pause (false) or resume (true) deliveries.
curl -X PATCH https://api.rigsight.uz/v1/webhooks/whk_3b9e \
-H "Authorization: Bearer rs_live_…" \
-H "Content-Type: application/json" \
-d '{ "events": ["pti.completed", "pti.out_of_service", "pti.reviewed"] }'{
"id": "whk_3b9e",
"url": "https://tms.example.com/hooks/rigsight",
"events": ["pti.completed", "pti.out_of_service", "pti.reviewed"],
"active": true,
"created_at": "2026-11-28T08:00:00Z"
}Possible errors
- 400
invalid_requestUnknown event name. - 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the webhooks:manage scope. - 404
not_foundNo webhook with this id in your fleet. - 422
unprocessableURL is not public HTTPS. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Delete a webhook endpoint
/v1/webhooks/{id}Deletes the endpoint and stops all pending retries for it. This cannot be undone.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | Webhook id (whk_…). |
idstringRequired- Webhook id (
whk_…).
curl -X DELETE https://api.rigsight.uz/v1/webhooks/whk_3b9e \
-H "Authorization: Bearer rs_live_…"{ "id": "whk_3b9e", "deleted": true }Possible errors
- 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the webhooks:manage scope. - 404
not_foundNo webhook with this id in your fleet. - 429
rate_limitedToo many requests; wait for Retry-After seconds.
Embed tokens
Short-lived browser tokens for the embed agent.
Create an embed token
/v1/embed-tokensServer-to-server only. Issues a short-lived rs_pub_… token for the embed agent, limited to one truck and the scopes you choose. The token expires after 15 minutes; issue a new one for each page view.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| truck | string | Required | Unit number or truck id the token is limited to. |
| scopes | string[] | Required | upload (driver uploads media), read (view results), review (record decisions). Your key needs embed:issue plus the matching API scopes. |
| locale | enum | Optional | en, ru or uz. Default en. |
| user | string | Optional | Who is using the page, e.g. their email or name (max 120). Review decisions made in the component are recorded under it. |
truckstringRequired- Unit number or truck id the token is limited to.
scopesstring[]Requiredupload(driver uploads media),read(view results),review(record decisions). Your key needsembed:issueplus the matching API scopes.localeenumOptionalen,ruoruz. Defaulten.userstringOptional- Who is using the page, e.g. their email or name (max 120). Review decisions made in the component are recorded under it.
curl https://api.rigsight.uz/v1/embed-tokens \
-H "Authorization: Bearer rs_live_…" \
-H "Content-Type: application/json" \
-d '{ "truck": "1045", "scopes": ["upload", "read"], "locale": "uz" }'{
"token": "rs_pub_Zx81…",
"truck": { "id": "trk_12", "unit_number": "1045" },
"scopes": ["upload", "read"],
"locale": "uz",
"expires_at": "2026-11-28T09:30:00Z"
}Possible errors
- 400
invalid_requestUnknown scope or locale. - 401
unauthorizedMissing, invalid or revoked API key. - 403
forbiddenThe key does not have the embed:issue (or a scope the key itself lacks) scope. - 404
not_foundNo truck with this id in your fleet. - 429
rate_limitedToo many requests; wait for Retry-After seconds.