account-tokens
Create an API token
Create a new API token. Maximum token validity is 24*365h=8760h (~1 year). Attribute allowed_ip_prefixes allows defining a list of CIDR/IP addresses from where the token is accepted. Empty list denies access from everywhere. If unset, the default list will be the IP filters of the account. If no IP filters are defined for the account either, the default will be ["0.0.0.0/0", "::0/0"], i.e. allow from any address.
post/1.3/account/tokens
Request
- Base URL: https://api.upcloud.com
- URL: https://api.upcloud.com/1.3/account/tokens
- Auth: HTTP bearer
Request body
Example request
{
"expires_in": "8760h",
"name": "my first token",
"allowed_ip_ranges": [
"0.0.0.0/0",
"::/0"
]
}Response
Token created successfully
Example response
{
"id": "e7b3f8a0-4c2d-11ec-bf63-0242ac130002",
"name": "my first token",
"created_at": "2025-11-30T08:03:15.944Z",
"expires_at": "2025-11-30T08:03:15.944Z",
"last_used_at": "2025-11-30T08:03:15.944Z",
"allowed_ip_ranges": [
"0.0.0.0/0",
"::/0"
]
}Changes
No recorded changes to this operation across all 1 revision of this API.