v51

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2026-08-011534301009.2 KB
Portal

Create consumer portal token

Create a consumer portal token.

post/api/v1/portal/tokens

Request body

idstring

ULID (Universally Unique Lexicographically Sortable Identifier).

subjectstring required
expiresAtstring date-time

RFC3339 formatted date-time string in UTC.

expiredboolean
createdAtstring date-time

RFC3339 formatted date-time string in UTC.

tokenstring

The token is only returned at creation.

allowedMeterSlugsstring[]

Optional, if defined only the specified meters will be allowed.

Example request

{
  "id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "subject": "customer-1",
  "expiresAt": "2023-01-01T01:01:01.001Z",
  "createdAt": "2023-01-01T01:01:01.001Z",
  "token": "om_portal_IAnD3PpWW2A2Wr8m9jfzeHlGX8xmCXwG.y5q4S-AWqFu6qjfaFz0zQq4Ez28RsnyVwJffX5qxMvo",
  "allowedMeterSlugs": [
    "tokens_total"
  ]
}

Response

The request has succeeded.

idstring

ULID (Universally Unique Lexicographically Sortable Identifier).

subjectstring required
expiresAtstring date-time

RFC3339 formatted date-time string in UTC.

expiredboolean
createdAtstring date-time

RFC3339 formatted date-time string in UTC.

tokenstring

The token is only returned at creation.

allowedMeterSlugsstring[]

Optional, if defined only the specified meters will be allowed.

Example response

{
  "id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "subject": "customer-1",
  "expiresAt": "2023-01-01T01:01:01.001Z",
  "createdAt": "2023-01-01T01:01:01.001Z",
  "token": "om_portal_IAnD3PpWW2A2Wr8m9jfzeHlGX8xmCXwG.y5q4S-AWqFu6qjfaFz0zQq4Ez28RsnyVwJffX5qxMvo",
  "allowedMeterSlugs": [
    "tokens_total"
  ]
}