API reference

Context API

Object context: the markdown AGENTS.md of an organization, project, screen, playlist, page, card, media item or web app

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

This group has 10 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.

Object context: the markdown AGENTS.md of an organization, project, screen, playlist, page, card, media item or web app

GET/api/context

List Object Contexts

Every object of the project that has a context, newest change first, with its name; the organization's context comes first on the first page when it has one (read-only here; an organization admin person changes it under /api/organizations/{org_id}/context).

An object that no longer exists is left out, so a page can hold fewer than limit items while next_cursor still leads on. type filters to one object type. An agent limited to screens lists only its own screens', the project's and the organization's contexts. It does not count toward the hourly agent requests of the organization.

Authentication
projectBearer OR dashboardSession
Request body
none
Operation ID
listObjectContexts

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.
typequeryoptional
afterqueryoptionalnext_cursor of the previous page.
limitqueryoptional
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/context'

Responses

StatusMeaningBody and headers
200The objects with context.ObjectContextList (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/context/{type}/{id}

Get Object Context

One object's context, an AGENTS.md for it, with the non-empty contexts of its parents from the top in chain (organization, then project). context is null and revision 0 when the object has none. A playlist or media item of the organization Library reads the Library project's context and chain, with read_only true.

An unknown object is not_found; a type other than project, screen, playlist, card, media or application is not_found (a page and an organization have their own paths). An agent limited to screens reads its own screens' and the project's context; anything else is outside_screen_scope (403).

It does not count toward the hourly agent requests of the organization.

Authentication
projectBearer OR dashboardSession
Request body
none
Operation ID
getObjectContext

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.
typepathrequiredThe object type. A page's context is under /api/playlists/{id}/pages/{page_id}/context, the organization's under /api/organizations/{org_id}/context.
idpathrequired
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/context/TYPE/RESOURCE_ID'

Responses

StatusMeaningBody and headers
200The object's context.ObjectContext (application/json)
403

outside_screen_scope - the caller is limited to screens and the screen, screen folder, selector or audience the request names or reaches is outside them (docs/screen-scope.md). An id outside the scope and an id that does not exist get the same answer; errors[0].screen_scope carries the caller's scope, and the write is refused whole, never narrowed.

Problem (application/problem+json)
404

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)
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/context/{type}/{id}

Set Object Context

Writes the object's context, replacing the whole text; an empty or whitespace-only context deletes it. At most 8 KiB of UTF-8 (32 KiB for a project), else context_too_large; credential-shaped text is context_contains_credential and nothing is stored.

If-Match (optional) names the revision the text replaces, 0 when the object has none; a mismatch is revision_conflict (412) with current_revision. The replaced text is kept in the history for 365 days. Needs Manage access; a person needs to be the owner or a member who can approve. An object of the organization Library is insufficient_access (403) here.

Appends context.updated without the text. An agent limited to screens writes only its own screens' context.

Authentication
projectBearer OR dashboardSession
Request body
ObjectContextWrite
Operation ID
setObjectContext

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.
typepathrequiredThe object type. A page's context is under /api/playlists/{id}/pages/{page_id}/context, the organization's under /api/organizations/{org_id}/context.
idpathrequired
If-MatchheaderoptionalThe revision the write replaces; 0 when the object has no context. Omit for an unconditional write.

Request body fields

FieldDescription
context (required, string)The whole markdown text; empty deletes it. At most 8 KiB of UTF-8, 32 KiB for a project or an organization. maxLength: 32768
Request template and responses
shell · request template
curl --request PUT --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt --header 'Content-Type: application/json' --data '@request.json' 'https://api.screenrig.ai/api/context/TYPE/RESOURCE_ID'

Responses

StatusMeaningBody and headers
200The object's context after the write.ObjectContext (application/json)
403

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)
404

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)
412

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)
422

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)
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/context/{type}/{id}

Delete Object Context

Deletes the object's context, keeping its text in the history; as PUT with an empty context. An object without one answers 204 too. If-Match as for PUT.

Authentication
projectBearer OR dashboardSession
Request body
none
Operation ID
deleteObjectContext

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.
typepathrequiredThe object type. A page's context is under /api/playlists/{id}/pages/{page_id}/context, the organization's under /api/organizations/{org_id}/context.
idpathrequired
If-MatchheaderoptionalThe revision the write replaces; 0 when the object has no context. Omit for an unconditional write.
Request template and responses
shell · request template
curl --request DELETE --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://api.screenrig.ai/api/context/TYPE/RESOURCE_ID'

Responses

StatusMeaningBody and headers
204The object has no context.no body
403

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)
404

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)
412

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)
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/context/{type}/{id}/history

List Object Context History

The object's context revisions, newest first, the current text first; replaced and deleted texts stay for 365 days. Pass next_cursor as after for the next page.

