Webhooks

Learn about the /webhooks endpoint.

Webhooks provide a way for Argyle to communicate to your servers when specific events happen, such as when an account was successfully connected, new payouts were added, etc.

To start receiving webhooks, you need to build a web application, with a publicly accessible URL. Use that URL to create a webhook subscription.

After subscribing to a webhook, you receive a POST request with the event payload that contains information about the event that has been triggered.

For more information, refer to the Webhooks reference.

Attributes

AttributeTypeDescription
idstringUnique ID of the webhook.
eventsarray of stringsAn array of Argyle's webhook event types—for example, "activities.added". Refer to the Webhooks reference for a full list of available event types.
urlstringThe endpoint that is invoked when the specified event occurs.
configobjectConfiguration options of the webhook. Refer to the Webhooks reference to learn more about available configuration parameters.
namestringAn arbitrary name that is sent back to your system in the webhook payload.
secretstringThe key that will be used to generate HMAC-SHA512 hex digest value in the X-Argyle-Signature header.
created_atstring
timestamp
Time at which the webhook was created. Timestamps follow the ISO 8601 standard.
updated_atstring
timestamp
Time at which the webhook was last updated. Timestamps follow the ISO 8601 standard.

Endpoints

These are the endpoints available for webhooks.

Endpoints
Retrieve a webhook - GET /webhooks/:id
List webhooks - GET /webhooks
Create a webhook - POST /webhooks
Delete a webhook - DELETE /webhooks/:id

Examples

{
    "id": "580dca76-c024-4458-bb10-a2111ad4063e",
    "created_at": "2019-11-27T15:54:59.440004Z",
    "updated_at": "2019-11-27T15:54:59.440056Z",
    "events": [
        "*"
    ],
    "name": "All webhooks",
    "secret": null,
    "url": "https://webhooks-backend.com/argyle",
    "config": null
}
$ curl -X POST -u <key_id>:<key_secret> \
  https://api-sandbox.argyle.com/v1/webhooks \
  -H 'Content-Type: application/json' \
  -d '{"name": "webhooks", "url": "http://my.backend/url", "events": "*"}'