Agents Platform

Update Agent Branch

Changed on

Update agent branch properties such as name, description, archiving status, protection level, and auto-rebase onto main

patch/v1/convai/agents/{agent_id}/branches/{branch_id}

Request

Path parameters

agent_idstring required

The id of an agent. This is returned on agent creation.

Example:agent_3701k3ttaq12ewp8b7qv5rfyszkz
branch_idstring required

Unique identifier for the branch.

Example:agtbranch_0901k4aafjxxfxt93gd841r7tv5t

Headers

xi-api-keystring nullable

Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

Request body

namestring nullable

New name for the branch. Must be unique within the agent.

descriptionstring nullable

New description for the branch. Pass an empty string to clear it.

is_archivedboolean nullable

Whether the branch should be archived

protection_status'writer_perms_required' | 'admin_perms_required'
auto_rebaseboolean nullable

When true, rebase this branch onto main automatically after each new main version. Cannot be enabled on the main branch.

Response

Successful Response

idstring required
namestring required
agent_idstring required
descriptionstring required
created_atinteger required
last_committed_atinteger required
is_archivedboolean required
protection_status'writer_perms_required' | 'admin_perms_required'
auto_rebaseboolean
current_live_percentagenumber

Percentage of traffic live on the branch

Example response

{
  "access_info": {
    "access_source": "creator",
    "creator_email": "john.doe@example.com",
    "creator_name": "John Doe",
    "is_creator": true,
    "role": "admin"
  },
  "most_recent_versions": [
    {
      "access_info": {
        "access_source": "creator",
        "creator_email": "john.doe@example.com",
        "creator_name": "John Doe",
        "is_creator": true,
        "role": "admin"
      },
      "merged_authors": [
        {
          "access_source": "creator",
          "creator_email": "john.doe@example.com",
          "creator_name": "John Doe",
          "is_creator": true,
          "role": "admin"
        }
      ]
    }
  ]
}

Changes