HTTP API

Quest

GET/api/v1/quests/analytics/{quest_id}
GET
/api/v1/quests/analytics/{quest_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string

Query Parameters

window?string

Analytics window (e.g., 30d) reserved for future filtering

Response Body

application/json

curl -X GET "https://example.com/api/v1/quests/analytics/string"
{  "abandoned": 0,  "accepted": 0,  "expired": 0,  "quest_id": "string",  "turn_in_rate": 0.1,  "turned_in": 0}
GET/api/v1/quests/definitions
GET
/api/v1/quests/definitions

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

q?string

Full-text search query applied to name and description

kind?string

Filter by quest kind

page?integer

1-indexed page number

Formatint64
Range0 <= value
page_size?integer

Page size

Formatint64
Range0 <= value
sort_by?string

Sort field (created_at, name, version)

sort_order?string

Sort order (asc or desc)

Value in

  • "asc"
  • "desc"

Response Body

application/json

curl -X GET "https://example.com/api/v1/quests/definitions"
{  "definitions": [    {      "created_at": "2019-08-24T14:15:22Z",      "created_by": "string",      "description": "string",      "kind": "objective",      "name": "string",      "quest_id": "string",      "steps": [        {          "answer": null,          "attempt_throttle": null,          "description": "string",          "hidden": true,          "hints": [            {              "after_seconds": 0,              "order": 0,              "text": "string",              "treasury_price": null            }          ],          "id": "string",          "name": "string",          "objective": null,          "order": 0        }      ],      "updated_at": "2019-08-24T14:15:22Z",      "version": 0    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/quests/definitions
POST
/api/v1/quests/definitions

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/quests/definitions" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "quest_id": "string"  }'
{  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "description": "string",  "kind": "objective",  "name": "string",  "quest_id": "string",  "steps": [    {      "answer": null,      "attempt_throttle": null,      "description": "string",      "hidden": true,      "hints": [        {          "after_seconds": 0,          "order": 0,          "text": "string",          "treasury_price": null        }      ],      "id": "string",      "name": "string",      "objective": null,      "order": 0    }  ],  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}
GET/api/v1/quests/definitions/{quest_id}
GET
/api/v1/quests/definitions/{quest_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/quests/definitions/string"
{  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "description": "string",  "kind": "objective",  "name": "string",  "quest_id": "string",  "steps": [    {      "answer": null,      "attempt_throttle": null,      "description": "string",      "hidden": true,      "hints": [        {          "after_seconds": 0,          "order": 0,          "text": "string",          "treasury_price": null        }      ],      "id": "string",      "name": "string",      "objective": null,      "order": 0    }  ],  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}
DELETE/api/v1/quests/definitions/{quest_id}
DELETE
/api/v1/quests/definitions/{quest_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string

Response Body

application/json

curl -X DELETE "https://example.com/api/v1/quests/definitions/string"
{  "message": "string",  "quest_id": "string"}
PUT/api/v1/quests/definitions/{quest_id}
PUT
/api/v1/quests/definitions/{quest_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/api/v1/quests/definitions/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "created_at": "2019-08-24T14:15:22Z",  "created_by": "string",  "description": "string",  "kind": "objective",  "name": "string",  "quest_id": "string",  "steps": [    {      "answer": null,      "attempt_throttle": null,      "description": "string",      "hidden": true,      "hints": [        {          "after_seconds": 0,          "order": 0,          "text": "string",          "treasury_price": null        }      ],      "id": "string",      "name": "string",      "objective": null,      "order": 0    }  ],  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}
POST/api/v1/quests/events
POST
/api/v1/quests/events

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/quests/events" \  -H "Content-Type: application/json" \  -d '{    "events": [      {        "event_type": "string",        "idempotency_key": "string"      }    ]  }'
{  "deltas": [    {      "count": 0,      "quest_id": "string",      "ready_for_turn_in": true,      "step_completed": true,      "step_id": "string"    }  ]}
GET/api/v1/quests/log
GET
/api/v1/quests/log

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

status?string

Filter by quest status (offered, accepted, in_progress, turned_in, expired, abandoned)

Response Body

application/json

curl -X GET "https://example.com/api/v1/quests/log"
{  "quests": [    {      "accepted_at": 0,      "current_step": "string",      "cycle_key": "string",      "definition_version": 0,      "expedition": null,      "expires_at": 0,      "hints_unlocked": [        "string"      ],      "kind": "objective",      "quest_id": "string",      "rewards_claimed": true,      "status": "offered",      "step_progress": {        "property1": {          "completed": true,          "count": 0        },        "property2": {          "completed": true,          "count": 0        }      },      "user_id": "string"    }  ]}
GET/api/v1/quests/offered
GET
/api/v1/quests/offered

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Response Body

application/json

curl -X GET "https://example.com/api/v1/quests/offered"
{  "offered": [    {      "description": "string",      "kind": "objective",      "name": "string",      "quest_id": "string",      "version": 0    }  ]}
POST/api/v1/quests/{quest_id}/abandon
POST
/api/v1/quests/{quest_id}/abandon

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string

Response Body

application/json

curl -X POST "https://example.com/api/v1/quests/string/abandon"
{  "quest_id": "string",  "status": "offered"}
POST/api/v1/quests/{quest_id}/accept
POST
/api/v1/quests/{quest_id}/accept

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string

Response Body

application/json

curl -X POST "https://example.com/api/v1/quests/string/accept"
{  "accepted_at": 0,  "current_step": "string",  "cycle_key": "string",  "definition_version": 0,  "expedition": null,  "expires_at": 0,  "hints_unlocked": [    "string"  ],  "kind": "objective",  "quest_id": "string",  "rewards_claimed": true,  "status": "offered",  "step_progress": {    "property1": {      "completed": true,      "count": 0    },    "property2": {      "completed": true,      "count": 0    }  },  "user_id": "string"}
POST/api/v1/quests/{quest_id}/check-in
POST
/api/v1/quests/{quest_id}/check-in

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/quests/string/check-in" \  -H "Content-Type: application/json" \  -d '{}'
{  "outcomes": [    "string"  ],  "quest_id": "string",  "resolved": true}
POST/api/v1/quests/{quest_id}/dispatch
POST
/api/v1/quests/{quest_id}/dispatch

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/quests/string/dispatch" \  -H "Content-Type: application/json" \  -d '{    "party": [      "string"    ]  }'
{  "party": [    "string"  ],  "quest_id": "string",  "resolves_at": 0}
POST/api/v1/quests/{quest_id}/rewards/resume
POST
/api/v1/quests/{quest_id}/rewards/resume

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string

Response Body

application/json

curl -X POST "https://example.com/api/v1/quests/string/rewards/resume"
{  "quest_id": "string",  "rewards": [    {      "detail": "string",      "reward": {        "amount": 0,        "currency": "string",        "type": "treasury"      },      "status": "string"    }  ]}
POST/api/v1/quests/{quest_id}/steps/{step_id}/answer
POST
/api/v1/quests/{quest_id}/steps/{step_id}/answer

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string
step_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/quests/string/steps/string/answer" \  -H "Content-Type: application/json" \  -d '{    "text": "string"  }'
{  "attempts_remaining": 0,  "correct": true,  "quest_id": "string",  "ready_for_turn_in": true,  "step_completed": true,  "step_id": "string"}
GET/api/v1/quests/{quest_id}/steps/{step_id}/hints
GET
/api/v1/quests/{quest_id}/steps/{step_id}/hints

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string
step_id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/quests/string/steps/string/hints"
{  "hints": [    {      "order": 0,      "text": "string",      "unlock_condition": "string",      "unlocked": true    }  ],  "quest_id": "string",  "step_id": "string"}
POST/api/v1/quests/{quest_id}/steps/{step_id}/hints/unlock
POST
/api/v1/quests/{quest_id}/steps/{step_id}/hints/unlock

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string
step_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/quests/string/steps/string/hints/unlock" \  -H "Content-Type: application/json" \  -d '{    "order": 0  }'
{  "hint": {    "order": 0,    "text": "string",    "unlock_condition": "string",    "unlocked": true  },  "quest_id": "string",  "step_id": "string"}
POST/api/v1/quests/{quest_id}/turn-in
POST
/api/v1/quests/{quest_id}/turn-in

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

quest_id*string

Response Body

application/json

curl -X POST "https://example.com/api/v1/quests/string/turn-in"
{  "quest_id": "string",  "rewards": [    {      "detail": "string",      "reward": {        "amount": 0,        "currency": "string",        "type": "treasury"      },      "status": "string"    }  ],  "status": "offered",  "unlocked": [    "string"  ]}

On this page