List suggestions
const url = 'https://api.gopromptless.ai/v1/suggestions?event=created&status=open&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/suggestions?event=created&status=open&limit=50&offset=0' \ --header 'Authorization: Bearer <token>'Read the suggestion lifecycle feed for your organization. Filter with event or status (not both), narrow with query and since, and page with limit and offset. Results are ordered newest-first by the selected event’s timestamp.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Select suggestions by lifecycle event and order by that event’s timestamp. Cannot be combined with status.
Select suggestions by current status. Cannot be combined with event.
Free-text match against suggestion title and description.
ISO 8601 timestamp used as an inclusive lower limit on the event timestamp. A row whose timestamp equals this value is returned again, so deduplicate by id.
Maximum number of suggestions to return.
Number of suggestions to skip before returning results.
Responses
Section titled “Responses”A page of suggestions from the lifecycle feed.
A page of suggestions from the lifecycle feed.
object
A documentation suggestion and its lifecycle state.
object
Current status, mirroring the docs pull request’s state (open, draft, merged, or closed). Null when the suggestion is drafted but no docs PR has been opened yet. Draft when a draft docs PR is open.
Identifier of the task that created the suggestion, the same id POST /v1/triggers returned. Null for suggestions created before tasks were recorded.
Link to the documentation pull request, or null before a docs PR exists.
True when the suggestion was closed without merging. Branch shipped versus rejected on this field.
Supplementary machine-readable label for why the suggestion closed. This set may expand over time and includes a catch-all (unknown_legacy), so branch on closed_without_merge rather than hard-coding these values.
Example
{ "suggestions": [ { "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "status": "open", "trigger_event_id": "550e8400-e29b-41d4-a716-446655440000", "url": "https://app.gopromptless.ai/suggestions/7c9e6679-7425-40de-944b-e07fc1f90ae7", "close_reason": "dashboard_review" } ]}A query parameter is invalid — since is not a valid ISO 8601 timestamp (invalid_since), or event and status were combined (invalid_filter).
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."}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."}