Receive email at a domain

POST
/v1/domains/{id}/receiving

Starts receiving email at the domain itself or a subdomain (e.g. inbound.acme.com): email sent to any address at that hostname becomes a received email of the API key's environment (an email.received webhook, GET /v1/received_emails). Publish the MX record in receiving.record; coss.com checks it in the background. Using the domain itself moves all of its mail to coss.com. A domain has at most one receiving hostname: remove it to use another one.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.

Path Parameters

id*string

The domain's id.

Header Parameters

Coss-Version?"2026-10-10"

The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.

Value in"2026-10-10"

Request Body

application/json
  1. body
hostname*string

The domain itself or a subdomain of it, without a scheme or path. Point its MX at coss.com with the record the response lists. Using the domain itself moves all of its mail to coss.com, so a subdomain is usually the better choice.

Length1 <= length <= 200

Response Body

The domain, with its receiving domain and the MX record to publish.

application/json
  1. response
object*"domain"
Value in"domain"
id*string
name*string

The domain, lower-cased.

status*string

pending while the records are being checked, verified once they are, temporary_failure after a transient DNS problem, and failed when verification gave up (72 hours) — restart it with the verify endpoint. deleting is a removal in progress.

Value in"pending""verified""temporary_failure""failed""deleting"
can_send*boolean

Whether live keys may send from this domain right now.

region*|

The provider region it sends from. null: not set up there.

mail_from_domain*string

The envelope sender subdomain bounces come back to.

mail_from_status*string

How setting up its bounce-handling MAIL FROM domain went.

Value in"pending""success""temporary_failure""failed"
records*array<>

The DNS records to publish, with the result of the last check.

created_at*string
Formatdate-time
last_checked_at*|

When DNS was last checked. null: not yet.

Formatdate-time
verified_at*|

When it was verified. null: it isn't.

Formatdate-time
failed_at*|

When verification failed. null: it hasn't.

Formatdate-time
tracking*|null
receiving*|null
bimi*

The result of the last BIMI check: whether mailbox providers can find the domain's brand logo and certificate. The record and the certificate are your own.

subaccount_id*|

The sub-account the domain belongs to (only it sends from it, with its own reputation); null for the organization's own.

shared_with_subaccounts*boolean

An organization's domain its sub-accounts may send from too.

import { Coss } from "coss";const coss = new Coss({  apiKey: process.env.COSS_API_KEY,  baseUrl: "https://api.coss.com",});const { data, error } = await coss.domains.receiving.create("dom_01k7c8m4q2f3e9v6t5r1n0p8yz", {  hostname: "inbound.acme.com",});
{  "object": "domain",  "id": "dom_01k7c8m4q2f3e9v6t5r1n0p8yz",  "name": "acme.com",  "status": "verified",  "can_send": true,  "region": "us-east-1",  "mail_from_domain": "send.acme.com",  "mail_from_status": "success",  "records": [    {      "priority": null,      "required": true,      "status": "verified",      "found": [],      "purpose": "dkim",      "type": "CNAME",      "name": "x7f3k2m9qp4ld8sv6hwz1nyc5rbtgj0e._domainkey.acme.com",      "value": "x7f3k2m9qp4ld8sv6hwz1nyc5rbtgj0e.dkim.amazonses.com"    },    {      "priority": 10,      "required": true,      "status": "verified",      "found": [],      "purpose": "mail_from_mx",      "type": "MX",      "name": "send.acme.com",      "value": "feedback-smtp.us-east-1.amazonses.com"    },    {      "priority": null,      "required": true,      "status": "verified",      "found": [],      "purpose": "mail_from_spf",      "type": "TXT",      "name": "send.acme.com",      "value": "v=spf1 include:amazonses.com ~all"    },    {      "priority": null,      "required": false,      "status": "verified",      "found": [],      "purpose": "dmarc",      "type": "TXT",      "name": "_dmarc.acme.com",      "value": "v=DMARC1; p=none;"    }  ],  "created_at": "2026-01-15T09:30:00.000Z",  "last_checked_at": "2026-01-15T09:42:10.000Z",  "verified_at": "2026-01-15T09:42:10.000Z",  "failed_at": null,  "tracking": {    "hostname": "links.acme.com",    "status": "active",    "record": {      "type": "CNAME",      "name": "links.acme.com",      "value": "track.cosslinks.com",      "status": "verified",      "found": []    },    "message": null,    "created_at": "2026-01-15T09:45:00.000Z",    "last_checked_at": "2026-01-15T09:52:00.000Z",    "activated_at": "2026-01-15T09:52:00.000Z",    "failed_at": null  },  "receiving": null,  "bimi": {    "status": "configured",    "name": "default._bimi.acme.com",    "record": "v=BIMI1; l=https://acme.com/brand/logo.svg; a=https://acme.com/brand/vmc.pem",    "logo_url": "https://acme.com/brand/logo.svg",    "certificate_url": "https://acme.com/brand/vmc.pem",    "dmarc_policy": "reject",    "issues": []  },  "subaccount_id": null,  "shared_with_subaccounts": false}