Skip to main content
POST
/
v1
/
credentials
Create a credential
curl --request POST \
  --url https://api.cnap.tech/v1/credentials \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "cloud",
  "name": "<string>",
  "provider": "hcloud",
  "api_token": "<string>"
}
'
{
  "id": "<string>",
  "type": "cloud"
}

Authorizations

Authorization
string
header
required

Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at https://cnap.tech/account/tokens

Body

application/json
type
enum<string>
required
Available options:
cloud
name
string
required
Required string length: 1 - 100
provider
enum<string>
required
Available options:
hcloud
api_token
string
required

Cloud provider API token

Minimum string length: 1

Response

Credential created

id
string
required
type
enum<string>
required
Available options:
cloud,
registry,
cloudflare