Skip to main content
POST
/
v2
/
token-groups
Create a new token group
curl --request POST \
  --url https://api.spirii.com/v2/token-groups \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Premium Users Group",
  "customerId": 2001,
  "disabled": false
}
'
{
  "id": 123,
  "name": "Premium Users Group",
  "createdAt": "2025-06-03T12:00:00.000Z",
  "updatedAt": "2025-06-03T12:00:00.000Z",
  "customerId": 2001,
  "disabled": false
}

Authorizations

Authorization
string
header
required

Authorization: Bearer <SPIRII_API_KEY>

Body

application/json
name
string
required

The token group name.

Maximum string length: 20
Example:

"Premium Users Group"

customerId
number

The owner of the group that the associated tokens will belong to. If not provided, the token group is owned directly by the operator.

Example:

2001

disabled
boolean
default:false

Defines whether a token group is disabled. If disabled is true, locations associated to the token group are no longer exclusive to tokens inside the group.

Example:

false

Response

id
number
required

Unique identifier for the token group.

name
string
required

The token group name.

Maximum string length: 20
Example:

"Premium Users Group"

createdAt
string<date-time>
required

The date and time when the token group was created.

Example:

"2025-06-03T12:00:00.000Z"

updatedAt
string<date-time>
required

The date and time when the token group was last updated.

Example:

"2025-06-03T12:00:00.000Z"

customerId
number

The owner of the group that the associated tokens will belong to. If not provided, the token group is owned directly by the operator.

Example:

2001

disabled
boolean
default:false

Defines whether a token group is disabled. If disabled is true, locations associated to the token group are no longer exclusive to tokens inside the group.

Example:

false