Skip to content

Publish a schedule to its employees by email (user or API key)

Publishes a schedule: every employee with upcoming shifts on it is emailed their roster as a PDF, and the shifts are also pushed to their Microsoft 365 calendars when that integration is active. This is the only call that emails employees about shifts; assigning entries is silent. The emails are queued, so a 200 means they were handed to the queue, not delivered. from is normally the Monday of the week being sent: the emails then cover that week through Sunday. Omit it to send from today onwards with no end date. Granting the tempus-schedules scope to an API key allows this call.

HTTP: bearerAuth

User bearer token. Default authentication for customer-facing endpoints. Obtain a token by calling POST /login with your credentials, then send it on every subsequent request as Authorization: Bearer <token>. The token inherits the permissions and PBX scope of the authenticated user.

HTTP Authorization Scheme
bearer
Bearer format
Bearer <token>
HTTP: IntegrationApiKey

API key created on the Cockpit Integrations page (an "API key" integration). It is a bearer token owned by the customer's PBX and limited to the scopes selected when the key was created (e.g. phone-numbers, push-configuration).

Send it in the Authorization header:

Authorization: Bearer <api_key>

Manage keys (create / reveal / revoke) from Integrations → New integration → API key.

HTTP Authorization Scheme
bearer
pbx_id path · string · uuid *
UUID of the PBX tenant.
schedule path · string · uuid *
UUID of the schedule.
accept header · string
example: application/json

Request body · application/json

Request schema
fromstring | null · date
First day to publish, interpreted in the application timezone, normally the Monday of the week being sent. Omitted: today, with no end date.
example: 2026-03-02

Responses

The schedule was queued for publication.
Response schema
messagestring
Human-readable summary of what was queued.
dataobject
employeesinteger
Employees with upcoming shifts.
emailedinteger
Employees whose email was queued.
skipped_no_emailinteger
Employees skipped because they have no email address.
shiftsinteger
Shifts covered by the emails.
calendarobject
Outcome of the Microsoft 365 calendar push.
statusstring
enum: pushed already_pushed nothing_to_push no_mailbox not_configured disabled
pushedinteger
already_pushedinteger
no_mailboxinteger
totalinteger
Authorization Token Missing. This error is returned when the authorization token is missing.
Response schema
errorstring
Error message
example: Authorization Token is missing
The caller is refused. A PBX API key is rejected with 403 when it does not carry the `tempus-schedules` scope or when `pbx_id` is not the key's own PBX. A user token is refused when it has no schedules-management permission (or no employee record).
Response schema
messagestring
Data Not Found. This error is returned when the requested data is not found.
Response schema
messagearray<string>
[]string
Validation failed.
Response schema
messagestring
errorsobject
Free-form object
Too Many Requests. Besides the standard customer API limit, sending a schedule is limited to 5 requests per minute per API key (or user) and schedule. Retry after the window indicated by the Retry-After header.
Response schema
No response body.
post https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}/send
Base URL
Request sample
curl -X POST 'https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}/send' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data '{"from":"2026-03-02"}'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}/send', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${YOUR_TOKEN}`,
  },
  body: JSON.stringify({
    "from": "2026-03-02"
}),
});

const data = await response.json();
console.log(data);
import requests

response = requests.post('https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}/send',
    headers={'Authorization': f'Bearer {YOUR_TOKEN}'},
    json={
    "from": "2026-03-02"
}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
    'http' => [
        'method'  => 'POST',
        'header'  => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
        'content' => '{
    \"from\": \"2026-03-02\"
}',
    ],
]);

$response = file_get_contents('https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}/send', false, $context);
$data = json_decode($response, true);
print_r($data);
Sample request
{ … }
"from": "2026-03-02"
}
{ … }
"message": "Schedule queued for 3 employee(s) covering 12 shift(s). Emails are sent in the background. 12 shift(s) were also sent to Microsoft 365 calendars.",
"data": { … }
"employees": 3,
"emailed": 3,
"skipped_no_email": 0,
"shifts": 12,
"calendar": { … }
"status": "pushed",
"pushed": 12,
"already_pushed": 0,
"no_mailbox": 0,
"total": 12
}
}
}
{ … }
"error": "Authorization Token is missing"
}
Cache-Control string
example: private, must-revalidate
Connection string
example: keep-alive
Content-Type string
example: application/json
Vary string
example: Origin
X-RateLimit-Limit integer
Max requests allowed in the current rate-limit window.
example: 60
X-RateLimit-Remaining integer
Requests remaining in the current rate-limit window.
example: 57
{ … }
"message": "You do not have access to this PBX."
}
{ … }
"message": [ … ]
"Data not found"
]
}
Cache-Control string
example: private, must-revalidate
Connection string
example: keep-alive
Content-Type string
example: application/json
Vary string
example: Origin
X-RateLimit-Limit integer
Max requests allowed in the current rate-limit window.
example: 60
X-RateLimit-Remaining integer
Requests remaining in the current rate-limit window.
example: 57
{ … }
"message": "The from field must be a valid date.",
"errors": { … }
"from": [ … ]
"The from field must be a valid date."
]
}
}
No example for this status.