These sample requests are autogenerated by the OpenAPI spec. This endpoint requires one or more parameters in the URL: those are offset in curly-braces.
import requestsurl = "https://api.buttondown.com/v1/webhooks/{id}"payload = {"status": "enabled","event_types": ["email.created", "email.sent"],"url": "https://my.api/webhook","description": "Trigger when an email is created to notify in Slack."}headers = {"accept": "application/json","authorization": "Token $BUTTONDOWN_API_KEY","content-type": "application/json"}response = requests.patch(url, json=payload, headers=headers)print(response.text)
Sample responses
The IDs and values referenced in these responses are fake; please only rely on these responses for overall structure.
{"creation_date": "2019-08-24T14:15:22Z","id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","url": "https://example.com","description": "Register in remote database every time we get a new subscriber","event": "subscriber.created"}
Body parameters
All parameters are optional unless explicitly specified.