Skip to main content
Dreams

List Dreams

Retrieve a paginated history of Dreams created by the current account.

GET /api/v1/forward/dreams Results are ordered by creation time, newest first. Archived Dreams are excluded by default.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or admin SAT>.

Query parameters

ParameterTypeRequiredDefaultDescription
limitintegerNo20Number of items per page, from 1-100.
after_idstringNo—ID of the last Dream on the current page, used to continue to older records.
before_idstringNo—ID of the first Dream on the current page, used to return to the previous page of newer records.
include_archivedbooleanNofalseWhether to include archived Dreams. Accepts only true or false.
before_id and after_id cannot be used together. Duplicate or undefined query parameters are not accepted.

Example request

curl -s 'https://api.qoder.com/api/v1/forward/dreams?limit=20&include_archived=true' \
  -H "Authorization: Bearer $QODER_PAT"

Example response

HTTP 200 OK
{
  "data": [
    {
      "id": "drm_019e86b4a8f070a3b6c5d4e3f2a1b0c9",
      "type": "dream",
      "status": "completed",
      "inputs": [{
        "type": "identity_template",
        "identity_id": "idn_019eabc123",
        "template_id": "tmpl_support"
      }],
      "outputs": [{
        "type": "memory_store",
        "memory_store_id": "memstore_019e86b4b10578059435632bb357c5ed",
        "files_touched": ["preferences.md"]
      }],
      "model": { "id": "auto" },
      "instructions": "Focus on long-term preferences confirmed by the user",
      "usage": {
        "input_tokens": 12500,
        "output_tokens": 3200,
        "cache_creation_input_tokens": 0,
        "cache_read_input_tokens": 8000
      },
      "error": null,
      "created_at": "2026-09-15T03:00:00Z",
      "ended_at": "2026-09-15T03:03:42Z",
      "archived_at": null
    }
  ],
  "first_id": "drm_019e86b4a8f070a3b6c5d4e3f2a1b0c9",
  "last_id": "drm_019e86b4a8f070a3b6c5d4e3f2a1b0c9",
  "has_more": false
}

Empty list response

{
  "data": [],
  "first_id": null,
  "last_id": null,
  "has_more": false
}

Response fields

FieldTypeDescription
dataobject[]Dream objects on the current page.
first_idstring/nullID of the first Dream on the current page; null for an empty list.
last_idstring/nullID of the last Dream on the current page; null for an empty list.
has_morebooleanWhether more records exist in the current pagination direction.

Errors

HTTPTypeTrigger
400invalid_request_errorInvalid pagination, boolean, or query parameters. error.code is invalid_pagination.
401authentication_errorAuthentication is missing, invalid, or expired.
403permission_errorThe token cannot query Dreams. Identity SAT is not supported by this endpoint.
404not_found_errorThe Dream referenced by before_id or after_id does not exist or is not visible to the caller. error.code is dream_not_found.
500/502/503api_errorThe service or an internal dependency is temporarily unavailable.
Best Practices
API reference