Create Api Key
posthttps://api-atlas.nomic.ai/v1/user/authorization/keys/{organization_id}/create
Creates a new API key with specified scope and permissions.
By default, API keys are scoped to an organization. Additionally, API keys can also be scoped to a specific dataset or a specific user.
If only key_name is provided in the request for creating an API key, the key will be scoped to the user's current organization.
To scope an API key to a specific organization by ID, set key_scope = "ORGANIZATION" and key_target_id with the UUID of the organization in the API key creation request.
To scope an API key to a specific dataset, set key_scope = "DATASET" and key_target_id with the UUID of the dataset in the API key creation request.
To scope an API key to a specific user, set key_scope = "USER" in the API key creation request.
Request
organization_idstring | path*requiredBody (required) application/json
key_namestring*requiredThe name of the API key to create.
key_rolestringThe role associated to the API key scope
key_scopestringThe scope of the API key: ORGANIZATION, DATASET, or USER
Possible values: ORGANIZATION, DATASET, USER
key_target_idstringThe UUID representing a dataset id or an organization id
Responses
keystring*requiredThe API key that was created
Examples
curl -X 'POST' \
'https://api-atlas.nomic.ai/v1/user/authorization/keys/{organization_id}/create' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"key_name": "string",
"key_role": "OWNER",
"key_scope": "ORGANIZATION",
"key_target_id": "string"
}'