Create webhook
POST
/partners/{id}/webhooks
const url = 'https://example.com/partners/example/webhooks';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"event":"order.created","url":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/partners/example/webhooks \ --header 'Content-Type: application/json' \ --data '{ "event": "order.created", "url": "example" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
event
required
string
url
required
string
Responses
Section titled “ Responses ” Media type application/json
object
id
required
string
account_id
required
string
event
required
string
url
required
string
created_at
required
string
updated_at
required
string
Example generated
{ "id": "example", "account_id": "example", "event": "example", "url": "example", "created_at": "example", "updated_at": "example"}