OpenAPI YAMLOpenAPI JSONproblems YAMLAPI overview
This group has 1 operation, 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.
Website setup codes
Get the visitor's setup code
Anonymous same-origin call from the website's agent prompts. Answers the setup code of the request's first-party visitor cookie (sr_vid), minting it the first time: the same visitor gets the same code while it is valid (90 days from minting).
A person pastes it into their agent with the setup prompt and the agent passes it to CLI enrollment, which links the new project to that visit. Requires the website Origin. A request without exactly one well-formed visitor cookie answers 204 and mints nothing. The code grants nothing; it only names a visit.
At most 60 new codes per client IP per hour (IPv6 grouped by /64); all requests share a 120-per-IP-per-minute limit. Retry-After is authoritative.
Parameters
| Name | Send in | Required? | Description |
|---|---|---|---|
| Origin | header | required |
Request template and responses
curl --request POST --header 'Origin: https://screenrig.ai' 'https://screenrig.ai/website/setup-codes'Responses
| Status | Meaning | Body and headers |
|---|---|---|
| 200 | The visitor's setup code. | WebsiteSetupCode (application/json); headers: Cache-Control |
| 204 | The request carried no visitor cookie, so there is no visit to name. | no body; headers: Cache-Control |
| 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) |