/api/v1/tasks (POST)
const url = 'https://api.endless.zaia.app/api/v1/tasks';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"agentId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","condition":"example","name":"example","prompt":"example","status":"active"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.endless.zaia.app/api/v1/tasks \ --header 'Content-Type: application/json' \ --data '{ "agentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "condition": "example", "name": "example", "prompt": "example", "status": "active" }'Creates a new task.
Request Bodyrequired
Seção intitulada “Request Bodyrequired”object
The agent ID associated with the task.
The condition that must be met for the task to be executed.
The display name of the task.
What will be set as the main object of the agent when the task is selected.
The lifecycle status of the task.
Responses
Seção intitulada “Responses”The task was created.
object
A UUID v4 string that identifies an entity.
The ID of the original entity in production.
A UUID v4 string that identifies an entity.
The agent ID associated with the task.
The condition that must be met for the task to be executed.
The display name of the task.
What will be set as the main object of the agent when the task is selected.
The lifecycle status of the task.
Example
{ "status": "active"}Unauthorized.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}Agent not found.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}