Skip to main content
POST
Save a Cloudflare hostname

Authorizations

Authorization
string
header
required

API key with dtk_live_ prefix. Obtain it from API Keys in the account sidebar. New keys start with all supported scopes selected for the chosen project, and you can narrow them to specific read/write scopes as needed.

Path Parameters

projectId
string<uuid>
required

The project the credential is bound to. Read it from GET /connection.

Body

application/json
sourceId
string<uuid>
required

The source id saveCloudflareSource returned, or a Cloudflare connection’s sourceId from getTrafficSensors.

domain
string
required

One of the project’s own primary tracked domains, as listDomains returns it.

Required string length: 1 - 512
cloudflareHostname
string
required

The hostname in the zone, lowercased on save; it must be the tracked domain’s host.

Required string length: 1 - 255
Pattern: ^[A-Za-z0-9.-]+$
pathPrefix
string
default:""

Only count requests under this path, within the tracked domain’s path, without a query string or fragment. Defaults to the whole domain.

Maximum string length: 2048

Response

The saved hostname

data
object
required
meta
object
required

Sent beside data on every successful response that returns data.