# Detach a contact from a group conversation

`DELETE /conversations/{conversation_id}/customers/{contact_id}`

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

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `DELETE /conversations/{conversation_id}/customers/{contact_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: Conversations
    description: Everything about your Conversations
    externalDocs:
      description: What is a conversation?
      url: https://www.intercom.com/help/en/articles/4323904-what-is-a-conversation
paths:
  /conversations/{conversation_id}/customers/{contact_id}:
    delete:
      summary: Detach a contact from a group conversation
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
        - name: conversation_id
          in: path
          required: true
          description: The identifier for the conversation as given by Intercom.
          example: '123'
          schema:
            type: string
        - name: contact_id
          in: path
          required: true
          description: The identifier for the contact as given by Intercom.
          example: '123'
          schema:
            type: string
      tags:
        - Conversations
      operationId: detachContactFromConversation
      description: |-
        You can remove participants who are contacts from a group conversation, on behalf of an admin.

        **Removing the last participant**

        You cannot remove the last remaining contact from a conversation.
      responses:
        '200':
          description: Detach a contact from a group conversation
          content:
            application/json:
              examples:
                Detach a contact from a group conversation:
                  value:
                    customers:
                      - type: user
                        id: 6762f1b41bb69f9f2193bbe0
              schema:
                $ref: '#/components/schemas/conversation_participants_response'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: 89ef64b2-d1f9-40c3-89e9-d39175d3d647
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: API plan restricted
          content:
            application/json:
              examples:
                API plan restricted:
                  value:
                    type: error.list
                    request_id: 6fe4106b-967a-46ba-b1c9-9996aff6e8c3
                    errors:
                      - code: api_plan_restricted
                        message: Active subscription needed.
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Contact not found
          content:
            application/json:
              examples:
                Conversation not found:
                  value:
                    type: error.list
                    request_id: 89835b60-6756-4d2a-b148-26ca0cb49f9f
                    errors:
                      - code: not_found
                        message: Resource Not Found
                Contact not found:
                  value:
                    type: error.list
                    request_id: ab1b9371-3185-417f-a53a-dcae35892980
                    errors:
                      - code: not_found
                        message: User Not Found
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: Last customer
          content:
            application/json:
              examples:
                Last customer:
                  value:
                    type: error.list
                    request_id: 8275e92f-66b7-40f9-82a8-9647ca8d7eb4
                    errors:
                      - code: parameter_invalid
                        message: Removing the last customer is not allowed
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/detach_contact_from_conversation_request'
            examples:
              detach_a_contact_from_a_group_conversation:
                summary: Detach a contact from a group conversation
                value:
                  admin_id: 991267739
              conversation_not_found:
                summary: Conversation not found
                value:
                  admin_id: 991267742
              contact_not_found:
                summary: Contact not found
                value:
                  admin_id: 991267745
              last_customer:
                summary: Last customer
                value:
                  admin_id: 991267748
components:
  schemas:
    conversation_participants_response:
      title: Conversation Participants Response
      type: object
      description: The participants of the conversation, returned after attaching or detaching a contact
      properties:
        customers:
          type: array
          description: The conversation participants after the change
          items:
            type: object
            properties:
              type:
                type: string
                description: The role of the participant. Can be "user" or "lead"
                example: user
              id:
                type: string
                description: The unique identifier for the participant
                example: 6762f1a61bb69f9f2193bbd8
            required:
              - type
              - id
          example:
            - type: user
              id: 6762f1a61bb69f9f2193bbd8
      required:
        - customers
    detach_contact_from_conversation_request:
      properties:
        admin_id:
          type: string
          description: The `id` of the admin who is performing the action.
          example: '5017690'
      required:
        - admin_id
    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.15'
      default: '2.15'
      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'
        - '2.13'
        - '2.14'
        - '2.15'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
