API reference

Key/value storage API

Application key/value storage

HTTP reference. Generated from the backend contract. Browse endpoints below or download OpenAPI.

This group has 9 operations, generated from api/openapi.yaml. Filter by path, action, or authentication. Each endpoint lists its inputs; expand it for a request template and response codes. Templates need your own values and a schema-valid body.

Replace uppercase placeholders with your values. For a JSON request, save a body matching the schema in request.json. Cookie examples use a local cookie jar from an authenticated session.

Application key/value storage

GET/api/applications/{application_id}/kv

List KV

Returns at most 200 entries in ascending key order. next_cursor is the last returned key; pass it back as after to fetch the next page. next_cursor is null when there are no more entries. A dashboard session reads its project's entries here for the web app preview; the dashboard has no KV write.

Authentication
projectBearer OR dashboardSession
Request body
none
Operation ID
listKV

Parameters

NameSend inRequired?Description
ScreenRig-ProjectheaderoptionalDeprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange.
application_idpathrequired
afterqueryoptional
Request template and responses
shell · request template
curl --request GET --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://api.screenrig.ai/api/applications/APPLICATION_ID/kv'

Responses

StatusMeaningBody and headers
200KV entriesKVList (application/json)
default

Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value.

Problem (application/problem+json)
GET/api/applications/{application_id}/kv/{key}

Get KV

Authentication
projectBearer OR dashboardSession
Request body
none
Operation ID
getKV

Parameters

NameSend inRequired?Description
ScreenRig-ProjectheaderoptionalDeprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange.
application_idpathrequired
keypathrequired
Request template and responses
shell · request template
curl --request GET --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://api.screenrig.ai/api/applications/APPLICATION_ID/kv/KEY'

Responses

StatusMeaningBody and headers
200KV entryKVEntry (application/json)
default

Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value.

Problem (application/problem+json)
PUT/api/applications/{application_id}/kv/{key}

Put KV

Authentication
projectBearer
Request body
KVWrite
Operation ID
putKV

Parameters

NameSend inRequired?Description
ScreenRig-ProjectheaderoptionalDeprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange.
application_idpathrequired
keypathrequired
If-MatchheaderoptionalOptional positive resource revision. Omit to create or overwrite a key; a supplied stale revision is revision_conflict.
Idempotency-KeyheaderoptionalOmit for a fresh operation. Supply and reuse a key to deduplicate retries; the CLI manages keys automatically.

Request body fields

FieldDescription
value_base64 (required, string)maxLength: 1398104
content_type (optional, string)default: "application/octet-stream" minLength: 1 maxLength: 127
Request template and responses
shell · request template
curl --request PUT --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --header 'Content-Type: application/json' --data '@request.json' 'https://api.screenrig.ai/api/applications/APPLICATION_ID/kv/KEY'

Responses

StatusMeaningBody and headers
200KV entryKVEntry (application/json)
429

Stable rate_limited problem. Retry only after the authoritative Retry-After interval. Fixed-window denials also include the applicable RateLimit-Policy and RateLimit members; concurrency and byte-budget denials omit those optional disclosures.

Problem (application/problem+json); headers: Retry-After, RateLimit-Policy, RateLimit
default

Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value.

Problem (application/problem+json)
DELETE/api/applications/{application_id}/kv/{key}

Delete KV

Authentication
projectBearer
Request body
none
Operation ID
deleteKV

Parameters

NameSend inRequired?Description
ScreenRig-ProjectheaderoptionalDeprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange.
application_idpathrequired
keypathrequired
If-MatchheaderoptionalOptional positive resource revision. Omit to write the current resource; a supplied stale revision is revision_conflict.
Idempotency-KeyheaderoptionalOmit for a fresh operation. Supply and reuse a key to deduplicate retries; the CLI manages keys automatically.
Request template and responses
shell · request template
curl --request DELETE --header 'Authorization: Bearer [SCREENRIG_TOKEN]' 'https://api.screenrig.ai/api/applications/APPLICATION_ID/kv/KEY'

Responses

StatusMeaningBody and headers
204Deletedno body
default

Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value.

