Creates a calendar event, such as leave, a holiday, a day off or a role assignment.
https://api.doboard.com/{account_id}/calendar_events_add
account_id is the numeric organization identifier.
GET, POST. POST accepts parameters as application/x-www-form-urlencoded.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
session_id |
string | Yes | — | Authenticated session ID. |
event_name |
string | Yes | — | Nonempty event title, up to 64 characters. |
event_note |
string | No | null |
Event description. |
user_id |
int | Conditional | null |
Assigned user. Required when assigning a role. |
role_id |
int | Conditional | null |
Role assignment. Required for an assigned user unless period_type is VACATION_DAY or CALENDAR_DAY. |
period_type |
enum | No | null |
VACATION_DAY, CALENDAR_DAY or ROLE_DAY. |
location_id |
int | No | null |
Existing location ID. |
calendar_day_type |
enum | No | null |
NOT_WORKING_DAY or HOLIDAY. |
period_begin |
date | Yes | — | Start date in Y-m-d format. |
period_end |
date | No | null |
End date in Y-m-d format. Must not precede the start date. |
shift_duration |
int | No | null |
Shift duration in hours. Use a positive whole number no greater than 24. |
viewers_ids |
array or comma-separated string | No | Empty list | Existing user IDs to notify about the event. |
Requires a valid session.
ADMIN and PROJECT_MANAGER users can assign an event to another user. Other users can supply their own ID.
If a non-manager supplies another user’s ID, the implementation ignores that assignment and uses no assigned user. Omitting user_id does not automatically select the session user.
Create leave for the user identified by 12:
POST /42/calendar_events_add HTTP/1.1
Host: api.doboard.com
Content-Type: application/x-www-form-urlencoded
session_id=YOUR_SESSION_ID&event_name=Annual+leave&event_note=Approved+leave&user_id=12&period_type=VACATION_DAY&period_begin=2026-11-09&period_end=2026-11-13&location_id=7
{
"data": {
"operation_status": "SUCCESS",
"event_id": 501
}
}
event_id identifies the created event. All example IDs and dates are illustrative.
All business errors below return HTTP 200.
error_no |
Message | Description |
|---|---|---|
1601 |
User Not Found |
The accepted user assignment refers to a missing user. |
1602 |
event_name is required |
Event title is missing or empty. |
1603 |
Role Not Found |
Role does not exist. |
1604 |
user_id is required |
A role was supplied without an accepted user assignment. |
1605 |
period_type must be in ('VACATION_DAY','CALENDAR_DAY','ROLE_DAY') |
Unsupported period type. |
1606 |
Location Not Found |
Location does not exist. |
1607 |
calendar_day_type must be in ('NOT_WORKING_DAY','HOLIDAY') |
Unsupported calendar-day type. |
1608 |
role_id is required |
Assigned user requires a role for the supplied period type. |
1609 |
period_begin wrong format, expected format: Y-m-d |
Start date could not be parsed. |
1610 |
period_begin is required |
Start date is missing or empty. |
1611 |
period_end wrong format, expected format: Y-m-d |
End date could not be parsed. |
1612 |
period_end must be greater than period_begin |
End date precedes start date. |
1613 |
shift_duration cannot be greater than 24 |
Shift duration exceeds 24. |
1614 |
Event already exists for this user and role within the selected period. |
An overlapping assignment exists for the same user and role. |
0 |
Internal API Error |
Event creation failed. |
Missing or invalid sessions return HTTP 401, error_no=401, session_id Unknown.
null; shift_duration=0 is treated as empty.viewers_ids is ignored for guest sessions. Otherwise, duplicate, nonpositive and nonexistent IDs are excluded.