Orishare
API reference
GET
/organizations

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-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/organizations"
{  "data": [    {      "id": "string",      "name": "string",      "slug": "string",      "plan": {        "id": "string",        "version": 0      },      "billing_mode": "card",      "ai_drafting_disabled": true,      "version": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
GET
/trust_policy

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

X-Orishare-Environment?string

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

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/trust_policy"
{  "version": -9007199254740991,  "configured": true,  "policy": {    "monetary_currencies": [      "string"    ],    "caps": [      {        "trust": "anonymous_claim",        "currency": "string",        "scope": "customer",        "window": "day",        "maximum_minor": 0      }    ]  }}
PATCH
/trust_policy

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

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
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length
If-Match*string

Required revision, checked in the owning transaction.

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 PATCH "https://example.com/trust_policy" \  -H "Idempotency-Key: string" \  -H "If-Match: string" \  -H "Content-Type: application/json" \  -d '{    "monetary_currencies": [      "points"    ],    "caps": []  }'
{  "version": -9007199254740991,  "configured": true,  "policy": {    "monetary_currencies": [      "string"    ],    "caps": [      {        "trust": "anonymous_claim",        "currency": "string",        "scope": "customer",        "window": "day",        "maximum_minor": 0      }    ]  }}
GET
/organizations/{id}

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/organizations/string"
{  "id": "string",  "name": "string",  "slug": "string",  "plan": {    "id": "string",    "version": 0  },  "billing_mode": "card",  "ai_drafting_disabled": true,  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH
/organizations/{id}

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length
If-Match?string

Optional legacy revision. Missing or malformed values follow the existing route parser.

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

curl -X PATCH "https://example.com/organizations/string" \  -H "Content-Type: application/json" \  -d '{    "name": "Example"  }'
{  "id": "string",  "name": "string",  "slug": "string",  "plan": {    "id": "string",    "version": 0  },  "billing_mode": "card",  "ai_drafting_disabled": true,  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/projects

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
organization_id*string
Length1 <= length

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/projects?organization_id=string"
{  "data": [    {      "id": "string",      "organization_id": "string",      "name": "string",      "slug": "string",      "version": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/projects

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-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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

curl -X POST "https://example.com/projects" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "organization_id": "org_example",    "name": "Example",    "timezone": "UTC"  }'
{  "id": "string",  "organization_id": "string",  "name": "string",  "slug": "string",  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/projects/{id}

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/projects/string"
{  "id": "string",  "organization_id": "string",  "name": "string",  "slug": "string",  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH
/projects/{id}

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length
If-Match?string

Optional legacy revision. Missing or malformed values follow the existing route parser.

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

curl -X PATCH "https://example.com/projects/string" \  -H "Content-Type: application/json" \  -d '{    "name": "Example"  }'
{  "id": "string",  "organization_id": "string",  "name": "string",  "slug": "string",  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/projects/{id}/environments

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Query Parameters

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

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/projects/string/environments"
{  "data": [    {      "id": "string",      "project_id": "string",      "name": "string",      "kind": "test",      "test_mode": true,      "runtime_class": "sandbox",      "timezone": "string",      "rules_paused": true,      "version": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/projects/{id}/environments

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

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

Length1 <= length <= 255
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

The kind is chosen here and never changes: test (free; outbound notifications and commerce fulfilment are simulated, webhooks carry test_mode: true, at most the plan's test players until a reset) or live, a production environment (billable against the organization's monthly allowance, real delivery). Names are free-form ("staging", "playtest") and renaming never changes the kind or billing. Every production environment of the organization shares one allowance.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/projects/string/environments" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "name": "staging",    "kind": "live"  }'
{  "id": "string",  "project_id": "string",  "name": "string",  "kind": "test",  "test_mode": true,  "runtime_class": "sandbox",  "timezone": "string",  "rules_paused": true,  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/environments/{id}/test_players

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/environments/string/test_players"
{  "environment_id": "string",  "test_mode": true,  "players_created": -9007199254740991,  "player_limit": -9007199254740991,  "resetting": true,  "resets": -9007199254740991,  "reset_at": "string"}
POST
/environments/{id}/reset

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

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

Length1 <= length <= 255
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/environments/string/reset" \  -H "Idempotency-Key: string"
{  "environment_id": "string",  "test_mode": true,  "players_created": -9007199254740991,  "player_limit": -9007199254740991,  "resetting": true,  "resets": -9007199254740991,  "reset_at": "string",  "players_deleted": -9007199254740991}
GET
/environments/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/environments/string"
{  "id": "string",  "project_id": "string",  "name": "string",  "kind": "test",  "test_mode": true,  "runtime_class": "sandbox",  "timezone": "string",  "rules_paused": true,  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH
/environments/{id}

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length
If-Match?string

Optional legacy revision. Missing or malformed values follow the existing route parser.

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

curl -X PATCH "https://example.com/environments/string" \  -H "Content-Type: application/json" \  -d '{    "name": "staging"  }'
{  "id": "string",  "project_id": "string",  "name": "string",  "kind": "test",  "test_mode": true,  "runtime_class": "sandbox",  "timezone": "string",  "rules_paused": true,  "version": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/environments/{id}/api_keys

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Query Parameters

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

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/environments/string/api_keys"
{  "data": [    {      "id": "string",      "environment_id": "string",      "kind": "secret",      "name": "string",      "prefix": "string",      "scopes": [        "string"      ],      "last_used_at": "2019-08-24T14:15:22Z",      "revoked_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/environments/{id}/api_keys

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

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

Length1 <= length <= 255
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/environments/string/api_keys" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "kind": "secret",    "name": "Server"  }'
{  "id": "string",  "environment_id": "string",  "kind": "secret",  "name": "string",  "prefix": "string",  "scopes": [    "string"  ],  "last_used_at": "2019-08-24T14:15:22Z",  "revoked_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "token": "string",  "organization_id": "string"}
DELETE
/api_keys/{id}

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api_keys/string"
Empty
GET
/environments/{id}/usage

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Lengthlength <= 2048
period?string
Match^\d{4}-\d{2}$

Header Parameters

X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

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/environments/string/usage"
{  "data": [    {      "environment_id": "string",      "period": "string",      "accepted_events": 0,      "active_customers": 0,      "webhook_deliveries": 0,      "ai_drafts": 0,      "sync_evaluations": 0    }  ],  "next_cursor": "string",  "has_more": true}