> ## Documentation Index
> Fetch the complete documentation index at: https://developers.domix.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List custom attribute definitions

> List custom attribute fields configured for contacts and conversations.



## OpenAPI

````yaml /domix-ai-openapi-v1.json get /api/v1/accounts/{account_id}/custom_attribute_definitions
openapi: 3.0.3
info:
  title: Domix AI Developer API
  description: >
    # 🚀 Getting Started with Domix AI APIs


    Welcome to the official **Domix AI Developer API** documentation. Whether
    you are building automated workflows for your customer support team,
    integrating Domix AI with your CRM/ERP, sending automated WhatsApp
    notifications, or building conversational bots, our APIs provide the
    flexibility and power to do more.


    ---


    ## 📚 API Categories & Architecture


    Domix AI provides specialized API categories tailored for developers:


    1. **Unified Messaging API (Recommended)**:
       - High-level, single-step messaging engine.
       - Send plain text or pre-approved WhatsApp templates directly by phone number.
       - Automatically creates or resolves contacts and open conversations in one call.
       - **Endpoint**: `POST /developer/api/v1/messages`

    2. **Core CRM & Conversation APIs**:
       - Complete control over your customer support and messaging infrastructure.
       - **Contacts**: Search by phone/email (`GET /contacts/search`), create, update, and manage custom attributes.
       - **Conversations**: Manage conversation lifecycle (`open`, `resolved`, `pending`, `snoozed`) and staff assignments.
       - **Messages**: Retrieve message history, send replies, or post internal staff notes (`private: true`).
       - **Inboxes**: Inspect connected communication channels (WhatsApp, Web Chat, Email, API).

    3. **Real-time Webhooks**:
       - Stream live events directly to your backend server as HTTP POST notifications.
       - Supported events: `message_created`, `message_updated`, `conversation_created`, `conversation_status_changed`, `contact_created`.

    ---


    ## 🔐 Authentication


    All requests to Domix AI require authentication using your secret **API
    Access Token**.


    ### Flexible Header Support

    To ensure maximum compatibility with different HTTP clients, proxies, and
    libraries, Domix AI accepts both **hyphenated** and **underscored** header
    names:


    | Header | Supported Names | Required For | Description |

    | :--- | :--- | :--- | :--- |

    | **Access Token** | `api-access-token` OR `api_access_token` | All API
    Endpoints | Your private API access token |

    | **Account ID** | `api-account-id` OR `api_account_id` | Unified Messaging
    API | Your account identifier in Domix AI |


    > 💡 **How to obtain your Access Token:**

    > 1. Log in to your Domix AI dashboard at
    [chat.domix.ai](https://chat.domix.ai).

    > 2. Click on your profile avatar (bottom-left) → **Profile Settings**.

    > 3. Scroll to **Access Token**, copy the token, and keep it confidential.


    ---


    ## ⚡ Quickstart: Send a Message in 60 Seconds


    ### cURL Example

    ```bash

    curl -X POST https://chat.domix.ai/developer/api/v1/messages \
      -H "Content-Type: application/json" \
      -H "api-access-token: YOUR_ACCESS_TOKEN" \
      -H "api-account-id: YOUR_ACCOUNT_ID" \
      -d '{
        "inbox_id": 1,
        "phone_number": "+966555555555",
        "content": "Hello from Domix AI API!",
        "name": "Customer Name"
      }'
    ```


    ### JavaScript (Node.js / Fetch)

    ```javascript

    const response = await
    fetch('https://chat.domix.ai/developer/api/v1/messages', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'api-access-token': 'YOUR_ACCESS_TOKEN',
        'api-account-id': 'YOUR_ACCOUNT_ID'
      },
      body: JSON.stringify({
        inbox_id: 1,
        phone_number: '+966555555555',
        content: 'Hello from Domix AI API!'
      })
    });

    const result = await response.json();

    console.log('Result:', result);

    ```


    ---


    ## ❓ Frequently Asked Questions (FAQ)


    #### Q: Can I use `api-access-token` or `api_access_token`?

    **A:** Yes, both header conventions are fully supported across all
    endpoints.


    #### Q: How can I prevent creating duplicate contacts?

    **A:** Always use `GET
    /api/v1/accounts/{account_id}/contacts/search?q=+966555555555` to check if
    the phone number already exists before calling the create contact endpoint.


    #### Q: How do I send WhatsApp Template messages?

    **A:** Use the Unified Messages endpoint (`POST /developer/api/v1/messages`)
    with `"message_type": "template"` and supply your template's parameters in
    `template_params`.


    #### Q: How do I listen to incoming messages in real-time?

    **A:** Register a Webhook via `POST /api/v1/accounts/{account_id}/webhooks`
    with subscriptions to `message_created` and `conversation_created`. Your
    endpoint will receive an instant JSON payload whenever a customer sends a
    message.
  version: 1.0.0
  contact:
    name: Domix AI Support
    url: https://domix.ai
servers:
  - url: https://chat.domix.ai
    description: Production Server
security:
  - ApiAccessToken: []
    ApiAccountId: []
  - ApiAccessTokenHyphen: []
    ApiAccountIdHyphen: []
tags:
  - name: Unified Messaging API
    description: High-level unified messaging and direct conversation message dispatching.
  - name: Core CRM & Conversation APIs
    description: >-
      Manage contacts, conversation statuses, assignments, inboxes, and account
      configuration.
  - name: Real-Time Webhooks
    description: Configure HTTP webhook endpoints to receive instant event notifications.
paths:
  /api/v1/accounts/{account_id}/custom_attribute_definitions:
    get:
      tags:
        - Core CRM & Conversation APIs
      summary: List custom attribute definitions
      description: List custom attribute fields configured for contacts and conversations.
      operationId: listCustomAttributeDefinitions
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - name: attribute_model
          in: query
          required: false
          description: 0 for conversation attributes, 1 for contact attributes
          schema:
            type: integer
            enum:
              - 0
              - 1
            example: 1
      responses:
        '200':
          description: Custom attribute definitions retrieved
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomAttributeDefinition'
components:
  parameters:
    AccountId:
      name: account_id
      in: path
      required: true
      description: ID of the account in Domix AI
      schema:
        type: string
        example: '16'
  schemas:
    CustomAttributeDefinition:
      type: object
      properties:
        id:
          type: integer
          example: 4
        attribute_display_name:
          type: string
          example: VIP Status
        attribute_display_type:
          type: string
          example: text
        attribute_key:
          type: string
          example: vip_status
        attribute_model:
          type: string
          example: contact_attribute
  securitySchemes:
    ApiAccessToken:
      type: apiKey
      in: header
      name: api_access_token
      description: API Access Token (underscore format)
    ApiAccountId:
      type: apiKey
      in: header
      name: api_account_id
      description: Account ID (underscore format for unified message endpoints)
    ApiAccessTokenHyphen:
      type: apiKey
      in: header
      name: api-access-token
      description: API Access Token (hyphen format - also fully supported)
    ApiAccountIdHyphen:
      type: apiKey
      in: header
      name: api-account-id
      description: Account ID (hyphen format for unified message endpoints)

````