Tasks API
A task is a unit of work given to an agent, or to a person. It can run once when you ask, on a schedule, or when an event happens. Every run is kept with its output, cost and duration, so you can see what was done and what it cost.
Base path: /api/v1/tasks. Permissions: tasks:read to read, tasks:write to create, change, run and decide.
List tasks
GET /api/v1/tasks
| Parameter | Type | Description |
|---|---|---|
page, limit | integer | Paging (default limit 50) |
appId, teamId | string | Only this workspace or team |
assignedAgentId | string | Only tasks assigned to this agent |
status | string | pending, in_progress, completed, failed, cancelled or paused |
type | string | manual, scheduled or triggered |
priority | string | low, medium, high or urgent |
inbox | string | self returns the tasks assigned to you, the caller |
Create a task
POST /api/v1/tasks
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | 2-200 characters |
description | string | No | What should be done, up to 1,000 characters |
assignedAgentId | string | No | The agent that does the work |
assignedAgents | string[] | No | Several agents |
assignedUserId | string | No | A person, for human work |
appId, teamId | string | No | Workspace and team |
projectId, milestoneId | string | No | Attach the task to a project milestone |
type | string | No | manual (default), scheduled or triggered |
schedule | string | No | Cron expression, for scheduled tasks |
timezone | string | No | Timezone of the schedule, for example Europe/Paris |
priority | string | No | low, medium, high or urgent |
deadline | string | No | ISO 8601 date-time |
dependencies | string[] | No | Tasks that must finish first |
input | object | No | Extra context for the agent |
settings | object | No | maxRetries, timeoutMs, retryDelayMs, enableMemory |
curl -X POST https://api.meetloyd.com/api/v1/tasks \
-H "Authorization: Bearer $MEETLOYD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Daily pipeline briefing",
"description": "Summarise new leads, deal changes and today'\''s meetings.",
"assignedAgentId": "agent_sales_lead",
"type": "scheduled",
"schedule": "0 8 * * 1-5",
"timezone": "Europe/Paris",
"priority": "high"
}'
Read, change, delete
GET /api/v1/tasks/:id
PATCH /api/v1/tasks/:id
DELETE /api/v1/tasks/:id
PATCH changes only the fields you send, including status.
Run, cancel, retry
POST /api/v1/tasks/:id/run
POST /api/v1/tasks/:id/cancel
POST /api/v1/tasks/:id/retry
run queues the task for its agent and answers 202 with { "queued": true, "taskId" }. Follow progress through the task's status and its runs. A task with no agent assigned answers 400. retry runs a failed task again with the same configuration.
Runs
GET /api/v1/tasks/:id/runs?page=1&limit=50
GET /api/v1/tasks/runs/:runId
Each run has its status, output, tool calls, token usage, cost and start and end times. GET /api/v1/tasks/runs lists recent runs across tasks.
Approvals and human work
GET /api/v1/tasks/pending-approval?appId=&teamId=
POST /api/v1/tasks/:id/approve { "autoExecute"?: boolean }
POST /api/v1/tasks/:id/reject { "reason"?: string }
POST /api/v1/tasks/:id/claim
Tasks that need a person's approval before they run are listed by pending-approval. Only the person the decision belongs to can approve or reject it; anyone else gets 403 with "code": "assigned_to_someone_else". claim records that you have picked up a task assigned to people.
Common schedules
| Cron | Runs |
|---|---|
0 9 * * 1-5 | Weekdays at 9:00 |
0 */2 * * * | Every 2 hours |
0 8 * * 1 | Mondays at 8:00 |
0 0 1 * * | First day of each month at midnight |
*/30 * * * * | Every 30 minutes |
Just ask Loyd
In the dashboard you can ask Loyd to "create a task for the research agent to summarise competitor news every Monday at 8". Loyd creates the same task the API would.