Orishare
API reference
POST
/auth/signup

Header Parameters

Idempotency-Key*string

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

Length1 <= length <= 255

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/auth/signup" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "email": "[email protected]",    "organization_name": "Example",    "timezone": "UTC"  }'
{  "user": {    "id": "string",    "email": "string",    "name": "string",    "created_at": "2019-08-24T14:15:22Z"  },  "organization": {    "id": "string",    "name": "string",    "slug": "string"  },  "project": {    "id": "string",    "name": "string"  },  "environments": [    {      "id": "string",      "name": "string",      "runtime_class": "string"    }  ],  "token": {    "id": "string",    "token": "string",    "scopes": [      "string"    ]  }}
POST
/organizations

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

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/organizations" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "name": "Example",    "timezone": "UTC"  }'
{  "organization": {    "id": "string",    "name": "string",    "slug": "string"  },  "project": {    "id": "string",    "name": "string"  },  "environments": [    {      "id": "string",      "name": "string",      "runtime_class": "string"    }  ]}
GET
/users/me

Authorization

AuthorizationBearer <token>

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

In: header

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/users/me"
{  "id": "string",  "email": "string",  "name": "string",  "created_at": "2019-08-24T14:15:22Z",  "memberships": [    {      "organization_id": "string",      "user_id": "string",      "email": "string",      "role": "owner",      "created_at": "2019-08-24T14:15:22Z"    }  ]}
GET
/auth/tokens

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
purpose?"ai_access"

Only AI access keys

Value in

  • "ai_access"

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/auth/tokens"
{  "data": [    {      "id": "string",      "name": "string",      "prefix": "string",      "scopes": [        "string"      ],      "expires_at": "2019-08-24T14:15:22Z",      "last_used_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z",      "purpose": "ai_access",      "organization_id": "string",      "environment_ids": [        "string"      ],      "default_environment_id": "string"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/auth/tokens

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

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/auth/tokens" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "name": "Server",    "scopes": [      "organizations:read"    ]  }'
{  "id": "string",  "name": "string",  "prefix": "string",  "scopes": [    "string"  ],  "expires_at": "2019-08-24T14:15:22Z",  "last_used_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "purpose": "ai_access",  "organization_id": "string",  "environment_ids": [    "string"  ],  "default_environment_id": "string",  "token": "string"}
DELETE
/auth/tokens/{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

curl -X DELETE "https://example.com/auth/tokens/string"
Empty
POST
/organizations/{id}/invitations

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

curl -X POST "https://example.com/organizations/string/invitations" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "email": "[email protected]",    "role": "viewer"  }'
{  "id": "string",  "organization_id": "string",  "email": "string",  "role": "owner",  "expires_at": "2019-08-24T14:15:22Z",  "accepted_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "token": "string"}
POST
/invitations/{id}/accept

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

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/invitations/string/accept" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "token": "inv_example_secret"  }'
{  "user": {    "id": "string",    "email": "string",    "name": "string",    "created_at": "2019-08-24T14:15:22Z"  },  "membership": {    "organization_id": "string",    "user_id": "string",    "email": "string",    "role": "owner",    "created_at": "2019-08-24T14:15:22Z"  },  "token": {    "id": "string",    "token": "string",    "scopes": [      "string"    ]  }}
GET
/organizations/{id}/memberships

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/organizations/string/memberships"
{  "data": [    {      "organization_id": "string",      "user_id": "string",      "email": "string",      "role": "owner",      "created_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
PATCH
/organizations/{id}/memberships/{user_id}

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
user_id*string

Header Parameters

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 PATCH "https://example.com/organizations/string/memberships/string" \  -H "Content-Type: application/json" \  -d '{    "role": "editor"  }'
{  "organization_id": "string",  "user_id": "string",  "email": "string",  "role": "owner",  "created_at": "2019-08-24T14:15:22Z"}
DELETE
/organizations/{id}/memberships/{user_id}

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*string
user_id*string

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

curl -X DELETE "https://example.com/organizations/string/memberships/string"
Empty
POST
/organizations/{id}/transfer_ownership

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

curl -X POST "https://example.com/organizations/string/transfer_ownership" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "user_id": "usr_next"  }'
{  "owner": {    "organization_id": "string",    "user_id": "string",    "email": "string",    "role": "owner",    "created_at": "2019-08-24T14:15:22Z"  },  "previous_owner": {    "organization_id": "string",    "user_id": "string",    "email": "string",    "role": "owner",    "created_at": "2019-08-24T14:15:22Z"  }}
GET
/oauth/authorization_requests/{id}
__Secure-orishare.session_token<token>

Browser session; local and staging use their configured runtime cookie prefix.

In: cookie

Path Parameters

id*string
Length1 <= length <= 64

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/oauth/authorization_requests/string"
{  "id": "string",  "expires_at": "string",  "client": {    "client_id": "string",    "name": "string",    "logo_uri": "string",    "client_uri": "string",    "domain": "string",    "registration": "metadata_document",    "verified": false  },  "redirect_uri": "string",  "redirect_host": "string",  "loopback_redirect": true,  "requested_access": "read",  "user": {    "id": "string",    "email": "string",    "name": "string"  },  "organizations": [    {      "id": "string",      "name": "string",      "role": "owner",      "environments": [        {          "id": "string",          "name": "string",          "runtime_class": "sandbox"        }      ]    }  ]}
POST
/oauth/authorization_requests/{id}/decision
__Secure-orishare.session_token<token>

Browser session; local and staging use their configured runtime cookie prefix.

In: cookie

Path Parameters

id*string
Length1 <= length <= 64

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/oauth/authorization_requests/string/decision" \  -H "Content-Type: application/json" \  -d '{    "decision": "allow",    "organization_id": "org_example",    "environment_ids": [      "env_example"    ],    "default_environment_id": "env_example",    "access": "read",    "expires_in_days": 90  }'
{  "redirect_to": "string"}
GET
/oauth/grants
__Secure-orishare.session_token<token>

Browser session; local and staging use their configured runtime cookie prefix.

In: cookie

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/oauth/grants"
{  "data": [    {      "id": "string",      "client": {        "client_id": "string",        "name": "string",        "logo_uri": "string",        "domain": "string",        "registration": "metadata_document"      },      "organization": {        "id": "string",        "name": "string"      },      "environment_ids": [        "string"      ],      "default_environment_id": "string",      "access": "read",      "created_at": "string",      "last_used_at": "string",      "expires_at": "string"    }  ]}
DELETE
/oauth/grants/{id}
__Secure-orishare.session_token<token>

Browser session; local and staging use their configured runtime cookie prefix.

In: cookie

Path Parameters

id*string
Length1 <= length <= 64

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/oauth/grants/string"
Empty
GET
/principal

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

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/principal"
{  "kind": "secret_key",  "id": "string",  "token_id": "string",  "staff": true,  "organization_id": "string",  "environment_id": "string",  "scopes": [    "string"  ]}