Manage Cloud with the API
Manage your servers, networks, volumes and databases over HTTPS, with JSON requests and responses.
Base URL
Every data center serves the same API at https://<data center>.betterstackcloud.com/v1/, for example https://us-west-2a.betterstackcloud.com/v1/servers.
Get an API token
Every request authenticates with a bearer token. Create a global API token in Settings → API tokens → Global tokens. It sees every team in your organization. A Read only token can make GET requests only.
Make your first request
- Set your API token as
BETTERSTACK_API_TOKEN. - List your servers:
Read the response
- Pagination: lists return 25 items per page by default. Use
pageandper_page, up to 1,000. - Teams: every create takes the
team_idof the team that owns the resource, for example"team_id": "t123". List your teams withbetterstack team listin the Cloud CLI. A team token can only create in its own team. - Errors come with an HTTP status and a machine-readable
code, for example a401for a missing or wrong token:
Endpoint reference
Every endpoint, with its parameters and an example request and response, is under Cloud API in the sidebar, starting with Servers.
Need help?
Please let us know at hello@betterstack.com.
We're happy to help! 🙏