Companion

11 endpoints·Scopes: companion:read, companion:write
GET/api/companion/sessions#

List companion sessions

scope · companion:read

Returns the sessions data for the companion sessions feature.

Scope: companion:read
Endpoint: GET /api/companion/sessions

Example request

curl "https://guliel.com/api/companion/sessions?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string

Response (200/201)

  • sessionsreq
    array<object>
    • idreq
      string
    • titlereq
      string
    • iconreq
      string
    • lastActivityAtreq
      string
    • archivedreq
      boolean
    • livereq
      boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/companion/sessions#

Start a companion session

scope · companion:writerole · CONTRIBUTOR+

Performs the sessions operation for the companion sessions feature.

Scope: companion:write
Min role: CONTRIBUTOR or higher
Endpoint: POST /api/companion/sessions

Example request

curl -X POST "https://guliel.com/api/companion/sessions" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "sessionId": "abc123",
  "text": "string"
}'

Request body

  • organizationIdreq
    string
  • sessionIdreq
    string
  • textreq
    string
  • title
    string
  • icon
    string
  • attachments
    array<object>
    • namereq
      string
    • sizereq
      number
    • typereq
      string
    • storageKeyreq
      string

Response (200/201)

  • sessionIdreq
    string
  • turnRunIdreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
DELETE/api/companion/sessions/{id}#

Delete a companion session

scope · companion:write

Removes the association without deleting the underlying record.

Scope: companion:write
Endpoint: DELETE /api/companion/sessions/{id}

Example request

curl -X DELETE "https://guliel.com/api/companion/sessions/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

  • successreq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/companion/sessions/{id}#

Get a companion session thread

scope · companion:read

Returns every sessions row associated with the given companion session.

Scope: companion:read
Endpoint: GET /api/companion/sessions/{id}

Example request

curl "https://guliel.com/api/companion/sessions/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

  • idreq
    string
  • organizationIdreq
    string
  • titlereq
    string
  • iconreq
    string
  • archivedreq
    boolean
  • lastActivityAtreq
    string
  • createdAtreq
    string
  • messagesreq
    array<object>
    • idreq
      string
    • rolereq
      enum<2>
      user · assistant
    • indexreq
      integer
    • textreq
      string | null
    • attachmentsreq
      array<object> | null
    • turnRunIdreq
      string | null
    • createdAtreq
      string
  • stepsreq
    array<object>
    • idreq
      string
    • kindreq
      enum<4>
      TOOL · AGENT · WORKFLOW · TEXT
    • refreq
      string | null
    • parentIdreq
      string | null
    • orderreq
      integer
    • inputreq
      any
    • outputreq
      any | null
    • statusreq
      enum<5>
      PENDING · RUNNING · SUCCEEDED · FAILED · SKIPPED
    • errorreq
      string | null
    • turnRunIdreq
      string | null
  • activeTurnRunIdreq
    string | null

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
PATCH/api/companion/sessions/{id}#

Rename a companion session

scope · companion:write

Mutates the sessions attached to the given companion session.

Scope: companion:write
Endpoint: PATCH /api/companion/sessions/{id}

Example request

curl -X PATCH "https://guliel.com/api/companion/sessions/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123",
  "title": "string"
}'

Request body

  • idreq
    string
  • titlereq
    string

Response (200/201)

  • idreq
    string
  • titlereq
    string
  • iconreq
    string
  • lastActivityAtreq
    string
  • archivedreq
    boolean
  • livereq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/companion/sessions/{id}/export#

Export a companion session transcript

scope · companion:read

Returns every sessions/export row associated with the given companion session.

Scope: companion:read
Endpoint: GET /api/companion/sessions/{id}/export

Example request

curl "https://guliel.com/api/companion/sessions/abc123/export?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

JSON object. The exact response shape is being progressively documented — call the endpoint with a real access token to see the live structure, or check the type definitions exposed by the official client libraries.

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/companion/sessions/{id}/messages#

Send a companion message

scope · companion:writerole · CONTRIBUTOR+

Creates a new sessions/messages attached to the given companion session.

Scope: companion:write
Min role: CONTRIBUTOR or higher
Endpoint: POST /api/companion/sessions/{id}/messages

Example request

curl -X POST "https://guliel.com/api/companion/sessions/abc123/messages" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123",
  "text": "string"
}'

Request body

  • idreq
    string
  • textreq
    string
  • attachments
    array<object>
    • namereq
      string
    • sizereq
      number
    • typereq
      string
    • storageKeyreq
      string

Response (200/201)

  • turnRunIdreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/companion/sessions/{id}/runlog#

Get a companion session run log

scope · companion:read

Returns every sessions/runlog row associated with the given companion session.

Scope: companion:read
Endpoint: GET /api/companion/sessions/{id}/runlog

Example request

curl "https://guliel.com/api/companion/sessions/abc123/runlog?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • pagereq
    integer
  • limitreq
    integer

Response (200/201)

  • stepsreq
    array<object>
    • idreq
      string
    • kindreq
      enum<4>
      TOOL · AGENT · WORKFLOW · TEXT
    • refreq
      string | null
    • parentIdreq
      string | null
    • orderreq
      integer
    • inputreq
      any
    • outputreq
      any | null
    • statusreq
      enum<5>
      PENDING · RUNNING · SUCCEEDED · FAILED · SKIPPED
    • errorreq
      string | null
    • turnRunIdreq
      string
  • paginationreq
    object
    • pagereq
      integer
    • limitreq
      integer
    • totalreq
      integer
    • totalPagesreq
      integer

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
GET/api/companion/sessions/{id}/stream#

Stream a companion turn

scope · companion:read

Returns every sessions/stream row associated with the given companion session.

Scope: companion:read
Endpoint: GET /api/companion/sessions/{id}/stream

Example request

curl "https://guliel.com/api/companion/sessions/abc123/stream?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • lastEventId
    integer

Response (200/201)

JSON object. The exact response shape is being progressively documented — call the endpoint with a real access token to see the live structure, or check the type definitions exposed by the official client libraries.

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
GET/api/companion/turns/{id}#

Get a companion turn ledger

scope · companion:read

Returns every turns row associated with the given companion session.

Scope: companion:read
Endpoint: GET /api/companion/turns/{id}

Example request

curl "https://guliel.com/api/companion/turns/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • afterSeq
    integer

Response (200/201)

  • turnRunIdreq
    string
  • sessionIdreq
    string
  • statusreq
    enum<4>
    RUNNING · SUCCEEDED · FAILED · CANCELLED
  • startedAtreq
    string | null
  • finishedAtreq
    string | null
  • errorreq
    string | null
  • stepsreq
    array<object>
    • idreq
      string
    • kindreq
      enum<4>
      TOOL · AGENT · WORKFLOW · TEXT
    • refreq
      string | null
    • parentIdreq
      string | null
    • orderreq
      integer
    • inputreq
      any
    • outputreq
      any | null
    • statusreq
      enum<5>
      PENDING · RUNNING · SUCCEEDED · FAILED · SKIPPED
    • errorreq
      string | null
    • turnRunIdreq
      string | null
  • tokensreq
    array<object>
    • seqreq
      integer
    • stepIdreq
      string | null
    • deltareq
      string

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/companion/turns/{id}/cancel#

Stop (cancel) a running companion turn

scope · companion:write

Creates a new turns/cancel attached to the given companion session.

Scope: companion:write
Endpoint: POST /api/companion/turns/{id}/cancel

Example request

curl -X POST "https://guliel.com/api/companion/turns/abc123/cancel" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string

Response (200/201)

  • idreq
    string
  • statusreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal