List finished tasks
const url = 'https://api.gopromptless.ai/v1/triggers?limit=50&offset=0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.gopromptless.ai/v1/triggers?limit=50&offset=0' \ --header 'Authorization: Bearer <token>'Lists the organization’s finished tasks, newest completion first, including tasks that made no documentation change. Only finished tasks appear; follow a running task with GET /v1/triggers/{trigger_event_id}. Filter with source, bound with since, and page with limit and offset.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”ISO 8601 timestamp used as an inclusive lower limit on the completion timestamp. A trailing Z is accepted, and a value without a timezone is read as UTC. A task whose completion timestamp equals this value is returned again, so deduplicate by trigger_event_id and finished_at together. A task that Promptless reopens and finishes again returns with the same trigger_event_id and a new finished_at.
Exact trigger source to return, such as api. Omit to return every source.
Maximum number of tasks to return.
Number of tasks to skip before returning results.
Responses
Section titled “Responses”A page of finished tasks, newest completion first.
A page of finished tasks from the finished-task feed, newest completion first.
object
The finished tasks in this page, newest completion first.
One finished task in the finished-task feed.
object
The task’s id, the same id POST /v1/triggers returned. A task that Promptless reopens and finishes again appears again with this id, so deduplicate the feed on this value and finished_at together.
The task’s origin, such as api.
A one-line summary of the submitted request.
How the task ended. Null for tasks that finished before Promptless added this field and for tasks from sources other than the API or MCP. Promptless may add values later.
A note that explains how the task ended.
ISO 8601 time the task was submitted.
ISO 8601 time the task finished.
Example
{ "tasks": [ { "trigger_event_id": "d3aa7c40-5ec4-48c6-8d10-81c2ee042690", "outcome": "suggestions_created" } ]}The since parameter is not a valid ISO 8601 timestamp (invalid_since).
Error body returned when an API trigger request is rejected.
object
Stable machine-readable error code.
Human-readable explanation of the error.
Example
{ "error": "authentication_failed", "message": "Authentication failed."}The API key is missing, invalid, or revoked.
Error body returned when an API trigger request is rejected.
object
Stable machine-readable error code.
Human-readable explanation of the error.
Example
{ "error": "authentication_failed", "message": "Authentication failed."}A query parameter is out of range, such as a limit above 100 or a negative offset.
Validation error body returned when the request fails schema validation.
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}The read store is temporarily unavailable (runtime_store_unavailable).
Error body returned when an API trigger request is rejected.
object
Stable machine-readable error code.
Human-readable explanation of the error.
Example
{ "error": "authentication_failed", "message": "Authentication failed."}