Create Webhook
Add a webhook
/webhooks
POST
https://api.terminal.africa/v1/webhooks
This endpoint allows you to create a new webhook for a user.
Headers
Name
Type
Description
Authorization*
String
Set value to Bearer SECRET_KEY
Content-Type
String
Set value to application/json
Request Body
Name
Type
Description
name*
String
Name of webhook.
active*
Boolean
Indicated if webook is active. If set to false, events will not be sent to the endpoint.
events*
Array
List of webhook event types.
live*
Boolean
Indicate if endpoint is for test or live events.
url*
String
Endpoint url for receiving webhook events. If live is set to true, must provide https endpoint.
{
status: true,
message: 'Webhook created successfully',
data: {
active: true,
events: ['shipment.created'],
live: true,
name: 'Shipment Create',
url: 'https://terminal-africa.com/webhooks/shipmonk',
user: '6aVb7978zZYmke2gJPF9WppUEWvvK5OU',
webhook_id: 'WA-70919934470',
created_at: '2021-07-13T20:25:53.011Z',
updated_at: '2021-07-13T20:25:53.011Z'
}
}
Last updated
Was this helpful?