{"_id":"582789abbe5c080f00a5a80a","version":{"_id":"582789aabe5c080f00a5a7fe","__v":10,"project":"568bdc1483d2061900d86cdc","createdAt":"2016-11-12T21:29:14.915Z","releaseDate":"2016-11-12T21:29:14.915Z","categories":["582789abbe5c080f00a5a7ff","582789abbe5c080f00a5a800","582789abbe5c080f00a5a801","582789abbe5c080f00a5a802","582789abbe5c080f00a5a803","582789abbe5c080f00a5a804","582789abbe5c080f00a5a805","582789abbe5c080f00a5a806","582789abbe5c080f00a5a807","582789abbe5c080f00a5a808","5827ea984ca29e0f00137a9e","583df597887db62f00644283","583df5d9c622791900e78da5","5845cd8763c11b250037967d","5845d13063c11b2500379681","5859e859e3306d1900126725","587aeb9a01cf3a0f008359eb","587c422af45e2d0f005e200d","587d84dc82f6f30f004ceee5"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"beta2","version_clean":"0.0.0","version":"0"},"category":{"_id":"582789abbe5c080f00a5a807","project":"568bdc1483d2061900d86cdc","__v":0,"version":"582789aabe5c080f00a5a7fe","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-05-17T20:31:45.696Z","from_sync":false,"order":15,"slug":"webhooks","title":"Webhooks"},"parentDoc":null,"user":"573b7f42fdc9d320001b777d","project":"568bdc1483d2061900d86cdc","__v":1,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-18T20:49:51.235Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"POST https://ioe.droplit.io/api/webhooks HTTP/1.1\nauthorization: AUTH_TOKEN\ncontent-type: application/json\n\n{\n  \"ecosystemId\": \"C573b86eeee43dd7ba0244f8a\",\n  \"url\": \"http://iot.example.com/droplit\",\n  \"secret\": \"xyzzy\",\n  \"description\": \"My IOT server\"\n}","language":"http"}]},"method":"post","results":{"codes":[{"language":"json","code":"{\n  \"id\": \"573cdb450224330956ae2a2d\",\n  \"ecosystemId\": \"C573b86eeee43dd7ba0244f8a\",\n  \"url\": \"http://iot.example.com/droplit\",\n  \"secret\": \"xyzzy\",\n  \"description\": \"My IOT server\",\n  \"createdAt\": \"2016-05-18T21:13:57.149Z\"\n}","name":"","status":201},{"status":400,"language":"json","code":"{\n  \"errorType\": \"InvalidParams\",\n  \"errors\": [\n    {\n      \"in\": \"body\",\n      \"message\": \"field is required\",\n      \"path\": \"url\"\n    }\n  ]\n}","name":""},{"status":401,"language":"text","code":""},{"code":"","status":403,"language":"text"},{"language":"text","code":"Ecosystem with id C573b86eeee43dd7ba0244f8b does not exist.","status":404}]},"settings":"572c39957c8eff0e00aaa18b","auth":"required","params":[{"_id":"573cdb61def24f0e008e5848","ref":"","in":"body","required":true,"desc":"parent [ecosystem](doc:ecosystems) id","default":"","type":"string","name":"ecosystemId"},{"_id":"573cdb61def24f0e008e5847","ref":"","in":"body","required":true,"desc":"address of the HTTP callback","default":"","type":"string","name":"url"},{"_id":"58d07f9a1c2b1b1900042945","ref":"","in":"body","required":false,"desc":"a secret token that may be used to secure the webhook","default":"","type":"string","name":"secret"},{"_id":"573cdb61def24f0e008e5846","ref":"","in":"body","required":false,"desc":"a description for the webhook","default":"","type":"string","name":"description"}],"url":"/webhooks"},"isReference":true,"order":1,"body":"[block:api-header]\n{\n  \"title\": \"Parameter Notes\"\n}\n[/block]\n## secret\nWebhook endpoints are open to the internet to be called from anywhere. In order to verify that a call has come from the Droplit.io servers, use a `secret` key.\n\nProviding a secret key in the webhook configuration will add an SHA-256 HMAC hexdigest to webhook calls in an `x-droplit-signature` HTTP request header. The receiving application may then compare this signature with its own SHA-256 HMAC digest generated from the same secret to ensure the webhook call originated from the Droplit.io servers.","excerpt":"Create a new webhook","slug":"create-webhooks","type":"endpoint","title":"Create"}

postCreate

Create a new webhook

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

ecosystemId:
required
string
parent [ecosystem](doc:ecosystems) id
url:
required
string
address of the HTTP callback
secret:
string
a secret token that may be used to secure the webhook
description:
string
a description for the webhook

Examples


Result Format


Documentation

[block:api-header] { "title": "Parameter Notes" } [/block] ## secret Webhook endpoints are open to the internet to be called from anywhere. In order to verify that a call has come from the Droplit.io servers, use a `secret` key. Providing a secret key in the webhook configuration will add an SHA-256 HMAC hexdigest to webhook calls in an `x-droplit-signature` HTTP request header. The receiving application may then compare this signature with its own SHA-256 HMAC digest generated from the same secret to ensure the webhook call originated from the Droplit.io servers.

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 }}