Create Service DNS Record

API server

https://app.coolify.io/api/v1

Choose where to send API requests

This changes the request URL and code examples on every endpoint page.

API server type

Requests will use

https://app.coolify.io/api/v1

Use only a Coolify URL you trust. Sending a test request also sends the API token you enter.

POST
/services/{uuid}/dns

Create a DNS record at Cloudflare that points a domain of the service to its server. An existing record with the same address is adopted.

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

uuid*string

Service UUID.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

hostname*string

A saved domain of the resource.

integration_token_uuid?string

Cloudflare token to use. Required when several tokens manage the zone of the hostname.

address?string

A public address of the server. Default: default_address of the DNS status.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://app.coolify.io/api/v1/services/string/dns" \  -H "Content-Type: application/json" \  -d '{    "hostname": "string"  }'
{  "record": {    "uuid": "string",    "hostname": "string",    "type": "A",    "address": "string",    "owned": true,    "integration_token_uuid": "string"  }}
Empty
{  "message": "Unauthenticated."}
Empty
{  "message": "Resource not found."}
{  "message": "string",  "conflict": {    "record_id": "string",    "current": "string",    "proposed": "string"  }}
{  "message": "Validation error.",  "errors": {    "name": [      "The name field is required."    ],    "api_url": [      "The api url field is required.",      "The api url format is invalid."    ]  }}
Empty