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

# Remove a contact by phone number

> Removes every contact in the list whose primary or additional number matches `phoneNumber`, with or without the leading `+`. URL-encode `+` as `%2B`. Removing deletes the contact record, the same as deleting a contact in the app.



## OpenAPI

````yaml DELETE /contact-lists/{id}/contacts
openapi: 3.0.3
info:
  title: PowerDialer Public API
  version: '1.0'
  description: >-
    Manage PowerDialer contact lists and read a user's call analytics
    server-to-server.


    Every request carries the shared API key (`Authorization: Bearer <key>` or
    `x-api-key: <key>`) and the PowerDialer user it acts for (`x-user-email` or
    `x-user-id`). Reads and writes are limited to lists that user owns;
    analytics are that user's own.


    Rate limit: 300 requests per minute per API key, across all users.
servers:
  - url: https://api.migration.powerdialer.ai/api/public/v1
    description: Production
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Contact lists
    description: Create, update and delete lists.
  - name: Contacts
    description: Add and remove contacts in a list.
  - name: Analytics
    description: The acting user's call analytics.
paths:
  /contact-lists/{id}/contacts:
    parameters:
      - $ref: '#/components/parameters/ListId'
    delete:
      tags:
        - Contacts
      summary: Remove a contact by phone number
      description: >-
        Removes every contact in the list whose primary or additional number
        matches `phoneNumber`, with or without the leading `+`. URL-encode `+`
        as `%2B`. Removing deletes the contact record, the same as deleting a
        contact in the app.
      operationId: removeContactByPhone
      parameters:
        - $ref: '#/components/parameters/UserEmail'
        - $ref: '#/components/parameters/UserId'
        - name: phoneNumber
          in: query
          required: true
          description: Phone number to remove. URL-encode `+` as `%2B`.
          schema:
            type: string
            example: '+15550100'
      responses:
        '200':
          description: Removed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveResult'
              example:
                contactListId: 4821
                removed: 1
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/ContactNotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    ListId:
      name: id
      in: path
      required: true
      description: Id of the contact list, from the create response.
      schema:
        type: integer
        example: 4821
    UserEmail:
      name: x-user-email
      in: header
      required: false
      description: >-
        Login email of the PowerDialer user the request acts for. Send this or
        `x-user-id`; if both are sent, `x-user-id` wins.
      schema:
        type: string
        format: email
        example: rep@company.com
    UserId:
      name: x-user-id
      in: header
      required: false
      description: >-
        Clerk user id of the PowerDialer user the request acts for. Send this or
        `x-user-email`.
      schema:
        type: string
        example: user_2abc...
  schemas:
    RemoveResult:
      type: object
      required:
        - contactListId
        - removed
      properties:
        contactListId:
          type: integer
          example: 4821
        removed:
          type: integer
          example: 1
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        details:
          description: Optional. A string, or for validation errors a list of problems.
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                properties:
                  path:
                    type: string
                  message:
                    type: string
  responses:
    BadRequest:
      description: >-
        Malformed body or query, unknown field, missing user header, impossible
        date.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid request
            details:
              - path: contacts.0.phoneNumber
                message: phoneNumber is required
    Unauthorized:
      description: Missing or wrong API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid API key
    ContactNotFound:
      description: No contact in this list matches the id or phone number.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Contact not found in this list
    RateLimited:
      description: More than 300 requests per minute for this API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Rate limit exceeded
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        `Authorization: Bearer <api key>`. The key is issued by PowerDialer and
        must stay on your server.
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Alternative to the Authorization header: `x-api-key: <api key>`.'

````

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