Move a domain to its application's current routing, or back to the edge
A connected domain keeps the routing it connected with when its application's routing changes (domains still waiting for DNS follow the change). This moves one: the domain's expected records become those of the application's current routing, or with {"to": "edge"} those of the CustomDomain™ edge whatever the application's routing (the way back for a domain moved off the edge by mistake). The body is optional.
The customer's DNS is not changed. A moved domain goes back to pending with a fresh verification clock, is checked at once (a domain whose DNS already names the new place is live again in the response's status), and otherwise waits for its records (returned in records); drift is not reported while it waits. Moving a live domain off the edge stops edge serving at once (stops_edge_serving).
A domain whose records were written through a connected provider account that holds a usable key is moved by rewriting them, when the move_rewrite flag is on: the response carries rewriting: true and customer_action_required: false, the new records are written in the background and the domain is verified on them (propagating); if the write fails twice the customer is told as for any other move.
A no-op (moved: false) when the domain already points there. Refused (409) when the domain's records are stored and no rewrite is possible: records your backend supplied (change them with PUT /connections/{id}/records) or records written into the customer's DNS during setup by a rail that cannot rewrite them (disconnect and reconnect to move it). A server-side API key or an agent token only: a widget token is refused (403). Recorded in the audit log as connection.retargeted.
Request
- Base URL: https://api.customdomain.ai/v1
- URL: https://api.customdomain.ai/v1/connections/{id}:retarget
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://api.customdomain.ai/oauth/agent/authorize, token URL https://api.customdomain.ai/oauth/agent/token, scopes: domains:connect)
Path parameters
Request body
Response
The domain's routing after the move, and its records from now on.
Example response
{
"records": [
{
"type": "CNAME"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.