POST
/v1/me/calendar/events/{id}/respondAn invitation that arrives as mail lands on the calendar by itself, with
status: "pending", and holds its place until somebody answers.
Two answers and no third. Accepting confirms it and writes your line on the guest list. Ignoring takes it off the calendar outright, which is what ignore means: the mail is still in the mailbox with the invitation attached, so nothing is lost and it can be accepted from there again.
Declining is not here
Telling an organiser no is sending them a reply, which is a different thing from taking their invitation off your own calendar. Only the second is in this API.
Request
| Field | Required | Description |
|---|---|---|
answer | yes | accept or ignore |
curl -X POST https://api.proppertrading.com/v1/me/calendar/events/evt_b6t2q9m4x7f3k8hz/respond \
-H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
-H "Idempotency-Key: 8f14e45f-ea0d-4d1f-9c4b-3e11f0f2c0a1" \
-H "Content-Type: application/json" \
-d '{ "answer": "accept" }'
Response
200 with the confirmed appointment on accept, and 204 with no body on
ignore.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | missing_idempotency_key | The Idempotency-Key header was not sent. Every POST needs one |
| 400 | invalid_answer | The answer was not accept or ignore |
| 400 | not_an_invitation | That appointment is not waiting for an answer |
| 403 | insufficient_scope | This device does not hold calendar:write |
| 403 | calendar_read_only | The account may read that calendar but not write in it, or it is a followed calendar, which nobody writes in |
| 404 | resource_not_found | No such appointment here |