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

# WhatsApp Contacts API — Create, Tag & Bulk Import via CSV

> Create, update, tag, and delete WhatsApp contacts on Vobiz, or import thousands of contacts at once via CSV bulk upload for campaign targeting.

**Base URL:** `https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp`

**Authentication:** every request needs the `X-Auth-ID: MA_XXXXXXXX` and `X-Auth-Token: YOUR_AUTH_TOKEN` headers, and the `{auth_id}` in the path must be the account those credentials belong to. Send `Content-Type: application/json` on requests with a JSON body. Get your credentials from [console.vobiz.ai](https://console.vobiz.ai).

Contacts are also created automatically when you message a number or it messages you.

## Endpoints overview

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/api/v1/Account/{auth_id}/WhatsApp/Contact/` | List contacts (paginated) |
| `GET` | `/api/v1/Account/{auth_id}/WhatsApp/Contact/{id}/` | Get a single contact |
| `POST` | `/api/v1/Account/{auth_id}/WhatsApp/Contact/` | Create a new contact |
| `PUT` | `/api/v1/Account/{auth_id}/WhatsApp/Contact/{id}/` | Update a contact |
| `DELETE` | `/api/v1/Account/{auth_id}/WhatsApp/Contact/{id}/` | Delete a contact |
| `GET` | `/api/v1/Account/{auth_id}/WhatsApp/Contact/Tag/` | List tags with contact counts |
| `POST` | `/api/v1/Account/{auth_id}/WhatsApp/Contact/Import/` | Bulk import from CSV |

## List contacts

```http theme={null}
GET https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Contact/
```

Returns a paginated list of contacts, newest first. Filter by name or phone number with `search`, or filter by `tag`.

| Query param | Default | Description |
| - | - | - |
| `page` | `1` | Page number, starting at `1` |
| `limit` | `25` | Records per page, from `1` to `1000` |
| `search` | - | Return only contacts whose name or phone number contains this text (case-insensitive) |
| `tag` | - | Return only contacts with this tag (exact match) |

```bash cURL theme={null}
curl -X GET \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Contact/?page=1&limit=25&search=priya&tag=vip" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN"
```

```json 200 OK theme={null}
{
  "items": [
    {
      "id": "4f9c2a18-3e6b-4d2f-8b1a-9e7c5d3f1a02",
      "account_id": "MA_XXXXXXXX",
      "phone_number": "+919876543210",
      "name": "Priya Sharma",
      "tags": ["vip"],
      "custom_attributes": { "plan": "gold" },
      "last_active_at": "2026-10-16T21:20:31Z",
      "created_at": "2026-10-12T08:00:00Z",
      "updated_at": "2026-10-12T08:00:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 25,
  "has_more": false
}
```

## Get contact

```http theme={null}
GET https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Contact/{id}/
```

Returns the full profile for a single contact by ID. An unknown contact returns `404`.

```bash cURL theme={null}
curl -X GET \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Contact/4f9c2a18-3e6b-4d2f-8b1a-9e7c5d3f1a02/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN"
```

## Create contact

```http theme={null}
POST https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Contact/
```

Create a single contact. Attach `tags` and `custom_attributes` for filtering and campaign targeting. A phone number that already exists on your account returns `400`. Returns `201 Created`.

**phone\_number** `string` *required*

Phone number in E.164 format (e.g. `+919876543210`). It must be unique on your account.

**name** `string`

Contact name.

**tags** `string[]`

List of tag strings, used for campaign targeting.

**custom\_attributes** `object`

Arbitrary key/value metadata for the contact. Defaults to `{}`.

```bash cURL theme={null}
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Contact/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+919876543210",
    "name": "Priya Sharma",
    "tags": ["vip"],
    "custom_attributes": { "plan": "gold" }
  }'
```

```json 201 Created theme={null}
{
  "id": "4f9c2a18-3e6b-4d2f-8b1a-9e7c5d3f1a02",
  "account_id": "MA_XXXXXXXX",
  "phone_number": "+919876543210",
  "name": "Priya Sharma",
  "tags": ["vip"],
  "custom_attributes": { "plan": "gold" },
  "last_active_at": null,
  "created_at": "2026-10-12T08:00:00Z",
  "updated_at": "2026-10-12T08:00:00Z"
}
```

## Update contact

```http theme={null}
PUT https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Contact/{id}/
```

Update a contact's name, tags, or custom attributes. All fields are optional; send only what you want to change. The phone number can't be changed. Returns `200 OK` with the updated contact, or `404` for an unknown contact.

**name** `string`

New contact name. An empty string clears it.

**tags** `string[]`

The complete new list of tags. It replaces the current list.

**custom\_attributes** `object`

The complete new attributes object. It replaces the current one.

```bash cURL theme={null}
curl -X PUT \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Contact/4f9c2a18-3e6b-4d2f-8b1a-9e7c5d3f1a02/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Priya S.",
    "tags": ["vip", "renewal"]
  }'
```

## Delete contact

```http theme={null}
DELETE https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Contact/{id}/
```

Permanently delete a contact from your account. Returns `204 No Content`, or `404` for an unknown contact.

```bash cURL theme={null}
curl -X DELETE \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Contact/4f9c2a18-3e6b-4d2f-8b1a-9e7c5d3f1a02/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN"
```

## List contact tags

```http theme={null}
GET https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Contact/Tag/
```

Returns every tag used on your contacts, most used first, with how many contacts have it, plus your total contact count. Use it to build tag-based [campaign](https://www.vobiz.ai/docs/whatsapp/api/campaigns.md) audiences.

```bash cURL theme={null}
curl -X GET \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Contact/Tag/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN"
```

```json 200 OK theme={null}
{
  "tags": [
    { "tag": "vip", "count": 42 },
    { "tag": "mumbai", "count": 17 }
  ],
  "total_contacts": 180
}
```

## Import contacts (CSV)

```http theme={null}
POST https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Contact/Import/
```

Create or update contacts from a CSV file using `multipart/form-data`. Send the file under the form field named `file`, up to 10 MB and 5,000 data rows. The first row is the header. Vobiz recognises these columns, matched case-insensitively:

* `phone_number` (required; also `phone`, `phonenumber`, or `mobile`), in E.164 format.
* `name` (optional; also `full_name`, `fullname`, or `contact_name`).
* `tags` (optional; also `tag`, `labels`, or `label`), separated by semicolons and stored in lowercase.

Rows are matched to existing contacts on phone number; when a number appears twice, the last row wins. Rows with an invalid number are skipped and listed in `errors`. Returns `200 OK` with a summary.

**CSV format:**

```csv theme={null}
phone_number,name,tags
+919876543210,Priya Sharma,vip;enterprise
+919123456789,Rahul Nair,new
```

```bash cURL theme={null}
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Contact/Import/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -F "file=@/path/to/contacts.csv"
```

```json 200 OK theme={null}
{
  "total": 2,
  "created": 1,
  "updated": 1,
  "failed": 0
}
```

When some rows fail, `errors` lists each one. Row numbers count the header as row 1:

```json 200 OK (with errors) theme={null}
{
  "total": 3,
  "created": 1,
  "updated": 1,
  "failed": 1,
  "errors": [
    {
      "row": 4,
      "phone_number": "98765",
      "reason": "invalid phone number; must be E.164 format (e.g. +919876543210)"
    }
  ]
}
```

> [!NOTE]
>
> Do not set `Content-Type` manually when using `-F` - curl sets the correct `multipart/form-data` boundary automatically.

## Contact object

**id** `string`

Unique contact identifier (UUID).

**account\_id** `string`

Your Vobiz account ID (`MA_XXXXXXXX`).

**phone\_number** `string`

Phone number in E.164 format.

**name** `string`

Contact name. Empty string when not set.

**tags** `string[]`

List of tags assigned to the contact.

**custom\_attributes** `object`

Arbitrary key/value metadata. `{}` when not set.

**last\_active\_at** `string | null`

When the contact last messaged you (RFC3339 UTC). `null` when they never have.

**created\_at** `string`

Creation timestamp (RFC3339 UTC).

**updated\_at** `string`

Last update timestamp (RFC3339 UTC).


## OpenAPI

````yaml openapi-whatsapp.yaml GET /api/v1/Account/{auth_id}/WhatsApp/Contact/
openapi: 3.1.0
info:
  title: Vobiz WhatsApp API
  description: >
    Connect WhatsApp Business channels, submit message templates, send text,
    media and template

    messages, place and answer WhatsApp voice calls, run template campaigns, and
    manage contacts,

    canned responses, webhooks (callbacks) and media on the WhatsApp Business
    Platform through Vobiz.


    **Base URL:** `https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp`,
    where `{auth_id}` is your

    account Auth ID. Paths in descriptions, such as `POST /Message/`, are
    relative to it. The trailing

    slash is optional on every path.


    **Authentication:** every request needs the `X-Auth-ID` and `X-Auth-Token`
    headers. The

    `{auth_id}` in the path must be the account those credentials belong to,
    otherwise the request

    returns `403`. Send `Content-Type: application/json` on requests with a JSON
    body.


    **Conventions:** field names are snake_case. IDs that Vobiz issues
    (channels, templates,

    contacts, conversations, messages, campaigns, webhooks) are UUIDs; send them
    exactly as

    returned. Timestamps are RFC 3339 in UTC.

    Errors return a flat object with one `error` string. Authentication and
    authorization errors

    (`401` and `403`) nest a `code` and `message` under `error`.
  version: '1.0'
  contact:
    email: support@vobiz.ai
    url: https://www.vobiz.ai
servers:
  - url: https://api.vobiz.ai
    description: Production
security:
  - AuthID: []
    AuthToken: []
tags:
  - name: Channels
    description: >-
      WhatsApp Business phone numbers connected to your Vobiz account. Every
      send, template, call and campaign runs on a channel.
  - name: SIP integration
    description: >-
      Route a channel's WhatsApp voice calls over SIP to your own PBX or contact
      center instead of the browser (WebRTC) calling flow.
  - name: Templates
    description: >-
      Meta-approved message templates, the only messages you can send outside
      the 24-hour customer service window.
  - name: Numbers
    description: >-
      Search and buy WhatsApp-capable numbers from Vobiz inventory, or verify
      ownership of a number you already have (BYON).
  - name: Conversations
    description: >-
      Threads between one of your channels and one contact, with their message
      history.
  - name: Messages
    description: Send text, media and template messages.
  - name: Calls
    description: >-
      Place, answer and end WhatsApp Business voice calls with WebRTC signaling,
      and list call history.
  - name: Webhooks
    description: >-
      Subscriptions that deliver inbound messages, delivery status and call
      events to your server.
  - name: Media
    description: >-
      Upload media for outbound messages and download inbound attachments
      without handling Meta access tokens.
  - name: Contacts
    description: >-
      The people you message, with tags and custom attributes used for campaign
      targeting.
  - name: Canned responses
    description: Reusable reply snippets that inbox agents insert with a shortcut.
  - name: Campaigns
    description: >-
      Bulk sends of one approved template to a tagged, selected or full contact
      audience.
paths:
  /api/v1/Account/{auth_id}/WhatsApp/Contact/:
    parameters:
      - $ref: '#/components/parameters/AuthId'
    get:
      tags:
        - Contacts
      summary: List contacts
      description: Returns your contacts, newest first.
      operationId: whatsapp-list-contacts
      parameters:
        - $ref: '#/components/parameters/Page'
        - name: limit
          in: query
          description: >-
            Contacts per page, from `1` to `1000`. Defaults to `25`; values
            above `1000` return `1000`.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 25
        - name: search
          in: query
          description: >-
            Return only contacts whose name or phone number contains this text
            (case-insensitive).
          schema:
            type: string
            example: priya
        - name: tag
          in: query
          description: Return only contacts with this tag (exact match).
          schema:
            type: string
            example: vip
      responses:
        '200':
          description: A page of contacts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactList'
              example:
                items:
                  - id: 4f9c2a18-3e6b-4d2f-8b1a-9e7c5d3f1a02
                    account_id: MA_XXXXXXXX
                    phone_number: '+14155550123'
                    name: Priya Sharma
                    tags:
                      - vip
                    custom_attributes:
                      plan: gold
                    last_active_at: null
                    created_at: '2026-11-13T06:59:25.350234Z'
                    updated_at: '2026-11-13T06:59:25.350234Z'
                total: 1
                page: 1
                limit: 25
                has_more: false
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    AuthId:
      name: auth_id
      in: path
      required: true
      description: Your account Auth ID. It must match the `X-Auth-ID` header.
      schema:
        type: string
        example: MA_XXXXXXXX
    Page:
      name: page
      in: query
      description: Page number, starting at `1`. Defaults to `1`.
      schema:
        type: integer
        minimum: 1
        default: 1
  schemas:
    ContactList:
      type: object
      required:
        - items
        - total
        - page
        - limit
        - has_more
      properties:
        items:
          type: array
          description: Contacts, newest first. Empty array when none match.
          items:
            $ref: '#/components/schemas/Contact'
        total:
          type: integer
          description: Number of contacts that match.
          example: 1
        page:
          type: integer
          example: 1
        limit:
          type: integer
          example: 25
        has_more:
          type: boolean
          example: false
    Contact:
      type: object
      required:
        - id
        - account_id
        - phone_number
        - name
        - tags
        - custom_attributes
        - last_active_at
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: Contact ID.
          example: 4f9c2a18-3e6b-4d2f-8b1a-9e7c5d3f1a02
        account_id:
          type: string
          example: MA_XXXXXXXX
        phone_number:
          type: string
          description: Phone number in E.164 format.
          example: '+14155550123'
        name:
          type: string
          description: Contact name. Empty string when not set.
          example: Priya Sharma
        tags:
          type: array
          description: Tags assigned to the contact.
          items:
            type: string
          example:
            - vip
            - mumbai
        custom_attributes:
          type: object
          additionalProperties: true
          description: Your key/value metadata for the contact. `{}` when not set.
          example:
            plan: gold
        last_active_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the contact last messaged you. `null` when they haven't.
          example: null
        created_at:
          type: string
          format: date-time
          example: '2026-10-12T08:00:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-10-12T08:00:00Z'
    GatewayError:
      type: object
      description: The body of an authentication (`401`) or authorization (`403`) error.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: integer
              description: The HTTP status code, repeated.
              example: 401
            message:
              type: string
              description: What went wrong.
              example: Invalid authentication credentials
    Error:
      type: object
      description: >-
        An error response: a flat object with one `error` string. Use the HTTP
        status code to decide how to handle the error, and log `error` for
        diagnosis.
      required:
        - error
      properties:
        error:
          type: string
          description: >-
            Human-readable explanation of the error. Branch on the HTTP status
            code rather than on this text.
          example: channel not found
  responses:
    Unauthorized:
      description: Missing or invalid `X-Auth-ID` / `X-Auth-Token`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          examples:
            invalid:
              summary: Invalid credentials
              value:
                error:
                  code: 401
                  message: Invalid authentication credentials
            missing:
              summary: Missing credentials
              value:
                error:
                  code: 401
                  message: >-
                    Authentication required: provide either Authorization header
                    or X-Auth-ID and X-Auth-Token headers
    Forbidden:
      description: >-
        The `{auth_id}` in the path is not the account your credentials belong
        to.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          example:
            error:
              code: 403
              message: 'Access denied: account ID mismatch'
    ServerError:
      description: >-
        The request couldn't be completed. Retry it, and contact Vobiz support
        if the error persists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    AuthID:
      type: apiKey
      in: header
      name: X-Auth-ID
      description: Your Vobiz account Auth ID (`MA_XXXXXXXX`).
    AuthToken:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: Your Vobiz account Auth Token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.