Request

URL

PUT https://www.chatbase.co/api/v1/chatbots/{chatbotId}/custom-attributes/{name}

Path Parameters

chatbotId
string
required

The ID of the chatbot the custom attribute belongs to

name
string
required

The name of the custom attribute to update

Headers

Content-Type
string
required

application/json

Authorization
string
required

Bearer <YOUR_API_KEY>

Body Parameters

label
string

The new display label for the custom attribute

description
string

The new description for the custom attribute

archived
boolean

Whether the custom attribute should be archived Default: false

{
  "label": "Updated Label",
  "description": "Updated description",
  "archived": false
}

Response

Success Response

  • Status: 200 OK
  • Content-Type: application/json
message
string

Success message

data
Custom Attribute Object
{
  "message": "Success",
  "data": {
    "name": "company",
    "type": "text",
    "label": "Updated Label",
    "description": "Updated description",
    "archived": false
  }
}

Error Responses

400 Bad Request

  • Invalid request body
{
  "message": "Invalid request body"
}

401 Unauthorized

  • Invalid or missing API key
{
  "message": "Unauthorized access"
}

404 Not Found

  • Chatbot or custom attribute not found
{
  "message": "Custom attribute not found"
}

429 Too Many Requests

  • Rate limit exceeded
{
  "message": "Rate limit exceeded"
}

Code Examples