Create a destination
Add a destination, then connect sources to it.
Adds a destination no source sends to yet. Connect sources to it with Connect a destination. A filter belongs to a source, so it's set when you connect one.
Only admins can create destinations.
A connected app needs the write scope: full access.
AuthorizationBearer <unm_ followed by 40 letters and digits>A token from the CLI page in Unmissed. Revoke it there to stop it working.
application/json- body
url*stringYour app's webhook endpoint, like https://app.example.com/webhooks.
length <= 2048rate_limit?|The most webhooks to send per rate_limit_per. Left out or null, no limit.
1 <= value <= 100000rate_limit_per?|second when left out.
"second""minute"nullThe new destination.
application/json- response
An app webhooks are sent to. Any number of sources can send to it.
id*integerint64url*stringWhere it sends, as its host only, like https://app.example.com/…. The rest of an address often holds a secret.
rate_limit*|The most webhooks sent per rate_limit_per, from every source together, or null for no limit.
rate_limit_per*|"second""minute"nulldown_since*|When it stopped accepting webhooks, while it's down.
date-timelast_delivered_at*|date-timesources*array<>The sources sending here, each with its filter.
created_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'http://localhost:8080/api/v1/destinations' \
-H 'Authorization: Bearer ' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://app.example.com/webhooks",
"rate_limit": 10,
"rate_limit_per": "second"
}'{
"id": 0,
"url": "string",
"rate_limit": 0,
"rate_limit_per": "second",
"down_since": "2019-08-24T14:15:22Z",
"last_delivered_at": "2019-08-24T14:15:22Z",
"sources": [
{
"id": 0,
"name": "string",
"filter_on": "body",
"filter_field": "string",
"filter_values": "string"
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}