Problem (application/problem+json)
GET/api/applications/{application_id}/kv-webhooks

List KVWebhooks

Lists the application's incoming key/value webhooks, oldest first (at most 20), each with the key it writes, its ingest url and last_used_at once it has written. The secret is never returned here.

Authentication
projectBearer
Request body
none
Operation ID
listKVWebhooks

Parameters

NameSend inRequired?Description
ScreenRig-ProjectheaderoptionalDeprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange.
application_idpathrequired
Request template and responses
shell · request template
curl --request GET --header 'Authorization: Bearer [SCREENRIG_TOKEN]' 'https://api.screenrig.ai/api/applications/APPLICATION_ID/kv-webhooks'

Responses

StatusMeaningBody and headers
200The application's key/value webhooks.KVWebhookList (application/json)
default

Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value.

Problem (application/problem+json)
POST/api/applications/{application_id}/kv-webhooks

Create KVWebhook

Creates an incoming key/value webhook: one URL that writes one key of this application, so an outside system (Zapier, Make, a point of sale, a cron job, curl) pushes data to screens with one HTTP POST; see POST /api/applications/{application_id}/kv-webhooks/{webhook_id}/write. The key need not exist yet.

The answer is the only place the secret appears (with the rotate answer): store it in the sending system at once; the server keeps a digest. An application has at most 20 webhooks (kv_webhook_limit_reached). Appends kv_webhook.created. An exact retry with the same Idempotency-Key returns this same answer, secret included, for twenty-four hours.

Authentication
projectBearer
Request body
KVWebhookCreate
Operation ID
createKVWebhook

Parameters

NameSend inRequired?Description
ScreenRig-ProjectheaderoptionalDeprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange.
application_idpathrequired
Idempotency-KeyheaderoptionalOmit for a fresh operation. Supply and reuse a key to deduplicate retries; the CLI manages keys automatically.

Request body fields

FieldDescription
key (required, string)minLength: 1 maxLength: 256 pattern: "^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$"
description (optional, string)What sends to it, for the people reading the list. Trimmed; it must not hold a credential. maxLength: 200
Request template and responses
shell · request template
curl --request POST --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --header 'Content-Type: application/json' --data '@request.json' 'https://api.screenrig.ai/api/applications/APPLICATION_ID/kv-webhooks'

Responses

StatusMeaningBody and headers
201Created, with its url and secret.KVWebhookWithSecret (application/json); headers: Cache-Control
400invalid_request, including a malformed key or a description that holds a credential.Problem (application/problem+json)
404not_found — the application is not in this project.Problem (application/problem+json)
409kv_webhook_limit_reached or idempotency_mismatch.Problem (application/problem+json)
default

Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value.

Problem (application/problem+json)
DELETE/api/applications/{application_id}/kv-webhooks/{webhook_id}

Delete KVWebhook

Deletes the webhook. Its URL stops working at once; the key it wrote keeps its value. Appends kv_webhook.deleted.

Authentication
projectBearer
Request body
none
Operation ID
deleteKVWebhook

Parameters

NameSend inRequired?Description
ScreenRig-ProjectheaderoptionalDeprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange.
application_idpathrequired
webhook_idpathrequiredThe id of one of the application's key/value webhooks.
Idempotency-KeyheaderoptionalOmit for a fresh operation. Supply and reuse a key to deduplicate retries; the CLI manages keys automatically.
Request template and responses
shell · request template
curl --request DELETE --header 'Authorization: Bearer [SCREENRIG_TOKEN]' 'https://api.screenrig.ai/api/applications/APPLICATION_ID/kv-webhooks/WEBHOOK_ID'

Responses

StatusMeaningBody and headers
204Deleted.no body
404not_found — the webhook is not on this application.Problem (application/problem+json)
default

Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value.

Problem (application/problem+json)
POST/api/applications/{application_id}/kv-webhooks/{webhook_id}/rotate-secret

Rotate KVWebhook Secret

