Orishare
API reference
GET
/assistant/conversations

Authorization

AuthorizationBearer <token>

Personal access token. Scopes are listed in x-orishare-authorization.

In: header

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Lengthlength <= 2048

Header Parameters

X-Orishare-Environment*string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/assistant/conversations" \  -H "X-Orishare-Environment: string"
{  "data": [    {      "id": "string",      "environment_id": "string",      "title": "string",      "author_user_id": "string",      "turn_count": -9007199254740991,      "created_at": "string",      "updated_at": "string",      "expires_at": "string"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/assistant/conversations

Authorization

AuthorizationBearer <token>

Personal access token. Scopes are listed in x-orishare-authorization.

In: header

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment*string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/assistant/conversations" \  -H "Idempotency-Key: string" \  -H "X-Orishare-Environment: string" \  -H "Content-Type: application/json" \  -d '{    "title": "Weekend streak campaign"  }'
{  "id": "string",  "environment_id": "string",  "title": "string",  "author_user_id": "string",  "turn_count": -9007199254740991,  "created_at": "string",  "updated_at": "string",  "expires_at": "string"}
GET
/assistant/conversations/{id}

Authorization

AuthorizationBearer <token>

Personal access token. Scopes are listed in x-orishare-authorization.

In: header

Path Parameters

id*string
Length1 <= length <= 64

Header Parameters

X-Orishare-Environment*string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/assistant/conversations/string" \  -H "X-Orishare-Environment: string"
{  "id": "string",  "environment_id": "string",  "title": "string",  "author_user_id": "string",  "turn_count": -9007199254740991,  "created_at": "string",  "updated_at": "string",  "expires_at": "string",  "turns": [    {      "id": "string",      "conversation_id": "string",      "index": -9007199254740991,      "status": "running",      "hidden": true,      "notice": "string",      "user_message": "string",      "final_text": "string",      "proposal_ids": [        "string"      ],      "error_code": "string",      "tool_call_count": -9007199254740991,      "usage": {        "input_tokens": -9007199254740991,        "output_tokens": -9007199254740991      },      "created_at": "string",      "completed_at": "string"    }  ]}
POST
/assistant/conversations/{id}/turns

Authorization

AuthorizationBearer <token>

Personal access token. Scopes are listed in x-orishare-authorization.

In: header

Path Parameters

id*string
Length1 <= length <= 64

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment*string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/assistant/conversations/string/turns" \  -H "Idempotency-Key: string" \  -H "X-Orishare-Environment: string" \  -H "Content-Type: application/json" \  -d '{    "message": "Propose a streak that rewards three visits in a week.",    "context": {      "page": {        "path": "/mechanics/streaks",        "title": "Streaks"      }    },    "app_map": [      {        "label": "Mechanics › Streaks",        "path": "/mechanics/streaks"      },      {        "label": "Settings › Organization › Billing",        "path": "/settings/billing"      },      {        "label": "Account menu (bottom of the sidebar) › Add organization"      }    ]  }'
{  "turn": {    "id": "string",    "conversation_id": "string",    "index": -9007199254740991,    "status": "running",    "hidden": true,    "notice": "string",    "user_message": "string",    "final_text": "string",    "proposal_ids": [      "string"    ],    "error_code": "string",    "tool_call_count": -9007199254740991,    "usage": {      "input_tokens": -9007199254740991,      "output_tokens": -9007199254740991    },    "created_at": "string",    "completed_at": "string"  },  "poll_url": "string"}
GET
/assistant/usage

Authorization

AuthorizationBearer <token>

Personal access token. Scopes are listed in x-orishare-authorization.

In: header

Header Parameters

X-Orishare-Environment*string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/assistant/usage" \  -H "X-Orishare-Environment: string"
{  "period": "string",  "period_start": "string",  "period_end": "string",  "runtime_scope": "staging",  "ai_enabled": true,  "assistant_available": true,  "budget": {    "unit": "ai_draft",    "used": 0,    "limit": 0,    "remaining": 0,    "percent_used": 0,    "limit_reached": true  },  "requests": {    "total": -9007199254740991,    "pending": -9007199254740991  },  "tokens": {    "input": -9007199254740991,    "output": -9007199254740991  }}
GET
/assistant/conversations/{id}/turns/{turn_id}

Authorization

AuthorizationBearer <token>

Personal access token. Scopes are listed in x-orishare-authorization.

In: header

Path Parameters

id*string
Length1 <= length <= 64
turn_id*string
Length1 <= length <= 64

Header Parameters

X-Orishare-Environment*string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/assistant/conversations/string/turns/string" \  -H "X-Orishare-Environment: string"
{  "id": "string",  "conversation_id": "string",  "index": -9007199254740991,  "status": "running",  "hidden": true,  "notice": "string",  "user_message": "string",  "final_text": "string",  "proposal_ids": [    "string"  ],  "error_code": "string",  "tool_call_count": -9007199254740991,  "usage": {    "input_tokens": -9007199254740991,    "output_tokens": -9007199254740991  },  "created_at": "string",  "completed_at": "string",  "tool_calls": [    {      "index": -9007199254740991,      "tool": "string",      "operation_id": "string",      "status": "ok",      "http_status": -9007199254740991,      "duration_ms": -9007199254740991,      "input": null,      "result": null,      "created_at": "string"    }  ]}