Event delivery

Open the event delivery portal

Mints a link into the delivery portal for this newsletter, where a creator adds a destination, disables one, rotates the secret its deliveries are signed with, and reads the response body an endpoint answered a failed delivery with. Needs webhooks: write.

This is the only way to create or edit a destination. There is no operation here that does it. The attempt log is readable through GET /newsletters/{newsletter}/delivery-attempts; what the portal has that this API does not is the response body an endpoint returned, which Commune withholds for the same reason it withholds a destination's configured request headers.

The returned url is a credential. It carries a bearer token in its query string, scoped to this newsletter, and anyone who opens it can change where this newsletter's events go. Redirect the person who asked for it and let the link be spent. Do not store it, log it, put it in a shared document or mail it; minting a new one is cheap.

Each call returns a different link, and nothing here can be fetched again afterwards. Takes no body and no parameters.

post/newsletters/{newsletter}/portal-session

Request

  • Base URL: https://api.usecommune.com
  • URL: https://api.usecommune.com/newsletters/{newsletter}/portal-session
  • 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:write)

Response

A link into the portal, valid for a short time.

object'portal_session' required

Always portal_session.

urlstring uri required

Where to send the creator. The token in the query string is a bearer credential scoped to this newsletter, so treat the whole URL as one: redirect, do not store, do not log, and mint another when another is needed.

expires_atstring date-time nullable required

When the credential in url stops being accepted. Advisory, and null when the delivery service did not say: it is there so a caller can decide whether a link it is holding is still worth following, and never something to schedule against.

Changes

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