Create a Webhook
POST {{cryptr_service_url}}/api/v2/webhooks?name=User provision success&event_codes[]=dir_sync.user.provision.success&target_url=http://localhost:8000
Creates a new Webhook for your organization. When you create a Webhook, you will receive the associated signature key.
Note: When you create a Webhook, its storage location is determined by the environment of your API key. For example, a Webhook is created in the sandbox environment only if the corresponding resource is stored in the sandbox. You cannot create a Webhook in the Production environment with this API key; you need an API key dedicated to that environment.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
name | string | (Required) The name of your webhook you can set it to anything you want | |
event_codes[] | string | (Required) Identifiers used to specify types of events within a webhook. | |
target_url | string | (Required) Refers to the specific URL where you want to receive event information. |
RESPONSES
status: Created
{"__environment__":"sandbox","__type__":"Webhook","active":true,"event_codes":["dir_sync.user.provision.success"],"id":"webhook_2jhL3MOOQFRuouWlYhmea6yBEwC","inserted_at":"2024-07-24T15:16:01","name":"User provision success","signature_key":"G8DXTIOobwGxhkFf2X5VidlQhJ8hoVAONc3Ezi21KEZKe2mikvF1-YMx2pQ3RKIsKmHOWWVv5ZTWahxxQuKM72vCMvz84jBeAhfYQsjMqLGA3Tg9nlgBUfa3BOEaUNZH","target_url":"http://localhost:8000","updated_at":"2024-07-24T15:16:01"}