Calendar API
Manage calendar tasks and events.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/agents/{id}/calendar | List calendar tasks |
| POST | /api/agents/{id}/calendar | Create calendar task |
| GET | /api/agents/{id}/calendar/{taskId} | Get task |
| PUT | /api/agents/{id}/calendar/{taskId} | Update task |
| DELETE | /api/agents/{id}/calendar/{taskId} | Delete task |
List Tasks
bash
GET /api/agents/{id}/calendar?start=2024-12-01&end=2024-12-31Query Parameters
| Parameter | Type | Description |
|---|---|---|
start | string | Start date (ISO 8601) |
end | string | End date (ISO 8601) |
Response
json
{
"tasks": [
{
"id": "task-123",
"title": "Team Standup",
"start_time": "2024-12-15T09:00:00Z",
"end_time": "2024-12-15T09:30:00Z",
"recurrence": "weekly",
"recurrence_days": [1, 2, 3, 4, 5],
"workflow_id": "standup-workflow",
"status": "pending"
}
]
}Create Task
bash
POST /api/agents/{id}/calendar
Content-Type: application/jsonRequest Body
json
{
"title": "Team Standup",
"description": "Daily team sync",
"start_time": "2024-12-15T09:00:00Z",
"end_time": "2024-12-15T09:30:00Z",
"recurrence": "weekly",
"recurrence_days": [1, 2, 3, 4, 5],
"workflow_id": "standup-workflow"
}Update Task
bash
PUT /api/agents/{id}/calendar/{taskId}Delete Task
bash
DELETE /api/agents/{id}/calendar/{taskId}Recurrence
| Pattern | Description |
|---|---|
none | One-time |
daily | Every day |
weekly | Specific days |
monthly | Specific dates |