Skip to main content
The Upsun REST API uses OAuth2 bearer tokens for authentication. You exchange an API token for a short-lived access token, then include it in the Authorization header of every request.

Create an API token

You will first need to have an Upsun account and create an API Token via the Console.

Exchange for an access token

Use the token exchange endpoint to get a short-lived access token:
The response contains a bearer token valid for 900 seconds (15 minutes):

Make authenticated requests

Include the access token in the Authorization header:
Base URL: All API requests go to https://api.upsun.com.

Token lifecycle

Access tokens expire after 15 minutes. Your application should handle re-authentication by exchanging the API token again when a request returns 401 Unauthorized.
Last modified on March 13, 2026