const url = 'https://platform.fomr.io/v1/domains';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://platform.fomr.io/v1/domains \ --header 'Authorization: Bearer <token>'Lists the custom domains and fomr subdomains of the organization with their verification state. Use the host of a verified, active domain to set the share link of a form. Domains are added and verified in the app. Needs domains:read. Costs 1 API credit.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Default Response
object
Every domain of the organization, ordered by host. Domains are added and verified in the app.
object
The domain host, such as forms.example.com. Pass it as domain to setFormDomain.
Verification state: verified, pending while DNS is checked, or failed.
Whether the plan of the organization keeps the domain serving forms. Inactive domains cannot be bound to a form.
Whether the domain is a fomr subdomain rather than a domain the organization owns.
When the domain was added.
Example
{ "data": [ { "status": "verified" } ]}Default Response
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT"}Default Response
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT"}A rejected call. The organization budget names the policy it rejected the call under; the request floor that bounds hammering sends the envelope alone.
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
The policy that rejected the call.
The plan whose numbers were applied.
The policy limit in credits.
Credits already spent in the open window.
Credits still available under the policy.
What the rejected call would have cost.
How long the policy window lasts.
When the window that rejected the call ends.
Seconds to wait before retrying. Also sent as the Retry-After response header.
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT", "policy": "minute", "plan": "free"}Default Response
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT"}