---
title: Link a case
url: https://www.tines.com/stories/docs/api/records/link_case/
updated: 2026-10-13T09:11:08+00:00
description: Link an existing case to a record. Responds `204 No Content` on success. The call is idempotent — linking a case that is already linked still returns `204`.
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/stories/docs/llms.txt) › [Tines API](https://www.tines.com/stories/docs/api/llms.txt) › [Records](https://www.tines.com/llm/stories/docs/api/records.md)*

# Link a case

*[View on tines.com](https://www.tines.com/stories/docs/api/records/link_case/)*

## Description

Link an existing case to a record. Responds `204 No Content` on success. The call is idempotent — linking a case that is already linked still returns `204`.

This is the record-side counterpart to the [Add a record to a case API](/api/cases/records/create); either endpoint creates the same link. See the [Get record API](/api/records/get) to learn more about records.

## Request

HTTP Method: **POST**

URL: `https://<tenant-domain>/api/v2/records/<<record_id>>/cases`

| Path parameter | Description                             |
| -------------- | --------------------------------------- |
| id             | The ID of the record to link a case to. |

The request body is a JSON object with a single field:

| Body parameter | Required | Description                                                      |
| -------------- | -------- | ---------------------------------------------------------------- |
| case_id        | Yes      | The public case number of the case to link (a positive integer). |

An unknown body or query parameter returns a `400`.

```bash
curl --proto '=https' --tlsv1.2 \
  -X POST \
  "https://<tenant-domain>/api/v2/records/<<record_id>>/cases" \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{ "case_id": 42 }'
```

## Response

A successful request returns `204 No Content` with no response body. Use the [List a record's cases API](/api/records/cases) to read the record's linked cases.

## Errors

Errors are returned as a JSON object with an `error` field, along with an appropriate HTTP status code:

```json
{
  "error": {
    "type": "bad_request",
    "message": "case_id must be a positive integer",
    "field": "case_id"
  }
}
```

| Status | Meaning                                                                                                                          |
| ------ | -------------------------------------------------------------------------------------------------------------------------------- |
| 400    | Invalid request — a malformed record ID, a missing or invalid `case_id`, or an unknown body or query parameter.                  |
| 403    | The tenant does not have access to records, or the caller lacks permission to link this record and case.                         |
| 404    | Record or case not found, or the calling token does not have access to one of them.                                              |
| 408    | The write timed out. Retry the request.                                                                                          |
| 422    | The case could not be linked — for example the caller may add records to cases but lacks permission to create or manage records. |

The `error` object always carries `type` and `message`; validation errors add a `field` pointer.
