Webhook Deliveries¶
Reference for the webhook_deliveries endpoints of the Surfmeter API.
Surfmeter API – Webhook Deliveries v1¶
The Surfmeter API lets you manage clients, users, capabilities, measurements, and organization-wide settings programmatically.
Servers¶
| Description | URL |
|---|---|
| https://surfmeter-server.{host}/client_admin_api/v1 | https://surfmeter-server.{host}/client_admin_api/v1 |
Webhook Deliveries¶
GET /webhooks/{webhook_id}/deliveries¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
webhook_id |
path | string | No |
Response 200 OK
{
"webhook_deliveries": [
{
"id": 0,
"webhook_endpoint_id": 0,
"event_id": "string",
"event_type": "string",
"status": "pending",
"attempts": 0,
"max_attempts": 0,
"next_attempt_at": "string",
"response_status": 0,
"error_message": "string",
"duration_ms": 0,
"delivered_at": "string",
"manual": true,
"created_at": "string",
"updated_at": "string"
}
],
"pagination": {
"page": 0,
"per_page": 0,
"total_count": 0
}
}
Schema of the response body
{
"description": "Paginated delivery log of one webhook endpoint",
"type": "object",
"required": [
"webhook_deliveries",
"pagination"
],
"properties": {
"webhook_deliveries": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"webhook_endpoint_id",
"event_id",
"event_type",
"status",
"attempts",
"max_attempts",
"next_attempt_at",
"response_status",
"error_message",
"duration_ms",
"delivered_at",
"manual",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "integer"
},
"webhook_endpoint_id": {
"type": "integer"
},
"event_id": {
"type": "string"
},
"event_type": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"pending",
"succeeded",
"failed",
"exhausted",
"cancelled"
]
},
"attempts": {
"type": "integer"
},
"max_attempts": {
"type": "integer"
},
"next_attempt_at": {
"type": "string",
"nullable": true
},
"response_status": {
"type": "integer",
"nullable": true
},
"error_message": {
"type": "string",
"nullable": true
},
"duration_ms": {
"type": "integer",
"nullable": true
},
"delivered_at": {
"type": "string",
"nullable": true
},
"manual": {
"type": "boolean"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
}
},
"pagination": {
"type": "object",
"required": [
"page",
"per_page",
"total_count"
],
"properties": {
"page": {
"type": "integer"
},
"per_page": {
"type": "integer"
},
"total_count": {
"type": "integer"
}
}
}
}
}
GET /webhooks/{webhook_id}/deliveries/{id}¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No | ||
webhook_id |
path | string | No |
Response 200 OK
{
"webhook_delivery": {
"id": 0,
"webhook_endpoint_id": 0,
"event_id": "string",
"event_type": "string",
"status": "pending",
"attempts": 0,
"max_attempts": 0,
"next_attempt_at": "string",
"response_status": 0,
"error_message": "string",
"duration_ms": 0,
"delivered_at": "string",
"manual": true,
"created_at": "string",
"updated_at": "string",
"payload": {
"id": "string",
"type": "string",
"timestamp": "string",
"data": {}
},
"response_body": "string",
"rendered_body": "string",
"payload_format": "standard",
"rendered_content_type": "string"
}
}
Schema of the response body
{
"description": "One delivery with payload and response",
"type": "object",
"required": [
"webhook_delivery"
],
"properties": {
"webhook_delivery": {
"type": "object",
"required": [
"id",
"webhook_endpoint_id",
"event_id",
"event_type",
"status",
"attempts",
"max_attempts",
"next_attempt_at",
"response_status",
"error_message",
"duration_ms",
"delivered_at",
"manual",
"created_at",
"updated_at",
"payload",
"response_body",
"payload_format",
"rendered_body",
"rendered_content_type"
],
"properties": {
"id": {
"type": "integer"
},
"webhook_endpoint_id": {
"type": "integer"
},
"event_id": {
"type": "string"
},
"event_type": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"pending",
"succeeded",
"failed",
"exhausted",
"cancelled"
]
},
"attempts": {
"type": "integer"
},
"max_attempts": {
"type": "integer"
},
"next_attempt_at": {
"type": "string",
"nullable": true
},
"response_status": {
"type": "integer",
"nullable": true
},
"error_message": {
"type": "string",
"nullable": true
},
"duration_ms": {
"type": "integer",
"nullable": true
},
"delivered_at": {
"type": "string",
"nullable": true
},
"manual": {
"type": "boolean"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"payload": {
"type": "object",
"required": [
"id",
"type",
"timestamp",
"data"
],
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"data": {
"type": "object"
}
}
},
"response_body": {
"type": "string",
"nullable": true
},
"rendered_body": {
"type": "string"
},
"payload_format": {
"type": "string",
"enum": [
"standard",
"slack",
"microsoft_teams"
]
},
"rendered_content_type": {
"type": "string"
}
}
}
}
}
POST /webhooks/{webhook_id}/deliveries/{id}/redeliver¶
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
ApiKeyAuth |
header | string | N/A | No | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |
id |
path | string | No | ||
webhook_id |
path | string | No |
Response 200 OK
{
"webhook_delivery": {
"id": 0,
"webhook_endpoint_id": 0,
"event_id": "string",
"event_type": "string",
"status": "pending",
"attempts": 0,
"max_attempts": 0,
"next_attempt_at": "string",
"response_status": 0,
"error_message": "string",
"duration_ms": 0,
"delivered_at": "string",
"manual": true,
"created_at": "string",
"updated_at": "string",
"payload": {
"id": "string",
"type": "string",
"timestamp": "string",
"data": {}
},
"response_body": "string",
"rendered_body": "string",
"payload_format": "standard",
"rendered_content_type": "string"
}
}
Schema of the response body
{
"description": "Response for redeliver action",
"type": "object",
"required": [
"webhook_delivery"
],
"properties": {
"webhook_delivery": {
"type": "object",
"required": [
"id",
"webhook_endpoint_id",
"event_id",
"event_type",
"status",
"attempts",
"max_attempts",
"next_attempt_at",
"response_status",
"error_message",
"duration_ms",
"delivered_at",
"manual",
"created_at",
"updated_at",
"payload",
"response_body",
"payload_format",
"rendered_body",
"rendered_content_type"
],
"properties": {
"id": {
"type": "integer"
},
"webhook_endpoint_id": {
"type": "integer"
},
"event_id": {
"type": "string"
},
"event_type": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"pending",
"succeeded",
"failed",
"exhausted",
"cancelled"
]
},
"attempts": {
"type": "integer"
},
"max_attempts": {
"type": "integer"
},
"next_attempt_at": {
"type": "string",
"nullable": true
},
"response_status": {
"type": "integer",
"nullable": true
},
"error_message": {
"type": "string",
"nullable": true
},
"duration_ms": {
"type": "integer",
"nullable": true
},
"delivered_at": {
"type": "string",
"nullable": true
},
"manual": {
"type": "boolean"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"payload": {
"type": "object",
"required": [
"id",
"type",
"timestamp",
"data"
],
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"data": {
"type": "object"
}
}
},
"response_body": {
"type": "string",
"nullable": true
},
"rendered_body": {
"type": "string"
},
"payload_format": {
"type": "string",
"enum": [
"standard",
"slack",
"microsoft_teams"
]
},
"rendered_content_type": {
"type": "string"
}
}
}
}
}
Schemas¶
WebhookDeliveryIndexResponse¶
| Name | Type |
|---|---|
pagination |
Properties: page, per_page, total_count |
webhook_deliveries |
Array<Properties: id, webhook_endpoint_id, event_id, event_type, status, attempts, max_attempts, next_attempt_at, response_status, error_message, duration_ms, delivered_at, manual, created_at, updated_at> |
WebhookDeliveryRedeliverResponse¶
| Name | Type |
|---|---|
webhook_delivery |
Properties: id, webhook_endpoint_id, event_id, event_type, status, attempts, max_attempts, next_attempt_at, response_status, error_message, duration_ms, delivered_at, manual, created_at, updated_at, payload, response_body, rendered_body, payload_format, rendered_content_type |
WebhookDeliveryShowResponse¶
| Name | Type |
|---|---|
webhook_delivery |
Properties: id, webhook_endpoint_id, event_id, event_type, status, attempts, max_attempts, next_attempt_at, response_status, error_message, duration_ms, delivered_at, manual, created_at, updated_at, payload, response_body, rendered_body, payload_format, rendered_content_type |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| ApiKeyAuth | apiKey | API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys. |