Create Webhook
POST {{baseUrl}}/extensions/event-webhooks
Add webhook to the organization. Returns the webhook object in response.
Requires access_token
as a Bearer {{token}}
in the Authorization
header with user-write
scope.
Request Body
{"description"=>"<string>", "filters"=>{"op"=>"and", "conditions"=>[{"op"=>"eq", "lhs"=>"service_id", "rhs"=>"612ce2a67115ff9a44a1052d"}, {"lhs"=>"service_id", "op"=>"eq", "rhs"=>"60cb2d38ec1645d56399562e"}, {"op"=>"and", "conditions"=>[{"lhs"=>"service_id", "op"=>"eq", "rhs"=>"60cb200fceb9ac000726a24f"}, {"lhs"=>"alert_source_id", "op"=>"eq", "rhs"=>"5d6509f5d062840e307cc431"}]}]}, "header"=>{"abc"=>"xyz"}, "name"=>"test13345", "triggers"=>[{"name"=>"Incident Triggered", "event_class"=>"incident", "event_type"=>"triggered"}, {"name"=>"Incident Acknowledged", "event_class"=>"incident", "event_type"=>"acknowledged"}, {"name"=>"Incident Resolved", "event_class"=>"incident", "event_type"=>"resolved"}, {"name"=>"Incident Reassigned", "event_class"=>"incident", "event_type"=>"reassigned"}], "urls"=>[{"method"=>"POST", "url"=>"https://abc.punit"}], "mail_ids"=>["abc@gmail.com"]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | null | ||
Content-Type | string |
RESPONSES
status: Created
{"data":{"id":"6214dd651db3553d5b24f579","created_at":"2022-02-22T12:56:05.603027785Z","updated_at":"2022-02-22T12:56:05.603027867Z","organization_id":"60cb200bc9de4a0008d2fc41","author_id":"60f12dd3814bef0008c4036e","name":"test13345","slug":"test13345","description":"","triggers":[{"event_class":"incident","event_type":"triggered"},{"event_class":"incident","event_type":"acknowledged"},{"event_class":"incident","event_type":"resolved"},{"event_class":"incident","event_type":"reassigned"}],"urls":[{"url":"https://abc.punit","method":"post"}],"header":{"abc":"xyz"},"filters":{"op":"and","conditions":[{"op":"eq","lhs":"service_id","rhs":"60cb200fceb9ac000726a24f"}]},"max_retry":3,"mail_ids":null,"send_custom_payload":false,"custom_payload":""}}