---
title: "Unrelate a card from a thread"
method: POST
path: "/api/inboxes/{channelId}/threads/{threadId}/unrelate-card"
tags: ["Inboxes"]
---

# Unrelate a card from a thread

`POST /api/inboxes/{channelId}/threads/{threadId}/unrelate-card`

## Request

- Base URL: `https://core-api.getaptly.com`
- URL: `https://core-api.getaptly.com/api/inboxes/{channelId}/threads/{threadId}/unrelate-card`
- Auth: one of:
  - API key in header `x-token`
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/getaptly/apis/aptly-api/docs/api/inboxes/:channelId/threads/:threadId/unrelate-card/post.ts> (a function with typed inputs; its response is checked against the schema)

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`.

## Path parameters

- `channelId` string, required
- `threadId` string, required

## Request body

- object
  - `cardId` string, required: The card to unrelate.
  - `userId` string: Acting user. Required with an API key or partner token.

## Response `200`

Unrelated.

- object
  - `data` object
    - `threadId` string
    - `cardId` string
    - `related` boolean: `false`.

## Other responses

- `400`: Invalid body or missing `userId`.
- `401`: The acting user is not in the company.
- `403`: No access to this inbox or to the card's board, or the acting user is a guest.
- `404`: Inbox, thread or card not found, or the acting user cannot see the thread.

---

[API](https://skmtc.dev/getaptly/apis/aptly-api.md) - [All operations](https://skmtc.dev/getaptly/apis/aptly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaptly/apis/aptly-api/revisions/75c367e0b8e5?raw)
