Skip to main content
PATCH
/
v2
/
agents
Update an agent (simplified)
curl --request PATCH \
  --url https://api.plugit.chat/v2/agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "title": "<string>",
  "prompt": "<string>",
  "knowledge": "<string>",
  "tools": [
    {
      "type": "customApi",
      "customApi": {
        "endpoints": [
          {}
        ]
      }
    }
  ],
  "delay": 123,
  "categories": [
    {
      "title": "<string>",
      "criteria": "<string>",
      "webhook": {
        "url": "<string>",
        "headers": {
          "x-api-key": "your-secret"
        }
      },
      "disableAI": true
    }
  ],
  "version": "<string>",
  "enabled": true,
  "default_language": "<string>",
  "external_id": "<string>"
}
'
{
  "id": "<string>",
  "title": "<string>",
  "version": "<string>",
  "enabled": true,
  "default_language": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "prompt": "<string>",
  "knowledge": "<string>",
  "tools": [
    {
      "type": "customApi",
      "customApi": {
        "endpoints": [
          {}
        ]
      }
    }
  ],
  "delay": 123,
  "categories": [
    {
      "title": "<string>",
      "criteria": "<string>",
      "webhook": {
        "url": "<string>",
        "headers": {
          "x-api-key": "your-secret"
        }
      },
      "disableAI": true
    }
  ],
  "external_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Provide to make POST/PATCH requests idempotent within 24h.

Maximum string length: 128

Body

application/json

Update an agent by id. This simplified API accepts the id in the payload.

id
string
required
title
string
prompt
string | null
knowledge
string | null
tools
object[]
delay
number | null
categories
object[]
version
string
enabled
boolean
default_language
string
external_id
string | null

Response

Updated

id
string
required
title
string
required
version
string
required
enabled
boolean
default:true
required
default_language
string
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
prompt
string | null
knowledge
string | null
tools
object[]

Configured tools for this agent.

delay
number | null
categories
object[]

Conversation categories and routing rules.

external_id
string | null