Webhooks
List, create, update, and delete webhooks.
Use these endpoints to manage the webhooks on your account. Each webhook subscribes one URL to one event type.
List Webhooks
Retrieve all webhooks configured in your account, with optional filtering and pagination.
GET /v2/webhook
Parameters
Prop
Type
See Pagination for shared behavior.
Example Request
curl -X GET "https://api.oktopost.com/v2/webhook" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true,
"Items": [
{
"Id": "0WA000000000001",
"Name": "My Webhook",
"Description": "Send new assignment to Slack",
"Event": "newInboxItemAssignment",
"Url": "https://hooks.slack.com/services/...",
"LastExecutionDate": "2024-01-15 10:30:00",
"IsEnabled": 1,
"Created": "2017-05-23 14:07:18",
"Modified": "2017-05-23 14:07:18"
}
],
"Total": 1
}Get Webhook
Retrieve details for a specific webhook by ID.
GET /v2/webhook/:webhookId
Parameters
Prop
Type
Example Request
curl -X GET "https://api.oktopost.com/v2/webhook/0WA000000000001" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true,
"Webhook": {
"Id": "0WA000000000001",
"Name": "My Webhook",
"Description": "Send new assignment to Slack",
"Event": "newInboxItemAssignment",
"Url": "https://hooks.slack.com/services/...",
"LastExecutionDate": "2024-01-15 10:30:00",
"IsEnabled": 1,
"Created": "2017-05-23 14:07:18",
"Modified": "2017-05-23 14:07:18"
}
}Create Webhook
Create a webhook that subscribes to a specific event type.
POST /v2/webhook
When you create a webhook, a Secret is generated. Use this secret to verify that webhook requests are genuinely from Oktopost. See Verify Webhook Signatures.
Parameters
Prop
Type
Example Request
curl -X POST "https://api.oktopost.com/v2/webhook" \
-u ACCOUNT_ID:API_KEY \
-d event="newInboxItemAssignment" \
-d name="Slack Assignment Notification" \
-d description="Send assignment notifications to Slack" \
-d url="https://hooks.slack.com/services/..." \
-d isEnabled=1Example Response
{
"Result": true,
"Webhook": {
"Id": "0WA000000000001",
"Name": "Slack Assignment Notification",
"Description": "Send assignment notifications to Slack",
"Event": "newInboxItemAssignment",
"Url": "https://hooks.slack.com/services/...",
"LastExecutionDate": "-",
"IsEnabled": 1,
"Secret": "a1b2c3d4e5f6...",
"Created": "2017-05-23 14:07:18",
"Modified": "2017-05-23 14:07:18"
}
}Update Webhook
Modify an existing webhook's configuration.
POST /v2/webhook/:webhookId
Parameters
Prop
Type
Example Request
curl -X POST "https://api.oktopost.com/v2/webhook/0WA000000000001" \
-u ACCOUNT_ID:API_KEY \
-d name="Updated Webhook Name" \
-d description="Updated description" \
-d isEnabled=0Example Response
{
"Result": true,
"Webhook": {
"Id": "0WA000000000001",
"Name": "Updated Webhook Name",
"Description": "Updated description",
"Event": "newInboxItemAssignment",
"Url": "https://hooks.slack.com/services/...",
"LastExecutionDate": "2024-01-15 10:30:00",
"IsEnabled": 0,
"Created": "2017-05-23 14:07:18",
"Modified": "2024-01-16 09:15:32"
}
}Delete Webhook
Remove a webhook. This action cannot be undone.
DELETE /v2/webhook/:webhookId
Parameters
Prop
Type
Example Request
curl -X DELETE "https://api.oktopost.com/v2/webhook/0WA000000000001" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true
}