Create an absence
POST/api/v1/absences
- Needs an API key, and runs with the access of the member who made the key.
- Send an
Idempotency-Key. The same key with the same request within 24 hours gives the first answer again and changes nothing. - A connected AI assistant can use it too, as
createAbsence.
Parameters
Headers
Idempotency-KeystringrequiredUnique user-scoped key for safely retrying this mutation for 24 hours.
At least 1 character. Up to 200 characters.
Request body
Sent as application/json.
absenceobjectrequiredFields(5)
lock_versionintegerAt least 0.
membership_idstring (uuid)reasonstring or nullUp to 500 characters.
starts_atstring (date-time)requiredends_atstring (date-time)required
Responses
201Absence details.
dataobjectrequiredFields(9)
lock_versionintegerAt least 0.
created_atstring (date-time)requiredupdated_atstring (date-time)requiredidstring (uuid)requiredaccount_idstring (uuid)requiredmembership_idstring (uuid)requiredreasonstring or nullstarts_atstring (date-time)requiredends_atstring (date-time)required
A refusal answers in the one error shape every operation shares.
Example
A request our own tests send. The ids are made up: put your own in their place.
curl -X POST "https://app.tradesender.co.uk/api/v1/absences" \
-H "Authorization: Bearer $TRADESENDER_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"absence": {
"membership_id": "36c7095b-fcec-58a6-b1e1-916bdae515d3",
"reason": "Holiday",
"starts_at": "2026-10-16T09:00:00+01:00",
"ends_at": "2026-10-16T17:00:00+01:00"
}
}'