Overview

The Beta Deployments API lets you turn an agent into a scheduled service. A deployment binds an agent to a cron expression and tracks every execution in a separate run history. The scheduler recomputes next_run_at whenever a deployment is created, updated, or triggered. All deployment routes are mounted under /api/v1/beta/deployments and require a valid bearer token via the platform auth middleware.

Base URL

For local development the API server is typically available at:

Authentication

All requests must include a valid bearer token in the Authorization header. See Authentication for details.

Deployment object

Run object

Endpoints

List deployments

Returns all deployments owned by the authenticated user, newest first.

Query parameters

Example request

Example response

Create a deployment

Creates a new deployment. The deployment defaults to active and next_run_at is computed from the provided cron expression.

Request body

Example request

Example response

Get a deployment

Returns the full deployment record.

Example request

Example response

Update a deployment

Partial update using COALESCE semantics: omitted fields keep their current values. At least one field must be provided. The next_run_at field is recomputed on every update, even if only status changes.

Request body

Example request

Example response

Delete a deployment

Deletes the deployment and cascades to its run history.

Example request

Returns 204 No Content with no response body.

List runs

Returns all run records for a deployment, newest first.

Example request

Example response

Trigger a run

Manually enqueue a run and advance the deployment’s schedule. This is useful for testing or forcing an out-of-cycle execution. The run is created with status running, and the deployment’s last_run_at and next_run_at are updated.

Example request

Example response

Update a run

Report the terminal outcome of a run. Only terminal statuses are accepted: succeeded, failed, or cancelled.

Request body

Example request

Example response

A successful run update may also trigger a webhook delivery for deployment.run.updated. See Webhooks for details.

Error codes