Skip to content
TasksMate Developers

0.x — pre-release, no compatibility promise yet.What this means

What this is: two headers that make retries and concurrent edits safe. When you need it: any create you might retry; any update someone else might race.

Terminal window
# read, keep the ETag
etag=$(curl -sI "$TASKSMATE_API_URL/v1/tasks/T123456" -H "Authorization: Bearer $TASKSMATE_TOKEN" \
| awk -F': ' 'tolower($1)=="etag"{print $2}' | tr -d '\r')
# write only if nobody changed it since
curl -X PATCH "$TASKSMATE_API_URL/v1/tasks/T123456" \
-H "Authorization: Bearer $TASKSMATE_TOKEN" -H "If-Match: $etag" \
-H "Content-Type: application/json" -d '{"status": "completed"}'
Create a taskIdempotency-Key: k1Retry — same keyIdempotency-Key: k1TasksMate/v1/tasksOne taskcreated onceNo second taskreplayed
Two identical requests, one Idempotency-Key, one task

Idempotency-Key: Replay the first response for 24 h when the same request is retried with this key. A replayed answer carries Idempotent-Replayed: true. Keys live 24 h; use a fresh UUID per logical create.

  • Same key, different request — This Idempotency-Key was first used for a different request (method, path or body).
  • Same key, first still running — The first request with this Idempotency-Key has not finished; retry shortly.

The operations that honour it:

The SDK and tm send a key on every create and reuse it for their retries.

Single reads return an ETag.

  • If-None-Match on a read: An ETag you hold; unchanged → 304 with no body.
  • If-Match on a write: The ETag you read; a stale one is a 412 and nothing is written.

PATCH changes only the fields you send; null clears one. Each resource’s PUT twin is deprecated — prefer PATCH: