Nuvelics documentation
APIAPI reference

API keys

Create, list and revoke the API keys that scripts and integrations call this API with.

GET
/api/tenant/v1/api-keys

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Query Parameters

limit?integer

Maximum items per page (1–100, default 25)

Range1 <= value <= 100
Default25
cursor?string

Opaque cursor from a prior nextCursor

sort?string

Sort order: "-field" descending, "field" ascending. Accepted: name, -name, createdAt, -createdAt, updatedAt, -updatedAt (default -updatedAt)

Response Body

A page of API keys for the organization, most-recently-updated first

application/json
  1. response
items*array<>
pagination*
sort*
filters*
facets?

Value/count breakdown for each field requested via ?facets=. Present only when facets were requested.

included?
Example Request
curl -X GET 'https://api.nuvelics.com/api/tenant/v1/api-keys'
Example Response
{  "items": [    {      "id": "string",      "type": "service",      "orgId": "string",      "userId": "string",      "name": "string",      "prefix": "string",      "last4": "stri",      "permissions": [        "datasource:read"      ],      "createdBy": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "version": 0,      "updatedBy": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "lastUsedAt": "2019-08-24T14:15:22Z",      "revokedAt": "2019-08-24T14:15:22Z"    }  ],  "pagination": {    "nextCursor": "string"  },  "sort": {    "applied": "string",    "default": "string",    "available": [      "string"    ]  },  "filters": {    "applied": {      "property1": null,      "property2": null    },    "available": [      {        "field": "string",        "kind": "string",        "facetable": true      }    ]  },  "facets": {    "property1": {      "values": [        {          "value": "string",          "count": 0        }      ],      "capped": true    },    "property2": {      "values": [        {          "value": "string",          "count": 0        }      ],      "capped": true    }  },  "included": {    "datasources": {      "property1": {        "id": "string",        "name": "string",        "type": "string",        "vendor": "datafactory",        "iconId": "string"      },      "property2": {        "id": "string",        "name": "string",        "type": "string",        "vendor": "datafactory",        "iconId": "string"      }    },    "credentials": {      "property1": {        "id": "string",        "name": "string",        "schemeType": "string"      },      "property2": {        "id": "string",        "name": "string",        "schemeType": "string"      }    },    "users": {      "property1": {        "id": "string",        "name": "string",        "email": "string"      },      "property2": {        "id": "string",        "name": "string",        "email": "string"      }    },    "articlePitches": {      "property1": [        {          "id": "string",          "title": "string",          "status": "string",          "newsdeskId": "string"        }      ],      "property2": [        {          "id": "string",          "title": "string",          "status": "string",          "newsdeskId": "string"        }      ]    }  }}

Create an API key

POST
/api/tenant/v1/api-keys

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Request Body

application/json
  1. body
type*"service"

API key type: a service key acts for the organization rather than as a member

Value in"service"
name*string

Human-readable label for the key

Length1 <= length
permissions*array<>

Permission set the key will carry; must be a non-empty subset of the creator's permissions

Items1 <= items
expiresAt?string

Optional expiry; no default

Formatdate-time

Response Body

API key created; plaintext key shown once

application/json
  1. response
id*string

API key identifier (32-char hex key id)

Match^[0-9a-f]{32}$
type*"service"

API key type: a service key acts for the organization rather than as a member

Value in"service"
orgId*string

Organization this key is bound to

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
userId?string

Owning user, when the key is attributed to one

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
name*string

Human-readable label for the key

Length1 <= length
prefix*string

Key type prefix (nvs_)

last4*string

Last 4 characters of the plaintext key

Length4 <= length <= 4
permissions*array<>

Permission set the key carries

createdBy*string

User who created this key

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
createdAt*string

ISO 8601 creation timestamp

Formatdate-time
updatedAt*string

ISO 8601 last-modified timestamp

Formatdate-time
version*integer

Monotonic row version; used as concurrency token

updatedBy?string

Who last modified this key

expiresAt?string

ISO 8601 expiry timestamp; absent means no expiry

Formatdate-time
lastUsedAt?string

ISO 8601 timestamp of last successful use

Formatdate-time
revokedAt?string

ISO 8601 revocation timestamp; present means the key is revoked

Formatdate-time
key*string

Plaintext key shown once at creation; never stored or returned again

Example Request
curl -X POST 'https://api.nuvelics.com/api/tenant/v1/api-keys' \  -H 'Content-Type: application/json' \  -d '{  "type": "service",  "name": "string",  "permissions": [    "datasource:read"  ]}'
Example Response
{  "id": "string",  "type": "service",  "orgId": "string",  "userId": "string",  "name": "string",  "prefix": "string",  "last4": "stri",  "permissions": [    "datasource:read"  ],  "createdBy": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0,  "updatedBy": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "lastUsedAt": "2019-08-24T14:15:22Z",  "revokedAt": "2019-08-24T14:15:22Z",  "key": "string"}

Revoke an API key

DELETE
/api/tenant/v1/api-keys/{id}

Authorization

headerx-api-key<token>

A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.

Path Parameters

id*string

Response Body

API key revoked

Example Request
curl -X DELETE 'https://api.nuvelics.com/api/tenant/v1/api-keys/string'
Example Response
Empty

Report a problem with this page

On this page