🟢Add a webhook subscription
Add a webhook subscription for an user.
post
Authorizations
keystringRequired
Query parameters
keystringRequired
The API key is a unique identifier provided by our support team for accessing the API.
userstringRequired
The 'user' parameter is a unique identifier provided by the API support team to identify authorized users in the requests.
Body
urlstringRequiredExample:
https://www.web.com/api/namestringRequiredExample:
Name of subscriptionResponses
200
Subscription add
No content
400
Bad Request
post
/webhookNo content
curl -i -X POST \
'https://api.gowit.us/v1/webhook?user=INSERT_USER&key=INSERT_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://www.web.com/api/",
"name": "Name of subscription"
}'const query = new URLSearchParams({
user: 'INSERT_USER',
key: 'INSERT_KEY'
}).toString();
const resp = await fetch(
`https://api.gowit.us/v1/webhook?${query}`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://www.web.com/api/',
name: 'Name of subscription'
})
}
);
const data = await resp.json();
console.log(data);Last updated