DomainsRegister domains
Payment pages
Events
- HOOKWebhooks
- S3 exportSoon
Register domains
POST /v1/domains registers up to 100 domains in a team in one call and reports, per domain, whether it was created, already existed or was invalid.
POST /v1/domains registers 1 to 100 domains in a team. Each domain gets its own result, so one invalid hostname does not fail the others. Needs the domains:create scope. Organization keys must pass team_id; a team key always acts on its own team.
With an organization key:
curl -X POST https://data.scriptmonitoring.com/v1/domains/ \
-H "Authorization: Bearer sm_org_14829305716342_…" \
-H "Content-Type: application/json" \
-d '{"team_id": "YOUR_TEAM_ID", "domains": ["shop.example.com", "checkout.example.com"]}'
With a team key, no team_id:
curl -X POST https://data.scriptmonitoring.com/v1/domains/ \
-H "Authorization: Bearer sm_team_10937462815530_…" \
-H "Content-Type: application/json" \
-d '{"domains": ["shop.example.com", "checkout.example.com"]}'
Which keys work?#
| Key | Accepted |
|---|---|
Organization key (sm_org_…) | Yes, with domains:create and a team_id in the body. |
Team key (sm_team_…) | Yes, with domains:create, on its own team. It doesn't need team_id. |
A missing, mistyped or revoked key, a key whose prefix doesn't match its type, or a key created before the sm_org_ / sm_team_ format gets 401 with this body:
{ "error": "unauthorized", "message": "Missing or invalid bearer token." }
Request body#
| Field | Type | Description |
|---|---|---|
domains | string[] | 1 to 100 hostnames. |
team_id | string | The team's ID (digits). Required with an organization key. |
Response#
{
"data": {
"results": [
{ "status": "created", "input": "shop.example.com", "domain": "shop.example.com", "domainId": "..." },
{ "status": "invalid", "input": "localhost", "code": "internal_domain", "message": "..." }
],
"totals": { "created": 1, "existing": 0, "invalid": 1 }
}
}
status is created, existing or invalid. An invalid result carries a code: empty_domain, invalid_domain, public_suffix_domain, internal_domain, reserved_ip, wildcard_conflict, subdomain_conflict, domain_already_licensed or internal_error.
Errors: 400, 401, 403 (insufficient_scope, team_suspended), 404 team_not_found, 429, and 503 domain_registration_unavailable when the domains were saved but not yet synchronized: retry the same call.