{"_id":"5acb8e53cc44880003952288","project":"5669937dfc5abf2300afe7de","version":{"_id":"59796d1140a3a2001f068cb4","project":"5669937dfc5abf2300afe7de","__v":2,"createdAt":"2017-07-27T04:33:21.278Z","releaseDate":"2017-07-27T04:33:21.278Z","categories":["59796d1140a3a2001f068cb5","59796d1140a3a2001f068cb6","59796d1140a3a2001f068cb7","59796d1140a3a2001f068cb8","5acb7bc606a2ce0003f28da4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"category":{"_id":"5acb7bc606a2ce0003f28da4","project":"5669937dfc5abf2300afe7de","version":"59796d1140a3a2001f068cb4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-04-09T14:42:14.106Z","from_sync":false,"order":9999,"slug":"webhooks","title":"Webhooks"},"user":"599b4786eac604000fedaf43","githubsync":"","__v":9,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-04-09T16:01:23.193Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": \"bxxxx4-xxxf-4xxxx-8xxxxx-exxxx5dxxxx74\",\n  \"domainId\": \"530xxx7-fxxxx-4xxx-axxx-0d7exxxxxxx\",\n  \"transport\": \"http\",\n  \"transportProperties\": {\n    \"endpoint\": \"https://whatsup.com\"\n  },\n  \"createdBy\": \"79xxxxx-xxd72-xxxx-axxx-xxxxxx1805\",\n  \"createdOn\": 1521572508000,\n  \"updatedBy\": \"79xxxxx-xxd72-xxxx-axxx-xxxxxx1805\",\n  \"updatedOn\": 1521572546000\n}\n","name":""},{"status":400,"language":"json","code":"{ message: [Array of error messages] }","name":""},{"status":401,"language":"json","code":"{\n  \"message\": \"Access Denied\"\n}"},{"code":"{\n  \"message\": \"Access Denied\"\n}","status":403,"language":"json"}]},"method":"post","examples":{"codes":[{"code":"curl -X \"POST\" \"https://s2-api.safestream.com/2.0/webhooks\" \\\n     -H \"Content-Type: application/json\" \\\n     -H \"x-api-key: [[app:apiKey]]\" \\\n     -H \"x-api-client-id: [[app:apiClientId]]\" \\\n     -d $'{\n  \"transport\": \"http\",\n  \"transportProperties\": {\n    \"endpoint\": \"https://whatsup.com\"\n  }\n}'\n","language":"curl"}]},"auth":"required","params":[{"_id":"568a7b50bf86800d00fe310c","ref":"","in":"body","required":false,"desc":"If this field is not specified all account specific events will be sent, please see Event Bindings section below for more details","default":"null","type":"string","name":"eventBinding"},{"_id":"568a7bd18360c00d00a0e72b","ref":"","in":"body","required":true,"desc":"Determines how to connect to the specified endpoint given in the transportProperties","default":"\"transport\": \"http\"","type":"string","name":"transport"},{"_id":"568a7c40d4e2360d0098002b","ref":"","in":"body","required":true,"desc":"Contains the endpoint that the desired event will be sent to","default":"\"transportProperties\": {       \"endpoint\": \"https://whatsup.com\"     }","type":"array_object","name":"transportProperties"},{"_id":"58248f95d90fa027009b2597","ref":"","in":"body","required":false,"desc":"Desired filters for the webhook","default":"\"filter\" : {\"myFilter\" : [\"filter1\", \"filter2\"]}","type":"array_object","name":"filter"},{"_id":"5acb8da83990fe0003bc52d4","ref":"","in":"body","required":false,"desc":"Metadata about the webhook","default":"null","type":"string","name":"body"}],"url":"/webhooks"},"isReference":false,"order":0,"body":"[block:api-header]\n{\n  \"title\": \"Event Bindings\"\n}\n[/block]\n**video.create**  - This event is fired when a new video is ingested into SafeStream\n\n**watermark.job.create**  - This event is fired when a request for video watermarking is received *via a POST to /watermark*","excerpt":"Create a webhook","slug":"create-webhook","type":"endpoint","title":"Create Webhook"}

postCreate Webhook

Create a webhook

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

eventBinding:
stringnull
If this field is not specified all account specific events will be sent, please see Event Bindings section below for more details
transport:
required
string"transport": "http"
Determines how to connect to the specified endpoint given in the transportProperties
transportProperties:
required
array of objects"transportProperties": { "endpoint": "https://whatsup.com" }
Contains the endpoint that the desired event will be sent to
filter:
array of objects"filter" : {"myFilter" : ["filter1", "filter2"]}
Desired filters for the webhook
body:
stringnull
Metadata about the webhook

Examples


Result Format


Documentation

[block:api-header] { "title": "Event Bindings" } [/block] **video.create** - This event is fired when a new video is ingested into SafeStream **watermark.job.create** - This event is fired when a request for video watermarking is received *via a POST to /watermark*

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}