Skip to main content
POST
/
v1
/
webhooks
/
{subscriptionId}
/
active
Pause or resume a subscription
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({active: true})
};

fetch('https://sandbox.api.enfinitos.com/v1/webhooks/{subscriptionId}/active', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "ok": true,
  "data": {
    "subscription": {
      "subscriptionId": "<string>",
      "developerId": "<string>",
      "url": "<string>",
      "events": [],
      "label": "<string>",
      "active": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "lastDeliveredAt": "2023-11-07T05:31:56Z",
      "secretLastRotatedAt": "2023-11-07T05:31:56Z"
    }
  },
  "contractVersion": "<string>"
}

Authorizations

Authorization
string
header
required

API key sent as Authorization: Bearer <api-key>.

Path Parameters

subscriptionId
string
required

Webhook subscription id.

Body

application/json
active
boolean
required

Response

The updated subscription.

ok
boolean
required
data
object
required

Route-specific payload. Operation responses refine this.

contractVersion
string
required
Allowed value: "v1.0"