v1

latestOpenAPI 3.0.3BSL2026-07-17133415718.8 KB
Organization

Create Organization Api Key

Create a new api key for the organization. Successful response will contain the newly created api key.

post/api/organization/api_key

Headers

TR-Organizationstring uuid required

The organization id to use for the request.

Request body

dataset_idsstring[] nullable

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.

expires_atstring nullable

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

namestring required

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

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

scopesstring[] nullable

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"].

Example request

{
  "default_params": {
    "filters": {
      "must": [
        {
          "field": "tag_set",
          "match_all": [
            "A",
            "B"
          ]
        },
        {
          "field": "num_value",
          "range": {
            "gte": 10,
            "lte": 25
          }
        }
      ]
    }
  }
}

Response

JSON body representing the api_key for the organization

api_keystring required

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