Create event
Allows you to create a new event in a specified calendar. Below is a detailed description of the request payload and the required/optional fields.
- HTTP Method:
POST
- Endpoint:
/rest-api/1/event-calendar/events
Fields description:
Field | Type | Required | Description |
---|---|---|---|
calendar | string | Yes | The unique identifier (UUID) of the calendar where the event will be created. |
name | string | Yes | The title of the event. |
description | string | No | A detailed description of the event, up to 1000 characters. |
url | string | No | A URL related to the event (e.g., a meeting link), up to 500 characters. |
color | string | No | The 7-char hex color code (e.g., "#FF5733" ) for the event. |
starting_date | string | Yes | The starting date of the event in ISO 8601 format (YYYY-MM-DD ). |
ending_date | string | Yes | The ending date of the event in ISO 8601 format (YYYY-MM-DD ). |
starting_time | string | No | The starting time of the event in HH:mm format. If provided, ending_time is required. |
ending_time | string | No | The ending time of the event in HH:mm format. If provided, starting_time is required. |
event_type | string | Yes | The event type, which must match a value from the event types endpoint. |
Request example:
fetch("https://<site-url>/rest-api/1/event-calendar/events", {
method: "POST",
headers: {
"X-AldevaDigital-Rest-Token": "your-access-token",
"Content-Type": "application/json",
},
body: JSON.stringify({
calendar: "123e4567-e89b-12d3-a456-426614174000",
name: "Sprint Planning Meeting",
description: "Planning the next sprint goals and tasks.",
url: "https://meeting-link.com",
color: "#FF5733",
starting_date: "2025-01-15",
ending_date: "2025-01-15",
starting_time: "10:00",
event_type: 1,
ending_time: "11:00",
}),
});
Response example:
{
"status": true,
"id": "987e6543-b21b-65d4-c789-426614170999"
}