Skip to main content

Create Token

Create a scoped automation token for upload workflows.

Endpoint

POST /token/create

Authentication

HeaderValue
AuthorizationBearer <jwt_token>
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
namestringDisplay name of the token (duplicates are allowed)
allowed_appsarray of stringApp IDs this token can upload to
expires_atstring (ISO 8601)Expiration timestamp

Example Request

curl --location 'http://localhost:9000/token/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <jwt_token>' \
--data '{
"name": "GitHub Actions - MyApp",
"allowed_apps": ["69259667351f660c2fd62d39", "69259667351f660c2fd62d40"],
"expires_at": "2026-12-31T00:00:00Z"
}'

Response

Success Response (201 Created)

{
"allowed_apps": [
"69259667351f660c2fd62d39",
"69259667351f660c2fd62d40"
],
"created_at": "2026-02-20T16:39:16.233976+02:00",
"expires_at": "2026-12-31T00:00:00Z",
"id": "699872148c1ed923e48bc2c9",
"name": "GitHub Actions - MyApp",
"token": "fns_22ba5585a1d3d9e2c7c42d4339ab486e34d965adc7a1a68534a8d72025deabd0",
"token_prefix": "fns_22ba5585"
}

Response Fields

FieldTypeDescription
idstringToken identifier
namestringToken display name
allowed_appsarray of stringEffective list of app IDs allowed for upload
expires_atstringExpiration timestamp
created_atstringCreation timestamp
tokenstringFull token secret, returned only once
token_prefixstringShort non-secret prefix for identification

Notes

  • Save token immediately. It cannot be fetched again later.
  • allowed_apps may be normalized to unique app IDs in the response.
  • Token names can be reused across multiple tokens.
  • Tokens cannot be updated after creation; revoke and recreate if needed.