Update a webhook subscription
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/webhook-subscriptions/v1-webhook-subscription-update-put.md. Index of every page and the rules for every call: /llms.txt. Guides and concepts in one file: /llms-full.txt. OpenAPI: /openapi.json.
PUT/
Changes a subscription's URL, name, events or status, and returns it.
url is required on every update, even when it doesn't change. Fields you leave out keep their values. Set status to disabled to pause deliveries and back to active to resume them; events that happen while it is disabled are not sent later.
Business rules
urlis required.- A new
urlis checked as on create:https://, on a host that resolves only to public internet addresses. The subscription's current URL, sent exactly as stored, is not looked up again, so you can rename, disable or change the events of a subscription whose receiver is down. statusisactiveordisabled.enabled_events, when sent, needs at least one name, no repeats, and replaces the list.- The
secret,sourceand status filters cannot be changed.
Side effects
- A new URL receives the retries of earlier events that are still pending.
- Disabling stops new deliveries, but retries already scheduled (at most about 2 minutes ahead) still go out.
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
The webhook subscription's
id: a hash id from an earlier answer. Only hash ids work here; anything else answers 404page_not_found.- Example
V4keXwwxMQyXw7
- Example
Request body
application/json, required.
Where YoPrint sends events. Must be an
https://URL on the public internet. YoPrint refuses plainhttp://URLs and any host that resolves to a non-public address (private, loopback, link-local, carrier-grade NAT, multicast or reserved). YoPrint looks up the host when you save, but does not send a test request. Use the final destination URL because redirects are not followed.configobjectAccepted and validated, but not saved: status filters can only be set when the subscription is created.
enabled_eventsarray of stringsReplaces the whole list. YoPrint doesn't check the names.
- At least 1 item
- Items must be unique
namestringA name to recognize it by.
statusstringdisabledstops deliveries;activeresumes them.- One of:
"active","disabled"
- One of:
More examples (1)
Turn deliveries back on
curl -X PUT 'https://secure.yoprint.com/v1/api/store/your-team/setting/webhook_subscription/V4keXwwxMQyXw7' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' \ -H 'X-Yoprint-Decimal-Format: exact-v1' \ -H 'Content-Type: application/json' \ -d '{ "status": "active", "url": "https://example.com/yoprint/webhooks" }'Response
200Successful response.
Child fields (10)
auto_disable_too_many_errorswhen YoPrint turned the subscription off because its deliveries kept failing. Otherwise null. Settingstatusback toactivedoes not clear it.Subscribed event names, or
allfor every event.The subscription id.
The secret used to sign event payloads:
whsec_followed by 32 letters and digits. Use it to verify incoming messages. YoPrint creates it when the subscription is created and never changes it. Keep it private. Only the team owner and members whose permission group has Manage Settings can see it; for every other member it is null. It is also null for AI apps reading through YoPrint's MCP server.The
sourcesent when the subscription was created: the web app sendsyoprint, YoPrint's Zapier app sendszapier.Only
activesubscriptions receive events.- One of:
"active","disabled"
- One of:
The destination URL where YoPrint delivers events. On this API, this is the full URL. AI apps reading subscriptions through YoPrint's MCP server see only the origin (scheme and host, such as
https://example.com) to protect webhook secrets.
Errors
401The API key is missing or wrong (
unauthenticated).- When
- The API key is missing or wrong.
- Fix
- Send your personal API key as
Authorization: Bearer YOUR_API_KEY.
403You are not allowed to do this.
api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only{"message": "Insufficient Permission"}. Other refusals use the error envelope, withunauthorizedoruser_is_not_authorized.- When
- Your permission group lacks Manage Settings. This 403 has a short body,
{"message": "Insufficient Permission"}, withoutsuccessorerror. - Fix
- Ask the team owner to give your permission group Manage Settings.
404Not found.
page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's.code: null, with a message that starts "No query results for": there is no record with that id.- When
- No webhook subscription with that id on this team (
error.codeis null anderror.messagestarts "No query results"), the id is not one of this team's hash ids, or you are not a member of the team (bothpage_not_found). - Fix
- Use an
idfrom the list operation and check the team slug.
422The request was refused and changed nothing.
validation_failedlists what to fix inerror.fields; other codes name a business rule, explained inerror.message. A few checks answer with only{"message": "..."}. An operation that calls another service (a payment provider, a carrier, an accounting app) can answerconnect_timeout("Please retry again") when that service does not answer in time: the change may or may not have happened there, so read the record back before you retry.- When
urlis missing or not a URL,statusis notactiveordisabled,enabled_eventsis empty or repeats a name, or astatus_idslist is empty.error.codeisvalidation_failed, anderror.fieldsnames each field with its messages.- Fix
- Fix the fields listed in
error.fieldsand send the request again. - When
urlis refused by the public-address check (validation_failed, witherror.fields.urlanderror.field_reasons.url.reason).not_public_address: the URL is nothttps://, has no usable host, or its host reaches an address that is not on the public internet ("Use an https:// URL that reaches a public internet address.").host_lookup_failed: the host name could not be looked up ("The host name in this URL could not be looked up. Check the address, or try again in a minute.").- Fix
- Use an
https://URL on a public host. Forhost_lookup_failed, check the host name, or try again in a minute if its DNS is new.
Notes
- Turning a subscription back on leaves
disable_reasonas it was. - To change the status filters, create a new subscription with the new
configand delete the old one.
Related
- GETShow a webhook subscription
/v1/ api/ store/ {team_slug}/ setting/ webhook_subscription/ {hash_id} - DELETEDelete a webhook subscription
/v1/ api/ store/ {team_slug}/ setting/ webhook_subscription/ {hash_id}
