Skip to main content
POST
/
agents
Create agent
curl --request POST \
  --url https://api.weav.com/v1/agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "avatar_url": "<string>",
  "max_messages_per_session": 500,
  "tone": "<string>",
  "response_length": "<string>",
  "is_active": true
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "slug": "<string>",
  "description": "<string>",
  "avatar_url": "<string>",
  "max_messages_per_session": 123,
  "tone": "<string>",
  "response_length": "<string>",
  "is_active": true,
  "is_copilot": true,
  "prohibited_phrases": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "phrase": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "escalation_rules": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "channel": "<string>",
      "rule": "<string>",
      "escalate_to": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Workspace API token. Include abilities external-api:read and/or external-api:write.

Body

application/json
name
string
required
Maximum string length: 255
description
string | null
avatar_url
string<uri> | null
Maximum string length: 500
max_messages_per_session
integer | null
Required range: 1 <= x <= 1000
tone
string | null
Maximum string length: 255
response_length
string | null
Maximum string length: 255
is_active
boolean | null

Response

Agent created

id
string<uuid>
name
string
slug
string
description
string | null
avatar_url
string<uri> | null
max_messages_per_session
integer | null
tone
string | null
response_length
string | null
is_active
boolean
is_copilot
boolean
prohibited_phrases
object[]
escalation_rules
object[]
created_at
string<date-time> | null
updated_at
string<date-time> | null