Records: Delete
Description
Delete a record. Responds 204 No Content on success.
See the Get record API to learn more about records.
Request
HTTP Method: DELETE
URL: https://<tenant-domain>/api/v2/records/<<record_id>>
| Path parameter | Description |
|---|---|
| id | The ID of the record to delete. |
Delete takes no request body. It accepts one optional query parameter:
| Query parameter | Description |
|---|---|
| test_mode | Optional query-string guardrail. Use the string true for a test record or false for a live record. For an authorized write, a mismatch returns 422. Omit to delete regardless of mode. |
An unknown query parameter or a non-empty request body returns a 400.
curl --proto '=https' --tlsv1.2 \
-X DELETE \
"https://<tenant-domain>/api/v2/records/<<record_id>>" \
-H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'
Response
A successful request returns 204 No Content with no response body.
Errors
Errors are returned as a JSON object with an error field, along with an appropriate HTTP status code:
{
"error": {
"type": "not_found",
"message": "Record not found"
}
}
| Status | Meaning |
|---|---|
| 400 | Invalid request — a malformed record ID, an invalid test_mode, an unknown query parameter, or a request body. |
| 403 | The tenant does not have access to records, or the caller lacks permission to delete this record. |
| 404 | Record not found, or the calling token does not have access to it. |
| 408 | The write timed out. Retry the request. |
| 422 | The test_mode guardrail did not match the record's mode. |
The error object always carries type and message.