Skip to main content
POST
/
v1
/
domains
/
streams
Node.js SDK
import Migma from 'migma';

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.domains.provisionStream({
  rootDomain: 'acme.com',
  stream: 'transactional'
});
{
  "success": true,
  "data": {
    "_id": "<string>",
    "domain": "<string>",
    "regionName": "<string>",
    "mailFromDomain": "<string>",
    "dnsRecords": [
      {
        "name": "<string>",
        "value": "<string>",
        "priority": 123
      }
    ],
    "ownershipVerified": true,
    "openTracking": true,
    "clickTracking": true,
    "brandedTracking": true,
    "createdAt": "2023-11-07T05:31:56Z",
    "verifiedAt": "2023-11-07T05:31:56Z",
    "isManagedDomain": true
  },
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → API Integration.

Body

application/json
rootDomain
string
required

Apex domain you own (e.g., 'acme.com'). The stream subdomain is derived from it.

stream
enum<string>
required

'transactional' provisions notify.; 'marketing' provisions send..

Available options:
transactional,
marketing
region
enum<string>
default:us-east-1

AWS SES region for sending

Available options:
us-east-1,
eu-west-1
vanityRootFrom
boolean
default:false

Show the apex domain in the From header when its DMARC passes.

Response

Stream identity provisioned. Publish the returned DNS records, then verify.

success
boolean
required
data
object
error
string | null