---
title: "Create custom attribute"
method: POST
path: "/chatbots/{chatbotId}/custom-attributes"
tags: ["Contacts"]
---

# Create custom attribute

`POST /chatbots/{chatbotId}/custom-attributes`

Creates a new custom attribute for contacts

## Path parameters

- `chatbotId` string, required

## Request body

- CustomAttributeInput
  - `name` string, required — Attribute name (must start with a letter and can only contain letters, numbers, underscores, and hyphens)
  - `label` string — Display label for the attribute
  - `type` 'text' | 'number' | 'boolean' | 'date', required — Attribute data type
  - `description` string — Description of the attribute
  - `archived` boolean — Whether the attribute is archived

## Response `200`

Custom attribute created successfully

- object
  - `message` string
  - `data` object — Created custom attribute
    - `name` string — Attribute name
    - `label` string — Display label for the attribute
    - `type` 'text' | 'number' | 'boolean' | 'date' — Attribute data type
    - `description` string — Description of the attribute
    - `archived` boolean — Whether the attribute is archived

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing API key
- `404` — Not Found - Resource does not exist
- `429` — Rate Limited - Too many requests
- `500` — Internal Server Error

---

[API](https://skmtc.dev/chatbase/apis/chatbase-api-v1.md) · [All operations](https://skmtc.dev/chatbase/apis/chatbase-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chatbase/chatbase-api-v1/revisions/3a2187967746/schema)
