Orishare
API reference
GET
/teams

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

limit?integer
Range1 <= value <= 100
Default50
cursor?string
query?string
Length1 <= length <= 40
status?string

Value in

  • "active"
  • "disbanded"

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/teams"
{  "data": [    {      "id": "string",      "name": "string",      "description": "string",      "join_policy": "open",      "invite_code": "string",      "capacity": -9007199254740991,      "member_count": -9007199254740991,      "owner_id": "string",      "moderation": "ok",      "status": "active",      "revision": -9007199254740991,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
GET
/teams/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

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/teams/string"
{  "id": "string",  "name": "string",  "description": "string",  "join_policy": "open",  "invite_code": "string",  "capacity": -9007199254740991,  "member_count": -9007199254740991,  "owner_id": "string",  "moderation": "ok",  "status": "active",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/teams/{id}/members

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

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/teams/string/members"
{  "data": [    {      "handle": "string",      "display_name": "string",      "avatar_url": "string",      "role": "owner",      "joined_at": "2019-08-24T14:15:22Z",      "is_self": true,      "customer_id": "string"    }  ]}
POST
/teams/{id}/moderations

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

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-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

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/teams/string/moderations" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "moderation": "hidden_by_operator"  }'
{  "id": "string",  "name": "string",  "description": "string",  "join_policy": "open",  "invite_code": "string",  "capacity": -9007199254740991,  "member_count": -9007199254740991,  "owner_id": "string",  "moderation": "ok",  "status": "active",  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
POST
/teams/{id}/member_removals

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

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-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

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/teams/string/member_removals" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "cust_0192f0c0a0b07c3d8e9f0a1b2c3d4e5f"  }'
{  "team_id": "string",  "disbanded": true,  "new_owner_id": "string"}
GET
/team_quest_definitions

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

limit?integer
Range1 <= value <= 100
Default50
cursor?string
status?string

Value in

  • "draft"
  • "active"
  • "paused"
  • "archived"

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/team_quest_definitions"
{  "data": [    {      "id": "string",      "key": "string",      "name": "string",      "status": "draft",      "config": {        "schema": "team_quest/v1",        "period": {          "kind": "week",          "start_weekday": 1,          "start_minute": 0,          "timezone": "environment"        },        "target": 1,        "metric": {          "source": "direct"        },        "reward": [],        "min_contribution": 0      },      "revision": -9007199254740991,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/team_quest_definitions

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

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/team_quest_definitions" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "key": "weekly-push",    "name": "Weekly team push",    "config": {      "schema": "team_quest/v1",      "period": {        "kind": "week",        "start_weekday": 1,        "start_minute": 0,        "timezone": "environment"      },      "target": 5000,      "metric": {        "source": "direct"      },      "reward": [        {          "currency": "gems",          "amount": 50        },        {          "type": "item",          "item": "team_banner",          "quantity": 1        }      ],      "min_contribution": 100    }  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "config": {    "schema": "team_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [],    "min_contribution": 0  },  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/team_quest_definitions/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

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/team_quest_definitions/string"
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "config": {    "schema": "team_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [],    "min_contribution": 0  },  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH
/team_quest_definitions/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

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-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/team_quest_definitions/string" \  -H "Idempotency-Key: string" \  -H "If-Match: string" \  -H "Content-Type: application/json" \  -d '{    "name": "Weekly team push"  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "config": {    "schema": "team_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [],    "min_contribution": 0  },  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
POST
/team_quest_definitions/{id}/activate

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

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-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

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/team_quest_definitions/string/activate" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "config": {    "schema": "team_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [],    "min_contribution": 0  },  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
POST
/team_quest_definitions/{id}/pause

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

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-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

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/team_quest_definitions/string/pause" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "config": {    "schema": "team_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [],    "min_contribution": 0  },  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
POST
/team_quest_definitions/{id}/resume

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

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-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

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/team_quest_definitions/string/resume" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "config": {    "schema": "team_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [],    "min_contribution": 0  },  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
POST
/team_quest_definitions/{id}/archive

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

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-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

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/team_quest_definitions/string/archive" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "expected_revision": 2  }'
{  "id": "string",  "key": "string",  "name": "string",  "status": "draft",  "config": {    "schema": "team_quest/v1",    "period": {      "kind": "week",      "start_weekday": 1,      "start_minute": 0,      "timezone": "environment"    },    "target": 1,    "metric": {      "source": "direct"    },    "reward": [],    "min_contribution": 0  },  "revision": -9007199254740991,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
POST
/team_quest_definitions/{id}/contributions

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

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-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

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/team_quest_definitions/string/contributions" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "cust_0192f0c0a0b07c3d8e9f0a1b2c3d4e5f",    "amount": 25  }'
{  "quest": {    "id": "string",    "definition_id": "string",    "team_id": "string",    "period_key": "string",    "starts_at": "2019-08-24T14:15:22Z",    "ends_at": "2019-08-24T14:15:22Z",    "config": {      "schema": "team_quest/v1",      "period": {        "kind": "week",        "start_weekday": 1,        "start_minute": 0,        "timezone": "environment"      },      "target": 1,      "metric": {        "source": "direct"      },      "reward": [],      "min_contribution": 0    },    "target": -9007199254740991,    "progress": -9007199254740991,    "status": "active",    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z"  },  "contribution": {    "id": "string",    "amount": -9007199254740991,    "created_at": "2019-08-24T14:15:22Z"  },  "replayed": true,  "completed": true}
GET
/team_quest_definitions/{id}/board

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Query Parameters

period_key?string
Length1 <= length <= 40
limit?integer
Range1 <= value <= 100
Default50

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/team_quest_definitions/string/board"
{  "definition": {    "id": "string",    "key": "string",    "name": "string"  },  "period_key": "string",  "rows": [    {      "rank": -9007199254740991,      "team_id": "string",      "team_name": "string",      "progress": -9007199254740991,      "target": -9007199254740991,      "status": "active",      "completed_at": "2019-08-24T14:15:22Z",      "member_count": -9007199254740991,      "is_own": true    }  ],  "own": {    "rank": -9007199254740991,    "team_id": "string",    "team_name": "string",    "progress": -9007199254740991,    "target": -9007199254740991,    "status": "active",    "completed_at": "2019-08-24T14:15:22Z",    "member_count": -9007199254740991,    "is_own": true  }}
GET
/team_quests/{id}/contributions

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

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/team_quests/string/contributions"
{  "quest": {    "id": "string",    "definition_id": "string",    "team_id": "string",    "period_key": "string",    "starts_at": "2019-08-24T14:15:22Z",    "ends_at": "2019-08-24T14:15:22Z",    "config": {      "schema": "team_quest/v1",      "period": {        "kind": "week",        "start_weekday": 1,        "start_minute": 0,        "timezone": "environment"      },      "target": 1,      "metric": {        "source": "direct"      },      "reward": [],      "min_contribution": 0    },    "target": -9007199254740991,    "progress": -9007199254740991,    "status": "active",    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z"  },  "members": [    {      "handle": "string",      "display_name": "string",      "avatar_url": "string",      "contributed": -9007199254740991,      "is_member": true,      "is_self": true,      "reward_status": "pending",      "customer_id": "string"    }  ]}