Webhooks: 10 operations (webhooks.deliveries.redeliver, webhooks.endpoints.list, webhooks.endpoints.create, webhooks.endpoints.get, webhooks.endpoints.update, webhooks.endpoints.delete, webhooks.deliveries.list, webhooks.endpoints.rotate_secret, webhooks.endpoints.test, webhooks.events.list).
POST /v1/webhook-deliveries/{delivery_id}/redeliver
Send a finished delivery again: the same delivery id, event id and payload.
Operation id webhooks.deliveries.redeliverScopes webhooks:manageRate class `write` Idempotency `Idempotency-Key` accepted Keys Developer keys Reps A key restricted to reps sees only data of its own reps
Name Type Required Description delivery_idstringyes The delivery id (uuid).. at most 64 characters
Field Type Required Description delivery_idstringyes status"pending" | "running" | "delivered" | "failed" | "cancelled"yes
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/webhook-deliveries/string/redeliver" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"JSON Schema Response 202 Copy
{
"type": "object",
"properties": {
"delivery_id": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"delivered",
"failed",
"cancelled"
]
}
},
"required": [
"delivery_id",
"status"
],
"additionalProperties": false
}GET /v1/webhook-endpoints
The workspace's webhook endpoints (at most 15).
Operation id webhooks.endpoints.listScopes webhooks:manageRate class `read` Idempotency Not applicable Keys Developer keys Reps A key restricted to reps sees only data of its own reps
Field Type Required Description dataobject[]yes limitintegeryes -9007199254740991 to 9007199254740991
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl "https://api.dmhero.ai/v1/webhook-endpoints" \
-H "Authorization: Bearer $DMHERO_API_KEY"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"url_host": {
"type": "string",
"description": "The host of the endpoint's URL; the URL itself is never returned."
},
"preset": {
"type": "string",
"enum": [
"clay",
"generic",
"slack"
]
},
"schema_version": {
"type": "string"
},
"event_types": {
"type": "array",
"items": {
"type": "string"
}
},
"campaign_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"ig_account_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"include_bulk": {
"type": "boolean"
},
"auth_header_name": {
"type": [
"string",
"null"
]
},
"is_active": {
"type": "boolean"
},
"disabled_reason": {
"type": [
"string",
"null"
]
},
"paused_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"consecutive_failures": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"last_status_code": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"secret_rotated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"queued_deliveries": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"id",
"name",
"url_host",
"preset",
"schema_version",
"event_types",
"campaign_ids",
"ig_account_ids",
"include_bulk",
"auth_header_name",
"is_active",
"disabled_reason",
"paused_until",
"consecutive_failures",
"last_success_at",
"last_failure_at",
"last_status_code",
"secret_rotated_at",
"queued_deliveries",
"created_at",
"updated_at"
],
"additionalProperties": false
}
},
"limit": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"data",
"limit"
],
"additionalProperties": false
}POST /v1/webhook-endpoints
Create a webhook endpoint. The signing secret is returned once, in this response.
Always a generic endpoint. A replay of the same Idempotency-Key answers the endpoint with signing_secret null: the secret is never shown twice.
Operation id webhooks.endpoints.createScopes webhooks:manageRate class `write` Idempotency `Idempotency-Key` accepted Keys Developer keys Reps A key restricted to reps sees only data of its own reps
Field Type Required Description event_typesstring[]yes Types from GET /v1/webhook-events.. 1 to 40 items namestringyes at most 100 characters urlstringyes https URL of your receiver. Never shown again: responses carry its host only.. at most 2048 characters auth_headernull | objectno A header the dispatcher sends with every delivery; null removes it. campaign_idsstring[] | nullno Only events about these campaigns (uuids); null or empty for every one. ig_account_idsstring[] | nullno Only events about these reps (uuids); null or empty for every one. An event about no rep arrives only when it reports a job or a discovery run started by the API key that created this endpoint, or by a key rotated from it. include_bulkbooleanno Also receive events of mass operations (imports, bulk actions).
Field Type Required Description endpointobjectyes signing_secretstring | nullyes
Status Code When 400 `WEBHOOK_REP_FILTER_REQUIRED_400` A rep-restricted key must filter the endpoint to a non-empty subset of its reps ( ig_account_ids). 400 `WEBHOOK_URL_INVALID_400` The url is not an https URL on the public internet ( reason says why), or it points at DM Hero itself ( own_host). 403 `WEBHOOK_TIER_NOT_INCLUDED_403` An event type the request adds, or a setting it switches on, is not included in the organization's API access; the message says what it needs. Removing event types, or changing the url or the auth header of an endpoint that still lists one, is always allowed. Contact the DM Hero team to extend the access. 409 `WEBHOOK_ENDPOINT_LIMIT_409` The workspace already has 15 endpoints.
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/webhook-endpoints" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "CRM sync",
"url": "https://example.com/webhooks/dmhero",
"event_types": [
"lead.replied",
"lead.booked"
]
}'JSON Schema Request body Copy
{
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 100
},
"url": {
"type": "string",
"maxLength": 2048,
"description": "https URL of your receiver. Never shown again: responses carry its host only."
},
"event_types": {
"minItems": 1,
"maxItems": 40,
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"description": "Types from GET /v1/webhook-events."
},
"campaign_ids": {
"description": "Only events about these campaigns (uuids); null or empty for every one.",
"anyOf": [
{
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 64
}
},
{
"type": "null"
}
]
},
"ig_account_ids": {
"description": "Only events about these reps (uuids); null or empty for every one. An event about no rep arrives only when it reports a job or a discovery run started by the API key that created this endpoint, or by a key rotated from it.",
"anyOf": [
{
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 64
}
},
{
"type": "null"
}
]
},
"include_bulk": {
"description": "Also receive events of mass operations (imports, bulk actions).",
"type": "boolean"
},
"auth_header": {
"description": "A header the dispatcher sends with every delivery; null removes it.",
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"properties": {
"name": {
"description": "Header name, e.g. x-api-token.",
"type": "string",
"maxLength": 64
},
"value": {
"description": "Header value, stored encrypted and never returned.",
"type": "string",
"maxLength": 1024
}
}
}
]
}
},
"required": [
"name",
"url",
"event_types"
]
}Response 201 Copy
{
"type": "object",
"properties": {
"endpoint": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"url_host": {
"type": "string",
"description": "The host of the endpoint's URL; the URL itself is never returned."
},
"preset": {
"type": "string",
"enum": [
"clay",
"generic",
"slack"
]
},
"schema_version": {
"type": "string"
},
"event_types": {
"type": "array",
"items": {
"type": "string"
}
},
"campaign_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"ig_account_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"include_bulk": {
"type": "boolean"
},
"auth_header_name": {
"type": [
"string",
"null"
]
},
"is_active": {
"type": "boolean"
},
"disabled_reason": {
"type": [
"string",
"null"
]
},
"paused_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"consecutive_failures": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"last_status_code": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"secret_rotated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"queued_deliveries": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"id",
"name",
"url_host",
"preset",
"schema_version",
"event_types",
"campaign_ids",
"ig_account_ids",
"include_bulk",
"auth_header_name",
"is_active",
"disabled_reason",
"paused_until",
"consecutive_failures",
"last_success_at",
"last_failure_at",
"last_status_code",
"secret_rotated_at",
"queued_deliveries",
"created_at",
"updated_at"
],
"additionalProperties": false
},
"signing_secret": {
"type": [
"string",
"null"
]
}
},
"required": [
"endpoint",
"signing_secret"
],
"additionalProperties": false
}GET /v1/webhook-endpoints/{endpoint_id}
One webhook endpoint.
Operation id webhooks.endpoints.getScopes webhooks:manageRate class `read` Idempotency Not applicable Keys Developer keys Reps A key restricted to reps sees only data of its own reps
Name Type Required Description endpoint_idstringyes The endpoint id (uuid).. at most 64 characters
Field Type Required Description auth_header_namestring | nullyes campaign_idsstring[] | nullyes consecutive_failuresintegeryes -9007199254740991 to 9007199254740991 created_atdate-timeyes disabled_reasonstring | nullyes event_typesstring[]yes idstringyes ig_account_idsstring[] | nullyes include_bulkbooleanyes is_activebooleanyes last_failure_atdate-time | nullyes last_status_codeinteger | nullyes last_success_atdate-time | nullyes namestringyes paused_untildate-time | nullyes preset"clay" | "generic" | "slack"yes queued_deliveriesintegeryes -9007199254740991 to 9007199254740991 schema_versionstringyes secret_rotated_atdate-time | nullyes updated_atdate-timeyes url_hoststringyes The host of the endpoint's URL; the URL itself is never returned.
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl "https://api.dmhero.ai/v1/webhook-endpoints/string" \
-H "Authorization: Bearer $DMHERO_API_KEY"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"url_host": {
"type": "string",
"description": "The host of the endpoint's URL; the URL itself is never returned."
},
"preset": {
"type": "string",
"enum": [
"clay",
"generic",
"slack"
]
},
"schema_version": {
"type": "string"
},
"event_types": {
"type": "array",
"items": {
"type": "string"
}
},
"campaign_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"ig_account_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"include_bulk": {
"type": "boolean"
},
"auth_header_name": {
"type": [
"string",
"null"
]
},
"is_active": {
"type": "boolean"
},
"disabled_reason": {
"type": [
"string",
"null"
]
},
"paused_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"consecutive_failures": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"last_status_code": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"secret_rotated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"queued_deliveries": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"id",
"name",
"url_host",
"preset",
"schema_version",
"event_types",
"campaign_ids",
"ig_account_ids",
"include_bulk",
"auth_header_name",
"is_active",
"disabled_reason",
"paused_until",
"consecutive_failures",
"last_success_at",
"last_failure_at",
"last_status_code",
"secret_rotated_at",
"queued_deliveries",
"created_at",
"updated_at"
],
"additionalProperties": false
}PATCH /v1/webhook-endpoints/{endpoint_id}
Change a webhook endpoint. Only the fields sent change.
is_active: true re-enables a disabled endpoint and clears its failure streak.
Operation id webhooks.endpoints.updateScopes webhooks:manageRate class `write` Idempotency Not applicable Keys Developer keys Reps A key restricted to reps sees only data of its own reps
Name Type Required Description endpoint_idstringyes The endpoint id (uuid).. at most 64 characters
Field Type Required Description auth_headernull | objectno A header the dispatcher sends with every delivery; null removes it. campaign_idsstring[] | nullno Only events about these campaigns (uuids); null or empty for every one. event_typesstring[]no Types from GET /v1/webhook-events.. 1 to 40 items ig_account_idsstring[] | nullno Only events about these reps (uuids); null or empty for every one. An event about no rep arrives only when it reports a job or a discovery run started by the API key that created this endpoint, or by a key rotated from it. include_bulkbooleanno Also receive events of mass operations (imports, bulk actions). is_activebooleanno namestringno at most 100 characters urlstringno https URL of your receiver. Never shown again: responses carry its host only.. at most 2048 characters
Field Type Required Description auth_header_namestring | nullyes campaign_idsstring[] | nullyes consecutive_failuresintegeryes -9007199254740991 to 9007199254740991 created_atdate-timeyes disabled_reasonstring | nullyes event_typesstring[]yes idstringyes ig_account_idsstring[] | nullyes include_bulkbooleanyes is_activebooleanyes last_failure_atdate-time | nullyes last_status_codeinteger | nullyes last_success_atdate-time | nullyes namestringyes paused_untildate-time | nullyes preset"clay" | "generic" | "slack"yes queued_deliveriesintegeryes -9007199254740991 to 9007199254740991 schema_versionstringyes secret_rotated_atdate-time | nullyes updated_atdate-timeyes url_hoststringyes The host of the endpoint's URL; the URL itself is never returned.
Status Code When 400 `WEBHOOK_REP_FILTER_REQUIRED_400` A rep-restricted key must filter the endpoint to a non-empty subset of its reps ( ig_account_ids). 400 `WEBHOOK_URL_INVALID_400` The url is not an https URL on the public internet ( reason says why), or it points at DM Hero itself ( own_host). 403 `WEBHOOK_TIER_NOT_INCLUDED_403` An event type the request adds, or a setting it switches on, is not included in the organization's API access; the message says what it needs. Removing event types, or changing the url or the auth header of an endpoint that still lists one, is always allowed. Contact the DM Hero team to extend the access. 404 `WEBHOOK_ENDPOINT_NOT_FOUND_404` No webhook endpoint with this id exists in this workspace (or, for a rep-restricted key, within its reps).
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X PATCH "https://api.dmhero.ai/v1/webhook-endpoints/string" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"event_types": [
"lead.replied",
"lead.booked",
"lead.opted_out"
]
}'JSON Schema Request body Copy
{
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 100
},
"url": {
"type": "string",
"maxLength": 2048,
"description": "https URL of your receiver. Never shown again: responses carry its host only."
},
"event_types": {
"minItems": 1,
"maxItems": 40,
"type": "array",
"items": {
"type": "string",
"maxLength": 100
},
"description": "Types from GET /v1/webhook-events."
},
"campaign_ids": {
"description": "Only events about these campaigns (uuids); null or empty for every one.",
"anyOf": [
{
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 64
}
},
{
"type": "null"
}
]
},
"ig_account_ids": {
"description": "Only events about these reps (uuids); null or empty for every one. An event about no rep arrives only when it reports a job or a discovery run started by the API key that created this endpoint, or by a key rotated from it.",
"anyOf": [
{
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"maxLength": 64
}
},
{
"type": "null"
}
]
},
"include_bulk": {
"description": "Also receive events of mass operations (imports, bulk actions).",
"type": "boolean"
},
"auth_header": {
"description": "A header the dispatcher sends with every delivery; null removes it.",
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"properties": {
"name": {
"description": "Header name, e.g. x-api-token.",
"type": "string",
"maxLength": 64
},
"value": {
"description": "Header value, stored encrypted and never returned.",
"type": "string",
"maxLength": 1024
}
}
}
]
},
"is_active": {
"type": "boolean"
}
}
}Response 200 Copy
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"url_host": {
"type": "string",
"description": "The host of the endpoint's URL; the URL itself is never returned."
},
"preset": {
"type": "string",
"enum": [
"clay",
"generic",
"slack"
]
},
"schema_version": {
"type": "string"
},
"event_types": {
"type": "array",
"items": {
"type": "string"
}
},
"campaign_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"ig_account_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"include_bulk": {
"type": "boolean"
},
"auth_header_name": {
"type": [
"string",
"null"
]
},
"is_active": {
"type": "boolean"
},
"disabled_reason": {
"type": [
"string",
"null"
]
},
"paused_until": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"consecutive_failures": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"last_success_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"last_failure_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"last_status_code": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"secret_rotated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"queued_deliveries": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"id",
"name",
"url_host",
"preset",
"schema_version",
"event_types",
"campaign_ids",
"ig_account_ids",
"include_bulk",
"auth_header_name",
"is_active",
"disabled_reason",
"paused_until",
"consecutive_failures",
"last_success_at",
"last_failure_at",
"last_status_code",
"secret_rotated_at",
"queued_deliveries",
"created_at",
"updated_at"
],
"additionalProperties": false
}DELETE /v1/webhook-endpoints/{endpoint_id}
Delete a webhook endpoint and its delivery log.
Operation id webhooks.endpoints.deleteScopes webhooks:manageRate class `write` Idempotency Not applicable Keys Developer keys Destructive Yes: it removes or stops something that cannot be restored by repeating the call Reps A key restricted to reps sees only data of its own reps
Name Type Required Description endpoint_idstringyes The endpoint id (uuid).. at most 64 characters
No body.
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X DELETE "https://api.dmhero.ai/v1/webhook-endpoints/string" \
-H "Authorization: Bearer $DMHERO_API_KEY"GET /v1/webhook-endpoints/{endpoint_id}/deliveries
One endpoint's deliveries, newest first. No payloads.
Operation id webhooks.deliveries.listScopes webhooks:manageRate class `read` Idempotency Not applicable Keys Developer keys Reps A key restricted to reps sees only data of its own reps
Name Type Required Description endpoint_idstringyes The endpoint id (uuid).. at most 64 characters
Name Type Required Description limitintegerno 1 to 200, default 50 cursorstringno 1 to 2048 characters status"pending" | "running" | "delivered" | "failed" | "cancelled"no
Field Type Required Description dataobject[]yes has_morebooleanyes next_cursorstring | nullyes
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl "https://api.dmhero.ai/v1/webhook-endpoints/string/deliveries" \
-H "Authorization: Bearer $DMHERO_API_KEY"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"event_id": {
"type": "string"
},
"endpoint_id": {
"type": "string"
},
"endpoint_name": {
"type": "string"
},
"event_type": {
"type": "string"
},
"source": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"pending",
"running",
"delivered",
"failed",
"cancelled"
]
},
"attempts": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"run_after": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"last_status_code": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"last_error": {
"type": [
"string",
"null"
]
},
"delivered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"updated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"id",
"event_id",
"endpoint_id",
"endpoint_name",
"event_type",
"source",
"status",
"attempts",
"run_after",
"last_status_code",
"last_error",
"delivered_at",
"created_at",
"updated_at"
],
"additionalProperties": false
}
},
"has_more": {
"type": "boolean"
},
"next_cursor": {
"type": [
"string",
"null"
]
}
},
"required": [
"data",
"has_more",
"next_cursor"
],
"additionalProperties": false
}POST /v1/webhook-endpoints/{endpoint_id}/rotate-secret
A new signing secret, returned once. The previous one keeps co-signing for 24 hours.
A replay of the same Idempotency-Key answers signing_secret null: the secret is never shown twice.
Operation id webhooks.endpoints.rotate_secretScopes webhooks:manageRate class `write` Idempotency `Idempotency-Key` accepted Keys Developer keys Reps A key restricted to reps sees only data of its own reps
Name Type Required Description endpoint_idstringyes The endpoint id (uuid).. at most 64 characters
Field Type Required Description endpoint_idstringyes secret_rotated_atdate-timeyes signing_secretstring | nullyes
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/webhook-endpoints/string/rotate-secret" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"endpoint_id": {
"type": "string"
},
"signing_secret": {
"type": [
"string",
"null"
]
},
"secret_rotated_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"endpoint_id",
"signing_secret",
"secret_rotated_at"
],
"additionalProperties": false
}POST /v1/webhook-endpoints/{endpoint_id}/test
Queue one test.ping to this endpoint, whatever it subscribes to.
Operation id webhooks.endpoints.testScopes webhooks:manageRate class `write` Idempotency `Idempotency-Key` accepted Keys Developer keys Reps A key restricted to reps sees only data of its own reps
Name Type Required Description endpoint_idstringyes The endpoint id (uuid).. at most 64 characters
Field Type Required Description endpoint_idstringyes enqueuedintegeryes -9007199254740991 to 9007199254740991
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/webhook-endpoints/string/test" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"JSON Schema Response 202 Copy
{
"type": "object",
"properties": {
"endpoint_id": {
"type": "string"
},
"enqueued": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"endpoint_id",
"enqueued"
],
"additionalProperties": false
}GET /v1/webhook-events
Every event type an endpoint can subscribe to.
Operation id webhooks.events.listScopes webhooks:manageRate class `read` Idempotency Not applicable Keys Developer keys
Field Type Required Description dataobject[]yes schema_versionstringyes
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl "https://api.dmhero.ai/v1/webhook-events" \
-H "Authorization: Bearer $DMHERO_API_KEY"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"schema_version": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"carries_lead": {
"type": "boolean"
},
"high_volume": {
"type": "boolean",
"description": "Can arrive by the thousand; no preset subscribes to it."
}
},
"required": [
"type",
"description",
"carries_lead",
"high_volume"
],
"additionalProperties": false
}
}
},
"required": [
"schema_version",
"data"
],
"additionalProperties": false
}