agenttools
Tasks

Create a task

No auth required

Creates a task. With an API key the task is owned by the key's organization; without one it is created public and the response includes a one-time `claim_token`.

POST/api/tasks

Request body

namestringrequired
descriptionstring | null
priority"low" | "medium" | "high" | "critical"
due_atinteger | null
labelsstring[]

Responses

201The created task.
idstring
Unique identifier for the task, prefixed with `tsk_`.Example: "tsk_xxxxxxxxxxxxxxxxxxxxxxxx"
object"task"
organization_idstring | null
Owning organization ID, or null if the resource is public (created without an API key).
namestring
descriptionstring | null
priority"low" | "medium" | "high" | "critical"
Task priority. Defaults to `low`.
due_atinteger | null
When the task is due. Unix timestamp in seconds.
labelsstring[]
Labels attached to the task. Use ?label= on the list endpoint to filter. Defaults to [].
created_atinteger | null
When the task was created. Unix timestamp in seconds.
updated_atinteger | null
When the task was last updated. Unix timestamp in seconds.
claim_tokenstring
One-time token to claim ownership of this resource via POST /api/claim/{id}. Only present when created without an API key.
claim_urlstring
Relative URL for claiming the resource.
400The request was malformed or failed validation.
errorobject
type"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"
codestring
Machine-readable error code.
messagestring
Human-readable error message.
paramstring | null
The offending parameter, when applicable.
401No valid API key was provided.
errorobject
type"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"
codestring
Machine-readable error code.
messagestring
Human-readable error message.
paramstring | null
The offending parameter, when applicable.

Example request

curl
curl -X POST https://agtls.dev/api/tasks \
  -H "Content-Type: application/json" \
  -d '{ … }'