Authentication
projectBearer OR dashboardSession
Request body
none
Operation ID
listObjectContextHistory

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.
typepathrequiredThe object type. A page's context is under /api/playlists/{id}/pages/{page_id}/context, the organization's under /api/organizations/{org_id}/context.
idpathrequired
afterqueryoptionalnext_cursor of the previous page.
limitqueryoptional
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/context/TYPE/RESOURCE_ID/history'

Responses

StatusMeaningBody and headers
200The revisions.ObjectContextHistory (application/json)
403

outside_screen_scope - the caller is limited to screens and the screen, screen folder, selector or audience the request names or reaches is outside them (docs/screen-scope.md). An id outside the scope and an id that does not exist get the same answer; errors[0].screen_scope carries the caller's scope, and the write is refused whole, never narrowed.

Problem (application/problem+json)
404

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)
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/playlists/{id}/pages/{page_id}/context

Get Page Context

One page's context (type page, parent_id the playlist), with its chain (organization, project, playlist). Otherwise as getObjectContext; a page of a Library playlist reads the Library project's.

Authentication
projectBearer OR dashboardSession
Request body
none
Operation ID
getPageContext

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.
idpathrequired
page_idpathrequiredPlaylist page id string.
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/playlists/RESOURCE_ID/pages/PAGE_ID/context'

Responses

StatusMeaningBody and headers
200The page's context.ObjectContext (application/json)
403

outside_screen_scope - the caller is limited to screens and the screen, screen folder, selector or audience the request names or reaches is outside them (docs/screen-scope.md). An id outside the scope and an id that does not exist get the same answer; errors[0].screen_scope carries the caller's scope, and the write is refused whole, never narrowed.

Problem (application/problem+json)
404

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)
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/playlists/{id}/pages/{page_id}/context

Set Page Context

Writes one page's context; as setObjectContext (8 KiB).

Authentication
projectBearer OR dashboardSession
Request body
ObjectContextWrite
Operation ID
setPageContext

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.
idpathrequired
page_idpathrequiredPlaylist page id string.
If-MatchheaderoptionalThe revision the write replaces; 0 when the object has no context. Omit for an unconditional write.

Request body fields

FieldDescription
context (required, string)The whole markdown text; empty deletes it. At most 8 KiB of UTF-8, 32 KiB for a project or an organization. maxLength: 32768
Request template and responses
shell · request template
curl --request PUT --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt --header 'Content-Type: application/json' --data '@request.json' 'https://api.screenrig.ai/api/playlists/RESOURCE_ID/pages/PAGE_ID/context'

Responses

StatusMeaningBody and headers
200The page's context after the write.ObjectContext (application/json)
403

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)
404

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)
412

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)
422

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)
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/playlists/{id}/pages/{page_id}/context

Delete Page Context

Deletes one page's context; as deleteObjectContext.

Authentication
projectBearer OR dashboardSession
Request body
none
Operation ID
deletePageContext

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.
idpathrequired
page_idpathrequiredPlaylist page id string.
If-MatchheaderoptionalThe revision the write replaces; 0 when the object has no context. Omit for an unconditional write.
Request template and responses
shell · request template
curl --request DELETE --header 'Authorization: Bearer [SCREENRIG_TOKEN]' --cookie cookies.txt --cookie-jar cookies.txt 'https://api.screenrig.ai/api/playlists/RESOURCE_ID/pages/PAGE_ID/context'

Responses

StatusMeaningBody and headers
204The page has no context.no body
403

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)
404

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)
412

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)
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/playlists/{id}/pages/{page_id}/context/history

List Page Context History

One page's context revisions, newest first; as listObjectContextHistory.

Authentication
projectBearer OR dashboardSession
Request body
none
Operation ID
listPageContextHistory

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.
idpathrequired
page_idpathrequiredPlaylist page id string.
afterqueryoptionalnext_cursor of the previous page.
limitqueryoptional
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/playlists/RESOURCE_ID/pages/PAGE_ID/context/history'

Responses

StatusMeaningBody and headers
200The revisions.ObjectContextHistory (application/json)
403

outside_screen_scope - the caller is limited to screens and the screen, screen folder, selector or audience the request names or reaches is outside them (docs/screen-scope.md). An id outside the scope and an id that does not exist get the same answer; errors[0].screen_scope carries the caller's scope, and the write is refused whole, never narrowed.

Problem (application/problem+json)
404

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)
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/projects/{project_id}/context

List Object Contexts In Project

listObjectContexts for the project in the path.

Authentication
projectBearer
Request body
none
Operation ID
listObjectContextsInProject

Parameters

NameSend inRequired?Description
project_idpathrequired
typequeryoptional
afterqueryoptionalnext_cursor of the previous page.
limitqueryoptional
Request template and responses
shell · request template
curl --request GET --header 'Authorization: Bearer [SCREENRIG_TOKEN]' 'https://api.screenrig.ai/api/projects/PROJECT_ID/context'

Responses

StatusMeaningBody and headers
200The objects with context.ObjectContextList (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)