Change a source
Change a source's settings, or set, replace or remove its signing secret.
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.
AuthorizationBearer <unm_ followed by 40 letters and digits>A token from the CLI page in Unmissed. Revoke it there to stop it working.
source*integerThe source's id, from List sources.
int64application/json- body
Only the settings to change. Each one left out keeps its value.
name?stringlength <= 255signature_scheme?|nullsigning_secret?|A new secret to replace the saved one, or null to remove it.
length <= 1000signature_header?|^[A-Za-z0-9-]+$length <= 100dedupe_by?|"content""id"nulldedupe_on?|"body""header"nulldedupe_field?|length <= 200retention_days?|7 <= value <= 3650The source as saved.
application/json- response
The service that sends webhooks, like Stripe, with where it sends them.
id*integerint64name*stringreceiving_url*|Where the sender posts webhooks. null for viewers, since anyone with it can send webhooks on to your app.
signature_scheme*|nullhas_signing_secret*booleanWhether a signing secret is saved. The secret itself is never returned.
signing_secret_unreadable*booleanThe secret was saved with another server key, so every webhook fails its check until you send it again.
signatures_unchecked*booleanA 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.
"content""id"nulldedupe_on*|Where the event ID is, when dedupe_by is id.
"body""header"nulldedupe_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*stringdate-timeupdated_at*stringdate-timecurl -X PATCH 'http://localhost:8080/api/v1/sources/0' \
-H 'Authorization: Bearer ' \
-H 'Content-Type: application/json' \
-d '{
"retention_days": 90
}'{
"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"
}