Replaces the webhook's secret and returns the new one, once. The old secret stops working at once; update the sending system. Appends kv_webhook.secret_rotated. An exact retry with the same Idempotency-Key returns this same answer, secret included, for twenty-four hours.

Authentication
projectBearer
Request body
none
Operation ID
rotateKVWebhookSecret

Parameters

NameSend inRequired?Description
ScreenRig-ProjectheaderoptionalDeprecated for one release. Must be consistent with the JWT projects grants; adds Deprecation and Warning headers. No token exchange.
application_idpathrequired
webhook_idpathrequiredThe id of one of the application's key/value webhooks.
Idempotency-KeyheaderoptionalOmit for a fresh operation. Supply and reuse a key to deduplicate retries; the CLI manages keys automatically.
Request template and responses
shell · request template
curl --request POST --header 'Authorization: Bearer [SCREENRIG_TOKEN]' 'https://api.screenrig.ai/api/applications/APPLICATION_ID/kv-webhooks/WEBHOOK_ID/rotate-secret'

Responses

StatusMeaningBody and headers
200The webhook with its new secret.KVWebhookWithSecret (application/json); headers: Cache-Control
404not_found — the webhook is not on this application.Problem (application/problem+json)
default

Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value.

Problem (application/problem+json)
POST/api/applications/{application_id}/kv-webhooks/{webhook_id}/write

Receive KVWebhook

The URL an outside system posts one key's new value to. It authenticates with the webhook's own secret in the Authorization header only: Bearer <secret>, or HTTP Basic with the webhook id as the username and the secret as the password. A secret in the URL or query is never accepted.

An unknown webhook, one of another application and a wrong secret all answer the same 401. The raw body, at most 1 MiB, becomes the value of the webhook's key, and the Content-Type header its content_type (application/octet-stream when absent; a header that is not one media type is invalid_request).

The write is PUT /api/applications/{application_id}/kv/{key} without If-Match: it replaces the value, increments the revision, is metered and quota-checked like any K/V write, is one billed API request that is never refused for balance, and appends kv.updated.

Idempotency-Key (8 to 200 characters) deduplicates a sender's retries of one write for twenty-four hours, and the same key with another body or content type is idempotency_mismatch; without it every post is a new write. The answer is the key's new metadata, never its value.

At most 120 writes per minute per webhook; each also counts toward the organization's and the key's write rates (PUT /api/card-data/{key}).

Authentication
kvWebhookBearer OR kvWebhookBasic
Request body
string
Operation ID
receiveKVWebhook

Parameters

NameSend inRequired?Description
application_idpathrequired
webhook_idpathrequiredThe id of one of the application's key/value webhooks.
Idempotency-KeyheaderoptionalOmit for a fresh operation. Supply and reuse a key to deduplicate retries; the CLI manages keys automatically.
Request template and responses
shell · request template
curl --request POST --header 'Content-Type: */*' --data-binary '@request.bin' 'https://api.screenrig.ai/api/applications/APPLICATION_ID/kv-webhooks/WEBHOOK_ID/write'

Responses

StatusMeaningBody and headers
200The key's new metadata.KVWebhookWriteResult (application/json); headers: RateLimit-Policy, RateLimit, Cache-Control
400invalid_request — the body is larger than 1 MiB, the Content-Type is not one media type, or the Idempotency-Key is malformed.Problem (application/problem+json)
401unauthorized — missing or wrong credentials, or an unknown webhook. WWW-Authenticate names the Bearer and Basic realms.Problem (application/problem+json)
409idempotency_mismatch — the Idempotency-Key was used for another body or content type.Problem (application/problem+json)
429

Stable rate_limited problem. Retry only after the authoritative Retry-After interval. Fixed-window denials also include the applicable RateLimit-Policy and RateLimit members; concurrency and byte-budget denials omit those optional disclosures.

Problem (application/problem+json); headers: Retry-After, RateLimit-Policy, RateLimit
default

Stable RFC 9457 problem response. A 421 server_draining carries Retry-After of 1 second, a 500 not_ready or dependency_unavailable carries 5, and a 500 manifest_degraded carries 60, unless the handler set a more specific value.

Problem (application/problem+json)