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

# Eliminar Contacto de Campaña

> Elimina un contacto de una Campaña. Solo se pueden eliminar contactos en estado `queue` o `failed`; cualquier otro estado devuelve `CONTACT_NOT_DELETABLE` (409).

<Info>
  **Límite de Tasa:** 12 solicitudes por segundo
</Info>

<Warning>
  Solo se pueden eliminar contactos en estado `queue` o `failed`. Cualquier otro
  estado (`sending`, `sent`, `answered`, etc.) devuelve `409 CONTACT_NOT_DELETABLE`.
</Warning>

## Ejemplos

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.altur.io/api/v1.0/campaigns/1234/contacts/42" \
    -H "Authorization: api-key YOUR_API_SECRET_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      "https://api.altur.io/api/v1.0/campaigns/1234/contacts/42",
      headers={"Authorization": "api-key YOUR_API_SECRET_KEY"},
  )
  response.raise_for_status()  # 204 No Content
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch(
    "https://api.altur.io/api/v1.0/campaigns/1234/contacts/42",
    {
      method: "DELETE",
      headers: { Authorization: "api-key YOUR_API_SECRET_KEY" },
    },
  );
  if (!res.ok) throw new Error(`Delete failed: ${res.status}`);
  ```
</CodeGroup>


## OpenAPI

````yaml DELETE /campaigns/{id}/contacts/{contact_id}
openapi: 3.0.1
info:
  title: Altur API
  description: >-
    An API aimed to allow third-party developers to interact with the Altur
    platform through a RESTful interface.
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.altur.io/api/v1.0
security:
  - apiKeyAuth: []
paths:
  /campaigns/{id}/contacts/{contact_id}:
    delete:
      description: >-
        Deletes a contact from a Campaign. Only contacts in `queue` or `failed`
        status can be deleted — contacts further along the lifecycle return
        `CONTACT_NOT_DELETABLE` (409).
      parameters:
        - name: id
          in: path
          description: The identifier of the Campaign
          schema:
            type: integer
          required: true
        - name: contact_id
          in: path
          description: The identifier of the contact within the Campaign
          schema:
            type: integer
          required: true
      responses:
        '204':
          description: Contact deleted successfully
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Campaign or contact not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignApiError'
        '409':
          description: Contact is not in a deletable status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignApiError'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    CampaignApiError:
      type: object
      description: Standard error envelope returned by the v1.0 campaigns API.
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: Stable, UPPER_SNAKE_CASE error key.
          enum:
            - FORBIDDEN
            - NOT_FOUND
            - RATE_LIMITED
            - SERVER_ERROR
            - INVALID_REQUEST
            - INVALID_STATUS
            - IMMUTABLE_FIELD
            - UNKNOWN_ACTION
            - AGENT_NOT_FOUND
            - INTEGRATION_NOT_FOUND
            - INVALID_INTEGRATION_TYPE
            - INVALID_FILTER_TAG
            - INVALID_PHONE_NUMBER
            - MISSING_CONTACT
            - CONTACT_NOT_FOUND
            - CONTACT_NOT_DELETABLE
            - CAMPAIGN_FINISHED
            - CYCLES_NOT_ENABLED
            - SCHEDULED_MODE_ONLY
            - INVALID_STATUS_TRANSITION
            - BILLING_LIMIT_REACHED
        message:
          type: string
        field:
          type: string
          description: >-
            Set when `error` is `IMMUTABLE_FIELD`; identifies the offending
            field path.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Add `api-key YOUR_API_SECRET_KEY` as the value of the `Authorization`
        header.

````