Webhooks

Access your webhooks though the API to mange them.

Event types

Webhooks are fired as fast as possible after the event have taken place in our system. These are the supported events:

  • consent_created: fired when a consent is created.

  • consent_withdrawn: fired when a consent is withdrawn.

List all webhooks

GET https://app.openli.com/api/v1/webhooks

List all webhooks on the project.

Headers

NameTypeDescription

x-api-key

string

Your API key

[
  {
    "webhook_endpoint": {
      "public_key":"TRNQzTKQvTxmShKZ4CFyWjdN",
      "target_url":"https://cool.webhook",
      "events":[
        "consent_created",
        "consent_withdrawn"
      ],
      "created_at":"2018-08-21T16:32:18.364Z",
      "updated_at":"2018-08-21T16:32:18.364Z"
    }
  },
  {
    "webhook_endpoint": {
      "public_key":"sDdyTHgDDx4YDYNW5p9hEjMw",
      "target_url":"https://cool.webhook/2",
      "events":[
        "consent_created"
      ],
      "created_at":"2018-08-21T16:32:18.364Z",
      "updated_at":"2018-08-21T16:32:18.364Z"
    }
  }
]

Add a webhook

POST https://app.openli.com/api/v1/webhooks

Query Parameters

NameTypeDescription

target_url

string

The URL that the webhook should trigger.

events

string

The events that the webhook should be activated on. If multiple events separated them with a comma.

Headers

NameTypeDescription

x-api-key

string

Your API key

[
  {
    "webhook_endpoint": {
      "public_key":"TRNQzTKQvTxmShKZ4CFyWjdN",
      "target_url":"https://cool.webhook",
      "events":[
        "consent_created",
        "consent_withdrawn"
      ],
      "created_at":"2018-08-21T16:32:18.364Z",
      "updated_at":"2018-08-21T16:32:18.364Z"
    }
  },
  {
    "webhook_endpoint": {
      "public_key":"sDdyTHgDDx4YDYNW5p9hEjMw",
      "target_url":"https://cool.webhook/2",
      "events":[
        "consent_created"
      ],
      "created_at":"2018-08-21T16:32:18.364Z",
      "updated_at":"2018-08-21T16:32:18.364Z"
    }
  }
]

Delete a webhook

DELETE https://app.openli.com/api/v1/webhooks/:public_key

Path Parameters

NameTypeDescription

public_key

string

The public_key of the webhook.

Headers

NameTypeDescription

x-api-key

string

Your API key

Last updated