Docs

API Reference

Validation plus the licensing management API: licenses, products, customers, addons, whitelists, variables, users, identities, and logs.

POST /licenses/validate is public: it is the endpoint your product calls to check a key, and it is the heart of integrating with Kora. Everything else manages your data and uses your Kora API key (Authorization: Bearer <key>). Change the host variable in the playground to point at your own instance.

POST
/licenses/validate

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/licenses/validate" \  -H "Content-Type: application/json" \  -d '{    "license_key": "string"  }'
{  "valid": true,  "message": "string",  "product": "string",  "customer": "string",  "status": "string",  "expires_at": "2019-08-24T14:15:22Z",  "addons": [    "string"  ],  "variables": {},  "user_variables": {},  "timestamp": 0,  "session": {    "token": "string"  }}
GET
/licenses
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Response Body

application/json

curl -X GET "https://example.com/licenses"
[  {    "id": 0,    "key": "string",    "product": "string",    "customer": "string",    "expires_at": "2019-08-24T14:15:22Z",    "addons": [      "string"    ],    "whitelists": {      "property1": {        "values": [          "string"        ],        "limit": 0      },      "property2": {        "values": [          "string"        ],        "limit": 0      }    },    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }]
POST
/licenses
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

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/licenses" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": 0,  "key": "string",  "product": "string",  "customer": "string",  "expires_at": "2019-08-24T14:15:22Z",  "addons": [    "string"  ],  "whitelists": {    "property1": {      "values": [        "string"      ],      "limit": 0    },    "property2": {      "values": [        "string"      ],      "limit": 0    }  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
PATCH
/licenses
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PATCH "https://example.com/licenses" \  -H "Content-Type: application/json" \  -d '{    "key": "string"  }'
Empty
DELETE
/licenses
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/licenses" \  -H "Content-Type: application/json" \  -d '{    "key": "string"  }'
Empty
GET
/products
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Response Body

application/json

curl -X GET "https://example.com/products"
[  {    "id": 0,    "name": "string",    "addons": [      "string"    ],    "whitelists": [      "string"    ]  }]
POST
/products
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name plus any custom fields configured for this record.

Response Body

application/json

curl -X POST "https://example.com/products" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": 0,  "name": "string",  "addons": [    "string"  ],  "whitelists": [    "string"  ]}
PATCH
/products
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name plus any custom fields configured for this record.

Response Body

curl -X PATCH "https://example.com/products" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
Empty
DELETE
/products
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/products" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
Empty
GET
/customers
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Response Body

application/json

curl -X GET "https://example.com/customers"
[  {    "id": 0,    "name": "string"  }]
POST
/customers
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name plus any custom fields configured for this record.

Response Body

application/json

curl -X POST "https://example.com/customers" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": 0,  "name": "string"}
PATCH
/customers
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name plus any custom fields configured for this record.

Response Body

curl -X PATCH "https://example.com/customers" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
Empty
DELETE
/customers
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/customers" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
Empty
GET
/addons
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Response Body

application/json

curl -X GET "https://example.com/addons"
[  {    "id": 0,    "name": "string"  }]
POST
/addons
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name plus any custom fields configured for this record.

Response Body

application/json

curl -X POST "https://example.com/addons" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": 0,  "name": "string"}
PATCH
/addons
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name plus any custom fields configured for this record.

Response Body

curl -X PATCH "https://example.com/addons" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
Empty
DELETE
/addons
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/addons" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
Empty
POST
/addons/attach
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

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/addons/attach" \  -H "Content-Type: application/json" \  -d '{    "addon": "string",    "product": "string"  }'
[  "string"]
POST
/addons/detach
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

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/addons/detach" \  -H "Content-Type: application/json" \  -d '{    "addon": "string",    "product": "string"  }'
[  "string"]
GET
/licenses/whitelists
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X GET "https://example.com/licenses/whitelists" \  -H "Content-Type: application/json" \  -d '{    "license": "string"  }'
[  {    "name": "string",    "type": "header",    "source": "string",    "limit": 0,    "values": [      "string"    ],    "enforced": true  }]
POST
/licenses/whitelists
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/licenses/whitelists" \  -H "Content-Type: application/json" \  -d '{    "license": "string",    "whitelist": "string",    "value": "string"  }'
Empty
PATCH
/licenses/whitelists
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PATCH "https://example.com/licenses/whitelists" \  -H "Content-Type: application/json" \  -d '{    "license": "string",    "whitelist": "string",    "limit": 0  }'
Empty
DELETE
/licenses/whitelists
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/licenses/whitelists" \  -H "Content-Type: application/json" \  -d '{    "license": "string",    "whitelist": "string"  }'
Empty
GET
/whitelists
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X GET "https://example.com/whitelists" \  -H "Content-Type: application/json" \  -d '{}'
[  {    "id": 0,    "name": "string",    "type": "header",    "header": "string",    "field": "string",    "limit": 0,    "global": true  }]
POST
/whitelists
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

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/whitelists" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "header"  }'
{  "id": 0,  "name": "string",  "type": "header",  "header": "string",  "field": "string",  "limit": 0,  "global": true}
PATCH
/whitelists
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PATCH "https://example.com/whitelists" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "header"  }'
Empty
DELETE
/whitelists
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/whitelists" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
Empty
POST
/whitelists/attach
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

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/whitelists/attach" \  -H "Content-Type: application/json" \  -d '{    "whitelist": "string",    "product": "string"  }'
[  "string"]
POST
/whitelists/detach
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

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/whitelists/detach" \  -H "Content-Type: application/json" \  -d '{    "whitelist": "string",    "product": "string"  }'
[  "string"]
GET
/licenses/variables
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X GET "https://example.com/licenses/variables" \  -H "Content-Type: application/json" \  -d '{    "license": "string"  }'
[  {    "key": "string",    "value": null  }]
POST
/licenses/variables
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/licenses/variables" \  -H "Content-Type: application/json" \  -d '{    "license": "string",    "key": "string",    "value": null  }'
Empty
DELETE
/licenses/variables
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/licenses/variables" \  -H "Content-Type: application/json" \  -d '{    "license": "string",    "key": "string"  }'
Empty
GET
/users
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X GET "https://example.com/users" \  -H "Content-Type: application/json" \  -d '{}'
[  {    "id": 0,    "user_id": "string",    "email": "string",    "display_name": "string",    "status": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }]
POST
/users
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

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/users" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": 0,  "user_id": "string",  "email": "string",  "display_name": "string",  "status": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
PATCH
/users
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PATCH "https://example.com/users" \  -H "Content-Type: application/json" \  -d '{    "user_id": "string"  }'
Empty
DELETE
/users
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/users" \  -H "Content-Type: application/json" \  -d '{    "user_id": "string"  }'
Empty
GET
/users/licenses
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Query Parameters

