1. API
  2. Records

Link a 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; either endpoint creates the same link. See the Get record API 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.

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 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:

{
  "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.

Was this helpful?
Link a case | API | Tines