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

# Add to Blacklist

> Add multiple phone numbers to your organization's blacklist to prevent the AI agent from contacting them.

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication (e.g., `Bearer <your_token>`).
</ParamField>

### Body Parameters

The request body should be a non-empty array of objects.

<Tip>
  **Automatic Name Resolution:** If you omit the `name` field or provide an empty string, the system will automatically search your organization's latest logs for the most recent name associated with that phone number and use it for the blacklist entry.
</Tip>

<ParamField body="[]" type="array[]" required>
  List of numbers to blacklist.

  <Expandable title="item properties">
    <ParamField body="number" type="string" required>
      The phone number to be blacklisted.
    </ParamField>

    <ParamField body="name" type="string">
      The name of the customer (optional). If not provided, the system will attempt to fetch the name from recent interaction logs.
    </ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.agents.timepay.ai/api/v1/blacklist/bulk/add \
    --header 'Authorization: Bearer <your_token>' \
    --header 'Content-Type: application/json' \
    --data '[
    {
      "number": "8249752556",
      "name": "Bob Smith"
    },
    {
      "number": "9920967932"
    }
  ]'
  ```
</RequestExample>

### Response

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful.
</ResponseField>

<ResponseField name="message" type="string">
  A descriptive message about the result.
</ResponseField>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "success": true,
    "message": "Numbers has been added to blacklist"
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "success": false,
    "message": "Request body must be a non-empty array of objects."
  }
  ```

  ```json 400 Missing Number theme={null}
  {
    "success": false,
    "message": "Each item must contain a 'number' field."
  }
  ```

  ```json 500 Server Error theme={null}
  {
    "success": false,
    "message": "An unexpected server error occurred."
  }
  ```
</ResponseExample>
