diff --git a/README.md b/README.md index b8eb19c..90967e4 100644 --- a/README.md +++ b/README.md @@ -205,29 +205,42 @@ Each one of them encapsulates the operations related to it (like listing, updati ### Webhooks +#### `webhooks.create({ uid, tag, url, enable = false, secret, verifySSL })` + +- Create a webhook. +- `uid`: Unique ID for the form. +- `tag`: Unique name you want to use for the webhook. +- `url`: Webhook URL. +- `enabled`: `true` if you want to send responses to the webhook immediately. Otherwise, `false`. +- `secret`: If specified, will be used to sign the webhook payload with HMAC SHA256, so that you can verify that it came from Typeform. +- `verifySSL`: `true` if you want Typeform to verify SSL certificates when delivering payloads. + +#### `webhooks.delete({ uid, tag })` + +- Delete a webhook. +- `uid`: Unique ID for the form. +- `tag`: Unique name of the webhook. + #### `webhooks.get({ uid, tag })` + - Get details for a webhook with the given tag -- `uid`: typeform UID +- `uid`: Unique ID for the form. - `tag`: tag of the webhook created -#### `webhooks.create({ uid, tag, url, enable = false })` -- Create a webhook with the given tag -- `uid`: typeform UID -- `tag`: (string) tag of the webhook (how are you going to identify it) -- `url`: (string) url of the service you want to notify -- `enable`: (bool) +#### `webhooks.list({ uid })` -#### `webhooks.update({ uid, tag, url, enable = false })` -- Update a webhook with the given tag -- `uid`: typeform UID -- `tag`: (string) tag of the webhook (how are you going to identify it) -- `url`: (string) url of the service you want to notify -- `enable`: (bool) +- Retrieve all webhooks for the specified typeform. +- `uid`: Unique ID for the form. -#### `webhooks.delete({ uid, tag })` -- Delete a webhook with the given tag for a given typeform -- `uid`: typeform UID -- `tag`: (string) tag of the webhook +#### `webhooks.update({ uid, tag, url, enable = false, secret, verifySSL })` + +- Update a webhook. +- `uid`: Unique ID for the form. +- `tag`: Unique name you want to use for the webhook. +- `url`: Webhook URL. +- `enabled`: `true` if you want to send responses to the webhook immediately. Otherwise, `false`. +- `secret`: If specified, will be used to sign the webhook payload with HMAC SHA256, so that you can verify that it came from Typeform. +- `verifySSL`: `true` if you want Typeform to verify SSL certificates when delivering payloads. ## Examples