Coolify logoCoolify
POST
/cloud-tokens

Create a new cloud provider token. The token will be validated before being stored.

Authorization

bearerAuth
AuthorizationBearer <token>

Go to Keys & Tokens / API tokens and create a new token. Use the token as the bearer token.

In: header

Request Body

application/json

Cloud provider token details

TypeScript Definitions

Use the request body type in TypeScript.

provider*string

The cloud provider.

Value in"hetzner" | "digitalocean"
token*string

The API token for the cloud provider.

name*string

A friendly name for the token.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://app.coolify.io/api/v1/cloud-tokens" \  -H "Content-Type: application/json" \  -d '{    "provider": "hetzner",    "token": "your-api-token-here",    "name": "My Hetzner Token"  }'
{  "uuid": "og888os"}
{  "message": "Invalid token."}
{  "message": "Unauthenticated."}
{  "message": "Validation error.",  "errors": {    "name": [      "The name field is required."    ],    "api_url": [      "The api url field is required.",      "The api url format is invalid."    ]  }}