Organizations
Add a custom domain
Creates a pending domain row; the response **`domain`** uses the compact **`OrgDomainEntryOrgConsole`** shape (**`dnsRecords`** includes the Mudbase ownership TXT). **`dnsRecords`** may include Mudbase TXT and routing CNAME only until Mudbase TXT succeeds and Fly ACME (if enabled) provisions a certificate. **`flyCertificateStatus`** is typically omitted until Fly ACME runs after first successful **`verify-dns`**.
/api/orgs/{orgId}/projects/{projectId}/domainsSDK setup
Create a client and set credentials (JWT and/or API key) before calling the API. Match the authentication type shown above.
import { Configuration, OrganizationsApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});
const organizations = new OrganizationsApi(configuration);import { Configuration, OrganizationsApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfbW9yZ2FuX2RlIiwiZW1haWwiOiJtb3JnYW4uY2hlbkBub3J0aHdpbmQuZGV2IiwiZXhwIjoxODI1MTI5NjAwfQ.doc_preview_sig',
});
const organizations = new OrganizationsApi(configuration);Example request
Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.
const { data: result } = await organizations.addOrgCustomDomain(
"org_Rz0CZqHebQ",
"proj_whP3ilt7jCle",
{
hostname: "Mindy Prosacco",
setPrimary: true
}
);const { data: result } = await organizations.addOrgCustomDomain(
"org_Rz0CZqHebQ",
"proj_whP3ilt7jCle",
{
hostname: "Mindy Prosacco",
setPrimary: true
}
);Playground
liveTest this endpoint with your own credentials. Your requests will be sent to the live API.
No Request Yet
Send a request to see the full inspector
Authentication
Authorization: Bearer YOUR_TOKEN header (user-facing apps, RBAC). View authentication guide →Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | — |
projectId | string | Yes | — |
Request Body
{
"hostname": "Loma Rutherford",
"setPrimary": true
}{
"hostname": "Loma Rutherford",
"setPrimary": true
}Responses
{
"success": true,
"domain": {
"_id": "hZnryo8KvYooSGj4",
"hostname": "Isaias Mann",
"status": "bandwidth quantify",
"isPrimary": false,
"source": "api",
"createdAt": "2026-07-14T07:18:00.724Z",
"verifiedAt": "2026-07-18T22:04:01.786Z",
"lastVerifiedAt": "2026-06-12T17:52:34.118Z",
"cnameSubmittedAt": "2026-06-07T10:42:41.737Z",
"cnameApprovedAt": "2026-06-20T06:32:04.243Z",
"customDomainVerificationStep": 67788,
"routingCnameTarget": "Katrina Crona",
"dnsRecords": [
{
"type": "hard drive quantify",
"name": "Jacky Howe",
"value": "microchip parse",
"purpose": "feed navigate"
}
],
"platformActivationPending": false,
"customDomainLiveForApiTraffic": true,
"cloudflareEdge": {
"saasIntegrationEnabled": true,
"skipped": false,
"reason": "pixel reboot",
"customHostnameId": "Miss Alexis Jacobson-Renner",
"hostnameStatus": "Joshua Mitchell",
"sslStatus": "transmitter input",
"ownershipVerification": {
"name": "Jamie Cummings",
"type": "panel back up",
"value": "microchip input"
},
"sslValidationRecords": [
{
"txtName": "Miss Roma Mante",
"txtValue": "pixel copy",
"httpUrl": "https://unkempt-ice-cream.com",
"httpBody": "application override",
"cname": "Zachary Kub",
"cnameTarget": "Sheldon Mann"
}
],
"lastError": "interface reboot",
"instructions": "array synthesize"
},
"flyCertificateStatus": "driver synthesize",
"platformDnsVerification": {
"recordType": "circuit navigate",
"recordName": "Toby Mosciski",
"recordValue": "circuit override",
"ttlSeconds": 91387,
"staffNote": "alarm quantify",
"updatedAt": "2026-07-19T16:37:31.871Z"
},
"platformDnsVerificationSubmittedAt": "2026-07-04T19:36:04.231Z"
},
"dnsVerificationInstructions": "bandwidth reboot"
}{
"success": true,
"domain": {
"_id": "hZnryo8KvYooSGj4",
"hostname": "Isaias Mann",
"status": "bandwidth quantify",
"isPrimary": false,
"source": "api",
"createdAt": "2026-07-14T07:18:00.724Z",
"verifiedAt": "2026-07-18T22:04:01.786Z",
"lastVerifiedAt": "2026-06-12T17:52:34.118Z",
"cnameSubmittedAt": "2026-06-07T10:42:41.737Z",
"cnameApprovedAt": "2026-06-20T06:32:04.243Z",
"customDomainVerificationStep": 67788,
"routingCnameTarget": "Katrina Crona",
"dnsRecords": [
{
"type": "hard drive quantify",
"name": "Jacky Howe",
"value": "microchip parse",
"purpose": "feed navigate"
}
],
"platformActivationPending": false,
"customDomainLiveForApiTraffic": true,
"cloudflareEdge": {
"saasIntegrationEnabled": true,
"skipped": false,
"reason": "pixel reboot",
"customHostnameId": "Miss Alexis Jacobson-Renner",
"hostnameStatus": "Joshua Mitchell",
"sslStatus": "transmitter input",
"ownershipVerification": {
"name": "Jamie Cummings",
"type": "panel back up",
"value": "microchip input"
},
"sslValidationRecords": [
{
"txtName": "Miss Roma Mante",
"txtValue": "pixel copy",
"httpUrl": "https://unkempt-ice-cream.com",
"httpBody": "application override",
"cname": "Zachary Kub",
"cnameTarget": "Sheldon Mann"
}
],
"lastError": "interface reboot",
"instructions": "array synthesize"
},
"flyCertificateStatus": "driver synthesize",
"platformDnsVerification": {
"recordType": "circuit navigate",
"recordName": "Toby Mosciski",
"recordValue": "circuit override",
"ttlSeconds": 91387,
"staffNote": "alarm quantify",
"updatedAt": "2026-07-19T16:37:31.871Z"
},
"platformDnsVerificationSubmittedAt": "2026-07-04T19:36:04.231Z"
},
"dnsVerificationInstructions": "bandwidth reboot"
}Errors
| Code | Meaning |
|---|---|
400 | Validation, limit, or hostname_in_use |
429 | domain_rate_limited |