# Remove subscription from a contact

`DELETE /contacts/{contact_id}/subscriptions/{id}`

> This is a subset of the full specification, limited to the `DELETE /contacts/{contact_id}/subscriptions/{id}` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.12/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.12'
  description: This is a subset of the full specification, limited to the `DELETE /contacts/{contact_id}/subscriptions/{id}` operation.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: Contacts
    description: Everything about your contacts
  - name: Subscription Types
    description: Everything about subscription types
paths:
  /contacts/{contact_id}/subscriptions/{id}:
    delete:
      summary: Remove subscription from a contact
      tags:
        - Subscription Types
        - Contacts
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
        - name: contact_id
          in: path
          description: The unique identifier for the contact which is given by Intercom
          example: 63a07ddf05a32042dffac965
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: The unique identifier for the subscription type which is given by Intercom
          example: '37846'
          required: true
          schema:
            type: string
      operationId: detachSubscriptionTypeToContact
      description: You can remove a specific subscription from a contact. This will return a subscription type model for the subscription type that was removed from the contact.
      responses:
        '200':
          description: Successful
          content:
            application/json:
              examples:
                Successful:
                  value:
                    type: subscription
                    id: '32'
                    state: live
                    consent_type: opt_in
                    default_translation:
                      name: Newsletters
                      description: Lorem ipsum dolor sit amet
                      locale: en
                    translations:
                      - name: Newsletters
                        description: Lorem ipsum dolor sit amet
                        locale: en
                    content_types:
                      - sms_message
              schema:
                $ref: '#/components/schemas/subscription_type'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: edfa9186-5886-4625-953b-9b5351a36612
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Resource not found
          content:
            application/json:
              examples:
                Contact not found:
                  value:
                    type: error.list
                    request_id: 4e118465-bc01-4004-9c18-c21b5b639aa1
                    errors:
                      - code: not_found
                        message: User Not Found
                Resource not found:
                  value:
                    type: error.list
                    request_id: 2dee041e-e2aa-4d5b-858a-1571aca1bbba
                    errors:
                      - code: not_found
                        message: Resource Not Found
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              field:
                type: string
                nullable: true
                description: Optional. Used to identify a particular field or query parameter that was in error.
                example: email
            required:
              - code
      required:
        - type
        - errors
    intercom_version:
      description: Intercom API version.</br>By default, it's equal to the version set in the app package.
      type: string
      example: '2.12'
      default: '2.12'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - '2.12'
        - Preview
    subscription_type:
      title: Subscription Types
      type: object
      x-tags:
        - Subscription Types
      description: A subscription type lets customers easily opt out of non-essential communications without missing what's important to them.
      properties:
        type:
          type: string
          description: The type of the object - subscription
          example: subscription
        id:
          type: string
          description: The unique identifier representing the subscription type.
          example: '123456'
        state:
          type: string
          description: The state of the subscription type.
          enum:
            - live
            - draft
            - archived
          example: live
        default_translation:
          $ref: '#/components/schemas/translation'
        translations:
          type: array
          description: An array of translations objects with the localised version of the subscription type in each available locale within your translation settings.
          items:
            $ref: '#/components/schemas/translation'
        consent_type:
          type: string
          description: Describes the type of consent.
          enum:
            - opt_out
            - opt_in
          example: opt_in
        content_types:
          type: array
          description: The message types that this subscription supports - can contain `email` or `sms_message`.
          items:
            type: string
            enum:
              - email
              - sms_message
            example: email
    translation:
      title: Translation
      type: object
      description: A translation object contains the localised details of a subscription type.
      properties:
        name:
          type: string
          description: The localised name of the subscription type.
          example: Announcements
        description:
          type: string
          description: The localised description of the subscription type.
          example: Offers, product and feature announcements
        locale:
          type: string
          description: The two character identifier for the language of the translation object.
          example: en
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
