Skip to main content
POST
Start agent run

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.

Headers

Idempotency-Key
string
required

Reuse this key with identical inputs when retrying. Use a new key for a new operation.

Required string length: 1 - 200
Pattern: ^[A-Za-z0-9_.:-]+$
Example:

"review-123-v1"

Path Parameters

app_id
string
required

The imported app whose connected repository the agent may read.

Pattern: ^[a-f0-9]{24}$
Example:

"6820f3a4e7b91d003c45a1f1"

Body

application/json
deployment_id
string
required

The deployed agent version to run.

Pattern: ^[a-f0-9]{24}$
base_sha
string
required

Exact base commit, never a branch name.

Pattern: ^[0-9a-f]{40}$
head_sha
string
required

Exact head commit to analyze.

Pattern: ^[0-9a-f]{40}$
source
ChangeSource · object | null

Optional change source whose current base and head must match. Required to publish a review.

Response

Successful Response

id
string
required
deployment_id
string
required
status
enum<string>
required
Available options:
queued,
running,
cancelling,
cancelled,
succeeded,
failed,
timed_out
error_code
string | null
required
base_sha
string
required
head_sha
string
required
source
ChangeSource · object | null
required
package_digest
string
required
created_date
string
required
started_at
string | null
required
finished_at
string | null
required
result
Result · object | null
required

Validated output, source identity and coverage. Available for 30 days. Never the full source snapshot.

usage
Usage · object | null
required

Observed tokens, duration and provider cost where available. Null means unmeasured, not zero.