Skip to main content
POST
/
v1
/
environments
/
{id}
/
rollback
Roll back an environment
curl --request POST \
  --url https://api.agentmark.co/v1/environments/{id}/rollback \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Agentmark-App-Id: <api-key>' \
  --data '
{
  "target_version": 1,
  "note": "<string>"
}
'
{
  "data": {
    "commit_sha": "<string>",
    "deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "env_version": 1
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.agentmark.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Agentmark-App-Id
string
header
required

Application ID for tenant scoping

Authorization
string
header
required

API key (sk_agentmark_*)

Path Parameters

id
string<uuid>
required

Body

application/json
target_version
integer
required
Required range: x > 0
note
string
Maximum string length: 2000

Response

Rollback ran — the snapshot was written, the env pointer was committed, and the build was dispatched.

data
object
required