Answer an invitation
POST
/api/v1/mailbox/calendar/invitations/{invitation_id}/rsvpAccepts, declines or tentatively accepts. The organizer is emailed the answer and, unless declined, the event goes in calendar.
Errors
| Status | When |
|---|---|
401 |
No token, or the session expired or was signed out. Sign in again with POST /mailbox-auth/login. |
403 |
The account has a temporary password: until POST /security/password succeeds, every other call answers this with error_code: password_change_required. |
404 |
That invitation is no longer there. |
422 |
response is not accepted, declined or tentative, or the invitation cannot be read. |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
invitation_idrequired | path | string |
Request body
responsestringrequiredaccepted,declinedortentative.calendarstringWhere to put the event (default
default).
Request
POST
/api/v1/mailbox/calendar/invitations/{invitation_id}/rsvpcurl -X POST 'https://courier.mailyte.com/api/v1/mailbox/calendar/invitations/01JBT8XQ2M9WYC3K4F6R7S8T9V/rsvp' \
-H 'Authorization: Bearer MAILBOX_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"response": "accepted",
"calendar": "default"
}'const response = await fetch('https://courier.mailyte.com/api/v1/mailbox/calendar/invitations/01JBT8XQ2M9WYC3K4F6R7S8T9V/rsvp', {
method: 'POST',
headers: {
Authorization: 'Bearer MAILBOX_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"response": "accepted",
"calendar": "default"
}),
});
const { data } = await response.json();import requests
response = requests.post(
"https://courier.mailyte.com/api/v1/mailbox/calendar/invitations/01JBT8XQ2M9WYC3K4F6R7S8T9V/rsvp",
headers={"Authorization": "Bearer MAILBOX_TOKEN"},
json={
"response": "accepted",
"calendar": "default"
},
)
data = response.json()["data"]<?php
$response = Http::withToken('MAILBOX_TOKEN')
->post('https://courier.mailyte.com/api/v1/mailbox/calendar/invitations/01JBT8XQ2M9WYC3K4F6R7S8T9V/rsvp', [
'response' => 'accepted',
'calendar' => 'default',
]);
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://courier.mailyte.com/api/v1/mailbox/calendar/invitations/01JBT8XQ2M9WYC3K4F6R7S8T9V/rsvp")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer MAILBOX_TOKEN"
request["Content-Type"] = "application/json"
request.body = {
"response": "accepted",
"calendar": "default"
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Successful Response
dataobjectidstringresponsestring
200
application/json{
"type": "success",
"msg": "Your answer has been sent",
"data": {
"id": "8f14e45f.ics",
"response": "accepted"
}
}Returned inside the standard envelope.
Errors
| Status | When |
|---|---|
401 | No token, or the session expired or was signed out. Sign in again with `POST /mailbox-auth/login`. |
403 | The account has a temporary password: until `POST /security/password` succeeds, every other call answers this with `error_code: password_change_required`. |
404 | `That invitation is no longer there`. |
422 | `response` is not accepted, declined or tentative, or the invitation cannot be read. |
Every status, with what causes it and what to do, is on the error reference.