chatformdocs
API referenceV1

Connect a custom domain

Registers a subdomain such as `forms.acme.com`. Add the returned CNAME and TXT records, then poll `POST /v1/domains/check` until `status` is `active`. One domain per organization. A domain that is `active` must also be registered in the merchant's Razorpay or Cashfree dashboard before payments on it work; Stripe needs nothing. Steps: https://chatform.in/docs/payments#register-your-domain-with-the-gateway

POST
/v1/domains

Authorization

AuthorizationBearer <token>

A server-side secret key. Never send one from a browser — a request carrying an Origin header is refused for this reason.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/domains" \  -H "Content-Type: application/json" \  -d '{    "hostname": "string"  }'
{  "domain": {    "hostname": "string",    "status": "pending",    "error": "string",    "hint": "string",    "records": [      {        "type": "CNAME",        "name": "string",        "value": "string"      }    ],    "checkedAt": 0,    "createdAt": 0,    "dnsProvider": {      "id": "string",      "name": "string",      "dnsUrl": "string"    },    "autoConfigureUrl": "string",    "autoConfigureSize": {      "width": 0,      "height": 0    }  }}