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

# Unrelate a card from a thread

> Removes the card's relation to the thread, the reverse of
`POST .../relate-card`. Same checks, and the card's conversation metrics
are recalculated. Unrelating a card that isn't related is a no-op.

The acting user is the delegate token's own user. With an API key or
partner token, name one in `userId`.




## OpenAPI

````yaml /openapi.yaml post /api/inboxes/{channelId}/threads/{threadId}/unrelate-card
openapi: 3.0.3
info:
  title: Aptly API
  version: '1.1'
  description: |
    The Aptly API lets external systems work with boards, contacts, inboxes,
    tasks, files, and other Aptly resources.

    Most endpoints accept an API key in the `x-token` header. Some endpoints
    also accept a delegate token or partner bearer token, as shown in each
    operation's security requirements, and explicitly public endpoints require
    no credential. API keys are scoped to a company and may be restricted to
    specific boards and read, insert, or update permissions; requests outside
    those restrictions receive a 403 `FORBIDDEN` response.
servers:
  - url: https://core-api.getaptly.com
    description: Production
security:
  - ApiKeyHeader: []
paths:
  /api/inboxes/{channelId}/threads/{threadId}/unrelate-card:
    post:
      tags:
        - Inboxes
      summary: Unrelate a card from a thread
      description: |
        Removes the card's relation to the thread, the reverse of
        `POST .../relate-card`. Same checks, and the card's conversation metrics
        are recalculated. Unrelating a card that isn't related is a no-op.

        The acting user is the delegate token's own user. With an API key or
        partner token, name one in `userId`.
      operationId: unrelateInboxThreadCard
      parameters:
        - name: channelId
          in: path
          required: true
          schema:
            type: string
          description: External channel meta ID (`meta.id`) of the inbox.
        - name: threadId
          in: path
          required: true
          schema:
            type: string
          description: Thread id from the threads list.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - cardId
              properties:
                cardId:
                  type: string
                  description: The card to unrelate.
                userId:
                  type: string
                  description: Acting user. Required with an API key or partner token.
      responses:
        '200':
          description: Unrelated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      threadId:
                        type: string
                      cardId:
                        type: string
                      related:
                        type: boolean
                        description: '`false`.'
        '400':
          description: Invalid body or missing `userId`.
        '401':
          description: The acting user is not in the company.
        '403':
          description: >-
            No access to this inbox or to the card's board, or the acting user
            is a guest.
        '404':
          description: >-
            Inbox, thread or card not found, or the acting user cannot see the
            thread.
      security:
        - ApiKeyHeader: []
        - DelegateToken: []
        - PartnerBearer: []
components:
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-token
    DelegateToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'Delegate token issued by the platform. Format: `DelegateToken <token>`'
    PartnerBearer:
      type: http
      scheme: bearer
      description: 'Partner token. Format: `Authorization: Bearer <token>`'

````

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