Skip to main content
POST
Create Organization Api Key

Authorizations

Authorization
string
header
required

Headers

TR-Organization
string<uuid>
required

The organization id to use for the request.

Body

application/json

JSON request payload to create a new organization api key

name
string
required

The name which will be assigned to the new api key.

role
integer<int32>
required

The role which will be assigned to the new api key. Either 0 (read), 1 (Admin) or 2 (Owner). The auth'ed user must have a role greater than or equal to the role being assigned.

dataset_ids
string<uuid>[] | null

The dataset ids which the api key will have access to. If not provided or empty, the api key will have access to all datasets in the dataset.

default_params
object | null

The default parameters which will be forcibly used when the api key is given on a request. If not provided, the api key will not have default parameters.

expires_at
string | null

The expiration date of the api key. If not provided, the api key will not expire. This should be provided in UTC time.

scopes
string[] | null

The routes which the api key will have access to. If not provided or empty, the api key will have access to all routes. Specify the routes as a list of strings. For example, ["GET /api/dataset", "POST /api/dataset"].

Response

JSON body representing the api_key for the organization

api_key
string
required

The api key which was created. This is the value which should be used in the Authorization header.