Create one or more event subscriptions
Create a new subscription. The response is wrapped in an array even for a single object, according to REST hook standards, and is the same result as Retrieve an event subscription for the authenticated user. Only admin users may create a global subscription; for other users global set to true answers 403.
Multiple subscriptions can be posted as an array in one request. The items are handled in order and the request is not atomic: when an item fails, the items before it stay created and only the error is returned. An item with a target_url and no event is handled as the delete described below and ends the request with an empty body, so the items after it are not processed.
Posting a body that carries a target_url and no event deletes the global subscription with that target_url instead of creating one, and answers with an empty body. Only admin users may delete a global subscription, and an unmatched target_url returns 400.
Events are POSTed to target_url and must be answered with a 2xx response. Anything else counts as a failure and the event is retried up to three times: 60 minutes, 12 hours and 24 hours after the previous attempt. An email notification is sent to the sender, or to notification_email, when the second attempt fails, and the webhook is disabled when the fourth attempt fails. Respond within 15 seconds; a slower response can time out and count as a failure. A 410 Gone response disables the subscription immediately. Some targets and events are exceptions, such as a force.com target that is not retried: see Failures and retries in the webhook guide.
Request
- Base URL: https://api.getaccept.com
- URL: https://api.getaccept.com/v1/subscriptions
- Auth: HTTP bearer
Request body
Response
The request succeeded.
Changes
No recorded changes to this operation across all 1 revision of this API.