Skip to Content
Unmissed Cloud is coming soon.Join the waitlistJoin
Unmissed

Create a source

Add a source and get its receiving URL, with a destination if you like.

POST
/api/v1/sources

Adds a source and returns it with its receiving URL. Give that URL to the sender, such as Stripe, in place of your app's URL.

With forward_url, it also adds a destination at that URL and sends the source's webhooks there. Without it, the source keeps its webhooks until you connect a destination with Connect a destination.

Only admins can create sources. The change shows up in the audit log under the token's name.

A connected app needs the write scope: full access.

Authorization

headerAuthorizationBearer <unm_ followed by 40 letters and digits>

A token from the CLI page in Unmissed. Revoke it there to stop it working.

Request Body

application/json
  1. body
name*string

Who sends these webhooks. Each source needs its own name.

Lengthlength <= 255
forward_url?|

Also adds a destination at this URL, so the source's webhooks go to your app.

Lengthlength <= 2048
signature_scheme?|null
signing_secret?|

The sender's signing secret. Never returned. Leave it out to add it later.

Lengthlength <= 1000
signature_header?|

Required for hmac and supabase.

Match^[A-Za-z0-9-]+$
Lengthlength <= 100
dedupe_by?|
Value in"content""id"null
dedupe_on?|
Value in"body""header"null
dedupe_field?|

Required when dedupe_by is id.

Lengthlength <= 200
retention_days?|

How many days to keep webhooks. Left out or null, forever.

Range7 <= value <= 3650

Response Body

The new source.

application/json
  1. response

The service that sends webhooks, like Stripe, with where it sends them.

id*integer
Formatint64
name*string
receiving_url*|

Where the sender posts webhooks. null for viewers, since anyone with it can send webhooks on to your app.

signature_scheme*|null
has_signing_secret*boolean

Whether a signing secret is saved. The secret itself is never returned.

signing_secret_unreadable*boolean

The secret was saved with another server key, so every webhook fails its check until you send it again.

signatures_unchecked*boolean

A signature check is picked but has no secret yet, so every webhook gets through unchecked.

signature_header*|

The header the signature or secret arrives in, for hmac and supabase.

dedupe_by*|

How copies are dropped. content for the same body, id for the same event ID, null for off.

Value in"content""id"null
dedupe_on*|

Where the event ID is, when dedupe_by is id.

Value in"body""header"null
dedupe_field*|

The body field or header holding the event ID, like id.

retention_days*|

How many days webhooks are kept, or null for forever.

destinations*array<>

Where it sends webhooks, each with this source's filter.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'http://localhost:8080/api/v1/sources' \
  -H 'Authorization: Bearer ' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Stripe",
  "forward_url": "https://app.example.com/webhooks/stripe",
  "signature_scheme": "stripe",
  "signing_secret": "whsec_...",
  "retention_days": 30
}'
Example Response
{
  "id": 0,
  "name": "string",
  "receiving_url": "string",
  "signature_scheme": "stripe",
  "has_signing_secret": true,
  "signing_secret_unreadable": true,
  "signatures_unchecked": true,
  "signature_header": "string",
  "dedupe_by": "content",
  "dedupe_on": "body",
  "dedupe_field": "string",
  "retention_days": 0,
  "destinations": [
    {
      "id": 0,
      "url": "string",
      "filter_on": "body",
      "filter_field": "string",
      "filter_values": "string"
    }
  ],
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}