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

# Delete Phone Number

> Permanently delete a phone number from your Weya AI workspace.

Use this endpoint to permanently remove a phone number from your Weya AI workspace. Once deleted, the phone number will no longer be available for inbound or outbound calling and will be unassigned from any associated AI Agent.

<Warning>
  Deleting a phone number is permanent and cannot be undone. If the phone number is currently being used by active campaigns or assigned to an AI Agent, ensure it is no longer in use before deleting it.
</Warning>

### OpenAPI

```yaml theme={null}
openapi: 3.1.0
info:
  title: Delete Phone Number
  version: 1.0.0

paths:
  /api/phone-numbers/{id}:
    delete:
      summary: Delete a phone number
      description: Permanently deletes a configured phone number.
      tags:
        - Phone Numbers

      security:
        - bearerAuth: []

      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: Unique identifier of the phone number.

      responses:
        "200":
          description: Phone number deleted successfully.

        "401":
          description: Unauthorized.

        "404":
          description: Phone number not found.

        "409":
          description: Phone number is currently in use.

        "500":
          description: Internal Server Error.

components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
```

## Authorizations

<ParamField header="Authorization" type="string" required>
  Bearer Token for the authenticated user.

  Format:

  `Authorization: Bearer YOUR_ACCESS_TOKEN`
</ParamField>

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the phone number to delete.
</ParamField>

## Example Request

```bash theme={null}
curl --location --request DELETE '{{baseUrl}}/api/phone-numbers/6872d4b5f8d7a91234567890' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
```

## Successful Response

```json theme={null}
{
  "success": true,
  "message": "Phone number deleted successfully."
}
```

## Response Fields

<ResponseField name="success" type="boolean">
  Indicates whether the phone number was successfully deleted.
</ResponseField>

<ResponseField name="message" type="string">
  Confirmation message indicating that the phone number has been permanently removed.
</ResponseField>

## Error Responses

### Unauthorized (401)

```json theme={null}
{
  "success": false,
  "message": "Unauthorized"
}
```

### Not Found (404)

```json theme={null}
{
  "success": false,
  "message": "Phone number not found."
}
```

### Conflict (409)

```json theme={null}
{
  "success": false,
  "message": "Cannot delete phone number because it is currently associated with an active campaign or AI Agent."
}
```

### Internal Server Error (500)

```json theme={null}
{
  "success": false,
  "message": "Failed to delete phone number."
}
```
