Skip to content
OperadeDocs

Search documentation

Type to search documentation.

Documentation
Copy page
Open raw Markdown

Update an agent branch

Rename, describe, protect, archive, or restore an agent branch when permitted.

Endpoint

PATCH/api/v1/workspaces/{workspace_id}/agents/{agent_id}/branches/{branch_id}

Authentication

Operation classAuthenticationMinimum roleAPI key
customer-apiBearer API key or dashboard session cookie; dashboard mutations also require X-CX-Request: 1.memberAllowed

Parameters

NameInTypeRequiredDescription
workspace_idpathstringYes—
agent_idpathstringYes—
branch_idpathstringYes—

Request body

application/json request schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectPermintaanUbahBranch—NoYes——
archivedboolean or null——YesNo——
descriptionstring or null——YesNo——
is_protectedboolean or null——YesNo——
namestring or null——YesNo——

Example

cURL
curl --request PATCH 'https://operade.ai/api/v1/workspaces/ws_demo/agents/agt_demo/branches/br_demo' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"description":"Updated example branch"}'
Request body JSON
{
  "description": "Updated example branch"
}

Responses

StatusDescriptionContent
4XXHandled client errorapplication/json: ErrorResponse
200Successful Responseapplication/json: AgentBranch

4XX application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectErrorResponse—NoYes——
errorobjectErrorItem—NoYes——
error.codestring——NoYes——
error.detailsobject——NoNo——
error.messagestring——NoYes——

200 application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectAgentBranch—NoYes——
archived_atstring or null—date-timeYesYes——
conversations_7dinteger——NoYes——
created_atstring—date-timeNoYes——
created_byobjectNamedActor—NoYes——
created_by.emailstring——NoYes——
created_by.idstring——NoYes——
created_by.namestring——NoYes——
descriptionstring——NoYes——
has_draftboolean——NoYes——
idstring——NoYes——
is_liveboolean——NoYes——
is_mainboolean——NoYes——
is_protectedboolean——NoYes——
namestring——NoYes——
statusstring——NoYes"Main", "Up to date", "Behind Main"—
tip_version_idstring——NoYes——
traffic_percentagenumber——NoYes——
updated_atstring—date-timeNoYes——

Response example

Response body JSON
{
  "id": "string",
  "name": "string",
  "description": "string",
  "is_main": false,
  "is_protected": false,
  "traffic_percentage": 0,
  "tip_version_id": "string",
  "created_at": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-01T00:00:00Z",
  "archived_at": "2026-01-01T00:00:00Z",
  "created_by": {
    "id": "string",
    "name": "string",
    "email": "string"
  },
  "conversations_7d": 0,
  "has_draft": false,
  "is_live": false,
  "status": "Main"
}

Errors

Reviewed common and route-declared errors are summarized here; the list is not exhaustive. Start with the distributed error index to find each code's canonical domain page.

StatusCodeDescription
401unauthenticatedAuthentication is missing, invalid, or revoked.
403forbiddenThe authenticated caller does not have access to this operation.
404not_foundThe requested workspace resource was not found.
422validation_failedThe request did not pass field or business validation.
On this page
  1. Endpoint
  2. Authentication
  3. Parameters
  4. Request body
  5. application/json request schema
  6. Example
  7. Responses
  8. 4XX application/json response schema
  9. 200 application/json response schema
  10. Response example
  11. Errors
  12. Related operations