Create a subscription link
POST
/api/v1/mailbox/calendar-subscriptionsErrors
| 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. |
Request body
calendarstringWhich calendar the link shows (default
default).labelstring or nullA name to tell links apart.
Request
POST
/api/v1/mailbox/calendar-subscriptionscurl -X POST 'https://courier.mailyte.com/api/v1/mailbox/calendar-subscriptions' \
-H 'Authorization: Bearer MAILBOX_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"calendar": "default",
"label": "My phone"
}'const response = await fetch('https://courier.mailyte.com/api/v1/mailbox/calendar-subscriptions', {
method: 'POST',
headers: {
Authorization: 'Bearer MAILBOX_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"calendar": "default",
"label": "My phone"
}),
});
const { data } = await response.json();import requests
response = requests.post(
"https://courier.mailyte.com/api/v1/mailbox/calendar-subscriptions",
headers={"Authorization": "Bearer MAILBOX_TOKEN"},
json={
"calendar": "default",
"label": "My phone"
},
)
data = response.json()["data"]<?php
$response = Http::withToken('MAILBOX_TOKEN')
->post('https://courier.mailyte.com/api/v1/mailbox/calendar-subscriptions', [
'calendar' => 'default',
'label' => 'My phone',
]);
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://courier.mailyte.com/api/v1/mailbox/calendar-subscriptions")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer MAILBOX_TOKEN"
request["Content-Type"] = "application/json"
request.body = {
"calendar": "default",
"label": "My phone"
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Success.
dataobjecttokenstringcalendar_uristringlabelstring or nullurlstringwebcal_urlstringcreated_atstring
200
application/json{
"type": "success",
"msg": "Subscription link created",
"data": {
"token": "s3cr3t-token",
"calendar_uri": "default",
"label": "My phone",
"url": "https://mail.mailyte.com/ics/s3cr3t-token.ics",
"webcal_url": "webcal://mail.mailyte.com/ics/s3cr3t-token.ics",
"created_at": "2026-10-11T12:00:00+00:00"
}
}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`. |
422 | Validation Error |
Every status, with what causes it and what to do, is on the error reference.