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

# Unblock contact

> Remove a phone number block without changing contacts, message history, or messaging consent.



## OpenAPI

````yaml DELETE /blocked_contacts/{id}
openapi: 3.1.1
info:
  title: Surge
  version: '1.0'
servers:
  - url: https://api.surge.app
security:
  - authorization: []
paths:
  /blocked_contacts/{id}:
    delete:
      tags:
        - Blocked contacts
      summary: Unblock a contact
      description: >-
        Removes the block without changing contacts, message history, or
        messaging consent.
      operationId: DeleteBlockedContact
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockedContact'
          description: Removed block
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Surge from '@surgeapi/node';

            const client = new Surge({
              apiKey: process.env['SURGE_API_KEY'], // This is the default and can be omitted
            });

            const blockedContact = await client.blockedContacts.delete('id');

            console.log(blockedContact.id);
        - lang: Python
          source: |-
            import os
            from surge import Surge

            client = Surge(
                api_key=os.environ.get("SURGE_API_KEY"),  # This is the default and can be omitted
            )
            blocked_contact = client.blocked_contacts.delete(
                "id",
            )
            print(blocked_contact.id)
        - lang: Ruby
          source: |-
            require "surge_api"

            surge = SurgeAPI::Client.new(api_key: "My API Key")

            blocked_contact = surge.blocked_contacts.delete("id")

            puts(blocked_contact)
components:
  schemas:
    BlockedContact:
      title: BlockedContact
      description: An account-level block on incoming communication from a phone number.
      properties:
        created_at:
          description: When the block was created.
          format: date-time
          type: string
        id:
          description: Unique identifier for the block.
          type: string
        phone_number:
          description: The blocked phone number in E.164 format.
          example: '+18015551234'
          format: phone-number
          pattern: ^\+[1-9]\d{6,14}$
          type: string
        reason:
          description: An optional explanation for the block.
          maxLength: 255
          type:
            - string
            - 'null'
      required:
        - id
        - phone_number
        - reason
        - created_at
      type: object
    ErrorResponse:
      title: ErrorResponse
      description: An error response
      example:
        error:
          message: The requested resource could not be found.
          type: not_found
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
      type: object
    Error:
      title: Error
      description: An error response
      example:
        message: The requested resource was not found.
        type: not_found
      properties:
        detail:
          additionalProperties: true
          description: Additional details about the error.
          type: object
        message:
          description: A human-readable error message.
          example: The requested resource was not found.
          type: string
        type:
          description: A unique error code.
          example: not_found
          type: string
      required:
        - type
        - message
      type: object
  securitySchemes:
    authorization:
      bearerFormat: Surge API token
      scheme: bearer
      type: http

````

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