# API reference

> Every endpoint, generated from the OpenAPI document, with a curl example for each.

Generated from the OpenAPI 3.1 document the server publishes, which comes from the schemas the routes validate with, so what is listed here is what the API accepts. Base URL `https://api.raylight.app`. Raw document: [https://api.raylight.app/v1/openapi.json](https://api.raylight.app/v1/openapi.json).

Authenticated calls take `Authorization: Bearer rl_live_...` with the scope named on each operation; a few need no scope. Every non-2xx body is `{ "error": "...", "code": "..." }`; validation failures add `issues`. Success bodies are listed field by field under each operation.

The event Raylight sends to your webhook endpoints is here too, under Webhooks: its headers, every payload field, and what your answer means.

## Operations

### Productions

- [GET /v1/productions: List productions](https://www.raylight.app/docs/reference/get-v1-productions.md)
- [POST /v1/productions: Create a production](https://www.raylight.app/docs/reference/post-v1-productions.md)
- [GET /v1/productions/usage: This month's usage and pitch cap](https://www.raylight.app/docs/reference/get-v1-productions-usage.md)
- [GET /v1/productions/{id}: Read a production](https://www.raylight.app/docs/reference/get-v1-productions-id.md)
- [POST /v1/productions/{id}/greenlight: Greenlight the pitch](https://www.raylight.app/docs/reference/post-v1-productions-id-greenlight.md)
- [POST /v1/productions/{id}/comments: Send comments](https://www.raylight.app/docs/reference/post-v1-productions-id-comments.md)
- [POST /v1/productions/{id}/decline: Decline the pitch](https://www.raylight.app/docs/reference/post-v1-productions-id-decline.md)
- [POST /v1/productions/{id}/cancel: Cancel a production](https://www.raylight.app/docs/reference/post-v1-productions-id-cancel.md)

### Webhooks

- [GET /v1/webhooks: List webhook endpoints](https://www.raylight.app/docs/reference/get-v1-webhooks.md)
- [POST /v1/webhooks: Create a webhook endpoint](https://www.raylight.app/docs/reference/post-v1-webhooks.md)
- [GET /v1/webhooks/{id}: Read a webhook endpoint](https://www.raylight.app/docs/reference/get-v1-webhooks-id.md)
- [PATCH /v1/webhooks/{id}: Update a webhook endpoint](https://www.raylight.app/docs/reference/patch-v1-webhooks-id.md)
- [DELETE /v1/webhooks/{id}: Delete a webhook endpoint](https://www.raylight.app/docs/reference/delete-v1-webhooks-id.md)
- [POST /v1/webhooks/{id}/roll-secret: Roll the signing secret](https://www.raylight.app/docs/reference/post-v1-webhooks-id-roll-secret.md)
- [POST /v1/webhooks/{id}/test: Send a test event](https://www.raylight.app/docs/reference/post-v1-webhooks-id-test.md)
- [GET /v1/webhooks/{id}/deliveries: List deliveries](https://www.raylight.app/docs/reference/get-v1-webhooks-id-deliveries.md)
- [POST /v1/webhooks/{id}/deliveries/{deliveryId}/redeliver: Redeliver an event](https://www.raylight.app/docs/reference/post-v1-webhooks-id-deliveries-deliveryid-redeliver.md)
- [POST your endpoint URL: A production event, delivered to your endpoint](https://www.raylight.app/docs/reference/webhook-production-event.md)

### Greenlight links

- [GET /production-links/{token}: Read a signed greenlight link](https://www.raylight.app/docs/reference/get-production-links-token.md)
- [POST /production-links/{token}/greenlight: Greenlight through a link](https://www.raylight.app/docs/reference/post-production-links-token-greenlight.md)
- [POST /production-links/{token}/comments: Send comments through a link](https://www.raylight.app/docs/reference/post-production-links-token-comments.md)
- [POST /production-links/{token}/decline: Decline through a link](https://www.raylight.app/docs/reference/post-production-links-token-decline.md)

### API keys

- [POST /v1/keys/request: Start a device-code key request](https://www.raylight.app/docs/reference/post-v1-keys-request.md)
- [POST /v1/keys/poll: Poll a key request](https://www.raylight.app/docs/reference/post-v1-keys-poll.md)
- [DELETE /v1/keys/current: Revoke the key making the call](https://www.raylight.app/docs/reference/delete-v1-keys-current.md)

### Renders

- [POST /v1/renders: Render images into a video](https://www.raylight.app/docs/reference/post-v1-renders.md)
- [GET /v1/renders/{id}: Read a render](https://www.raylight.app/docs/reference/get-v1-renders-id.md)

## More

- Next: [List productions](https://www.raylight.app/docs/reference/get-v1-productions.md)
- All docs: https://www.raylight.app/llms.txt
- Everything in one file: https://www.raylight.app/llms-full.txt
- OpenAPI: https://api.raylight.app/v1/openapi.json