user_id?string

Response Body

application/json

curl -X GET "https://example.com/users/licenses"
[  {    "id": 0,    "key": "string",    "product": "string",    "customer": "string",    "expires_at": "2019-08-24T14:15:22Z",    "addons": [      "string"    ],    "whitelists": {      "property1": {        "values": [          "string"        ],        "limit": 0      },      "property2": {        "values": [          "string"        ],        "limit": 0      }    },    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }]
POST
/users/link
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

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/users/link" \  -H "Content-Type: application/json" \  -d '{    "provider": "string",    "provider_id": "string"  }'
{  "id": 0,  "user_id": "string",  "email": "string",  "display_name": "string",  "status": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
POST
/users/merge
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

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/users/merge" \  -H "Content-Type: application/json" \  -d '{    "from": "string",    "to": "string"  }'
{  "merged": true,  "from": "string",  "to": "string"}
GET
/identities
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X GET "https://example.com/identities" \  -H "Content-Type: application/json" \  -d '{}'
Empty
POST
/identities
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

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/identities" \  -H "Content-Type: application/json" \  -d '{    "user_id": "string",    "provider": "string",    "provider_id": "string"  }'
{  "id": 0,  "user_id": "string",  "provider": "string",  "provider_id": "string",  "metadata": {},  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
DELETE
/identities
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/identities" \  -H "Content-Type: application/json" \  -d '{    "provider": "string",    "provider_id": "string"  }'
Empty
GET
/logs
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Query Parameters

type?string

Value in

  • "requests"
  • "activity"
stats?1

Value in

  • 1

Response Body

curl -X GET "https://example.com/logs"
Empty
DELETE
/logs
AuthorizationBearer <token>

Your Kora API key, sent as Authorization: Bearer <key>.

In: header

Query Parameters

type*string

Value in

  • "requests"
  • "activity"

Response Body

application/json

curl -X DELETE "https://example.com/logs?type=requests"
{  "cleared": 0}