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

Change a source

Change a source's settings, or set, replace or remove its signing secret.

PATCH
/api/v1/sources/{source}

Changes the settings you send. Each one left out keeps its value, and null clears it.

signing_secret is write-only. Send a new one to replace it, or null to remove it. Left out, the saved secret stays while the signature check stays the same. Picking another sender without a secret leaves the check waiting for one, so webhooks get through unchecked until you send it. A secret needs a sender: send one without a signature_scheme and you get a 422.

A supabase source always needs a secret, so null is refused. Send a new one, or set signature_scheme to null to turn the check off.

Only admins can change sources.

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.

Path Parameters

source*integer

The source's id, from List sources.

Formatint64

Request Body

application/json
  1. body

Only the settings to change. Each one left out keeps its value.

name?string
Lengthlength <= 255
signature_scheme?|null
signing_secret?|

A new secret to replace the saved one, or null to remove it.

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

Response Body

The source as saved.

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 PATCH 'http://localhost:8080/api/v1/sources/0' \
  -H 'Authorization: Bearer ' \
  -H 'Content-Type: application/json' \
  -d '{
  "retention_days": 90
}'
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"
}