Event delivery

List where a newsletter's events go

Every destination this newsletter's published events are delivered to, newest first. Needs webhooks: read.

A destination is not necessarily an HTTPS endpoint. It can also be a queue, a stream or an object store, for a consumer that would rather not run a web server. type says which kind this one is.

Read only. Destinations are added, edited and disabled in the delivery portal, and POST /newsletters/{newsletter}/portal-session mints the link to it.

A newsletter that has never opened that portal has no destinations and answers with an empty page, which is different from an error: an event published by a newsletter with no destinations is accepted, recorded and delivered nowhere.

Nothing a destination authenticates with is returned, including the secret its deliveries are signed with and any request header the creator configured on it. target is a display summary of where it points, the host of an endpoint or the name of a queue, and it is the identifying detail this operation returns in place of the full configuration. The portal is where the rest of it can be read by the person who set it up.

get/newsletters/{newsletter}/destinations

Request

  • Base URL: https://api.usecommune.com
  • URL: https://api.usecommune.com/newsletters/{newsletter}/destinations
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://usecommune.com/api/oauth/authorize, token URL https://usecommune.com/api/oauth/token, scopes: webhooks:read)

Query parameters

cursorstring

The pagination.next_cursor value from the previous page. Omit it to read the first page. A cursor is opaque, is only valid for the same operation with the same filters, and is not a durable identifier.

limitinteger

How many items to return in this page. This is a page size, not an offset. Fewer items than requested may come back and that does not mean the collection is exhausted, only an absent next_cursor does.

expandstring

Comma-separated list of relationship paths to inline in the response. Unexpanded relationships are returned as a reference object carrying only id and object. Each operation documents the paths it accepts, and an unknown path answers 400. Nested paths use a dot, for example article.newsletter.

fieldsstring

Comma-separated allow-list of top level properties to return on each object, so a client can trim a response it does not need in full. id and object are always returned. An unknown property name answers 400. Properties omitted by an operation, such as content on any article list, cannot be brought back with fields.

Response

A page of destinations, most recently added first.

object'list' required

Always list, so a response is self describing.

Example response

{
  "pagination": {
    "next_cursor": "Y3Vyc29yOjE3NTY0MjM2MDAwMDA6MDE5MmM4"
  },
  "data": [
    {
      "newsletter": {
        "object": "newsletter",
        "id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
      },
      "type": "webhook",
      "target": "hooks.example.org",
      "topics": [
        "article.published",
        "subscriber.created"
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.