- Add a sending domain POST
- Receive email at a domain POST
- Add a custom tracking domain POST
- Remove a sending domain DELETE
- Stop receiving email at a domain DELETE
- Remove a custom tracking domain DELETE
- Retrieve a DMARC report GET
- Retrieve a domain's DMARC status GET
- Retrieve a sending domain GET
- List a domain's DMARC reports GET
- List sending domains GET
- Check a domain's DNS records now POST
- Create an email template POST
- Delete an email template DELETE
- Retrieve a template's draft GET
- Retrieve a template version GET
- Retrieve an email template GET
- List a template's versions GET
- List email templates GET
- Publish a template's draft POST
- Restore a template version POST
- Update a template's draft PUT
- Update an email template PATCH
- Check an email address POST
- Check an IP address POST
- Check a rate limit POST
- Classify content POST
- Assess an event POST
- Report an assessment's outcome POST
- Create a rate limit bucket POST
- Add an allow or block list entry POST
- Create a rule POST
- Delete a rate limit bucket DELETE
- Remove a list entry DELETE
- Delete a rule DELETE
- Forget a user DELETE
- Retrieve an assessment GET
- Retrieve the calibration GET
- Retrieve a rate limit bucket GET
- Retrieve a list entry GET
- Retrieve a rule GET
- Retrieve the risk settings GET
- List assessments GET
- List rate limit buckets GET
- List allow and block list entries GET
- List rules GET
- Update a rate limit bucket PATCH
- Update a rule PATCH
- Update the risk settings PATCH
- Create a webhook endpoint POST
- Open a webhook listener POST
- Delete a webhook endpoint DELETE
- Close a webhook listener DELETE
- Retrieve a delivery GET
- Retrieve a webhook endpoint GET
- List an endpoint's deliveries GET
- List webhook endpoints GET
- Poll a webhook listener POST
- Recover failed deliveries POST
- Retry a delivery POST
- Roll a signing secret POST
- Update a webhook endpoint PATCH
Open a webhook listener
Listeners are how coss listen forwards events to a local server: COSS can't reach localhost, so the CLI pulls them. They belong to the API key's environment, receive events created after they open, and don't count toward the plan's webhook endpoints. A listener closes when it is deleted or after 10 minutes without a poll; an environment has at most 5 open at once. Events reach it unsigned: the CLI signs what it forwards with its own secret.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
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.
"2026-10-10"application/json- body
- body
- …
event_types?array<>Event types to receive. Defaults to every event type.
items <= 31api_version?"2026-10-10"The API version events are rendered in. Defaults to the version of the request that creates the listener.
"2026-10-10"description?|Where the events go, for your own reference (shown in the log).
length <= 256The listener.
application/json- response
- response
- …
object*"webhook_listener""webhook_listener"id*stringapi_version*stringThe API version (Coss-Version) the listener's events are rendered in.
event_types*array<string>Event types the listener receives. An empty array means every event type.
description*string|nullexpires_at*stringWhen the listener closes unless it is polled again; every poll moves it 10 minutes ahead.
date-timecreated_at*stringdate-timeimport { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.webhookListeners.create({ event_types: [ "email.sent", "email.delivered", ], description: "localhost:3000/webhooks",});{ "object": "webhook_listener", "id": "whlis_01k7c8m4q2f3e9v6t5r1n0p8yz", "api_version": "2026-10-10", "event_types": [ "email.delivered", "email.bounced" ], "description": "bailey-mbp → localhost:3000/webhooks", "expires_at": "2026-01-15T09:40:00.000Z", "created_at": "2026-01-15T09:30:00.000Z"}