CustomDomain Docs
ReferenceAPI referenceApplications

Rename an application or change its settings

Rename an application or change its settings: CustomDomain™ API reference in the applications group. Covers parameters, request body, responses and error codes.

PATCH
/applications/{id}

Send any of name, nameserver_migration, end_user_saved_access and challenge_mode (at least one); everything is checked before anything is saved. challenge_mode (off, report or on) sets whether the widget's calls must pass a quick browser check (see the 428 above).

nameserver_migration sets whether the application offers to move an end user's nameservers and where to ({"mode": "off"} clears it). A dns_host target names a connected provider account of the workspace with continuous access at a DNS host whose API creates zones; only this application's migrations ever use it. The account is chosen under the same rule as an account a move uses: an admin or an owner may name any, a member the accounts they connected, and another member's is refused 403 forbidden with nothing saved. Keeping the account the application already has is not a new choice: a member may change the mode and send the same target.

end_user_saved_access sets whether a returning end user may reuse the access their own secure sign-in kept (true is the default; see the Application schema). It takes true or false, never null. A test mode application keeps no saved access, so true is refused for it with 400. Needs a key that may write the application (a viewer's key is a 403). A delegated agent token needs app:write.

AuthorizationBearer <token>

Long-lived tenant API key, cd_live_… (production) or cd_test_… (staging, development), stored hashed. Keys created before the switch to cd_ start with sk_live_… / sk_test_… and are still accepted. Scoped to the owning application's tenant.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Properties1 <= properties

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/applications/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "tenant_id": "string",  "name": "string",  "environment": "production",  "default_origin": "string",  "connect_target": {    "cname_target": "string",    "apex_ipv4": [      "string"    ]  },  "sandbox": true,  "nameserver_migration": {    "mode": "off",    "target": {      "kind": "managed",      "provider": "string",      "account_id": "string",      "nameservers": [        "string",        "string"      ]    }  },  "challenge_mode": "off",  "end_user_saved_access": true,  "secure_sign_in": {    "available": true,    "reason": "switched_off"  },  "first_key_mint_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z"}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}