Skip to content

Report one session note from an agent

Report one session note from an agent

POST /api/v1/notes

Personal token · notes:write

A retry with the same note ID stores only the first note. Notes belong to their sender.

Example request

Link to this section
Shell
# Set your token and resource IDs first.
API_BASE_URL="https://app.theseus.dev/api/v1"

curl --fail-with-body --request POST \
  -H "Authorization: Bearer ${THESEUS_API_TOKEN:?}" \
  "${API_BASE_URL}/notes"

Content type application/json

  • note_id string (uuid) required

  • repository string required

    Minimum length 1 · Maximum length 512 · Pattern ^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$

  • workspace string

    Minimum length 1 · Maximum length 256

  • branch string or null required

    Minimum length 1 · Maximum length 1024

  • head_sha string or null required

    Pattern ^[a-f0-9]{40}$

  • kind string required

    One of decision, attempt, learning, reversal

  • text string required

    Maximum length 500 · Pattern ^[^\r\n]*\S[^\r\n]*$

  • harness string or null required

    Pattern ^[a-z0-9-]{1,64}$

  • session_id string or null required

    Minimum length 1 · Maximum length 1024

  • noted_at integer required

    Minimum 0 · Maximum 9007199254740991

Stored, or already stored under this note ID

No response body.

400 · The request is not valid

Error response fields

401 · A valid bearer token is required

Error response fields

403 · The credential's scopes do not allow this

Error response fields

404 · Not found

Error response fields

409 · The request matches more than one resource

Error response fields

426 · Upgrade the CLI: run theseus update

Error response fields

429 · Too many requests

Headers

  • Retry-After integer

    Seconds to wait before the next request, when known

Error response fields

503 · Theseus is unavailable; retry the same request

Headers

  • Retry-After integer

    Seconds to wait before the next request, when known

Error response fields

Error response fields

Content type application/problem+json

  • type string (uri) required

    Identifies the problem type; branch on code instead

  • title string required

  • status integer required

  • detail string

  • code string required

    Why the request failed. New codes may be added: treat an unknown one by its status

    One of invalid_request, unauthenticated, not_in_plan, insufficient_scope, admission_required, not_found, ambiguous, conflict, rate_limited, internal_error, unavailable, search_authorization_pending, search_unavailable, cli_upgrade_required

  • request_id string required

    Quote this when reporting the problem

  • errors array of FieldError

    With invalid_request: what is wrong with each field

    errors fields
    • path string required

      Where in the request, as dotted segments

    • message string required

  • required_scope string

    With insufficient_scope: the scope the operation needs

  • next string

    Recovery action, such as theseus update

  • candidates array of Candidate

    With ambiguous: what the request could mean; ask which

    candidates fields
    • id string required

    • path string required

    • kind string required

    • title string required

    • url string (uri) required