Menu

Reference

Webhooks

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).

MethodPathOperation
POST/v1/webhook-deliveries/{delivery_id}/redeliverwebhooks.deliveries.redeliver
GET/v1/webhook-endpointswebhooks.endpoints.list
POST/v1/webhook-endpointswebhooks.endpoints.create
GET/v1/webhook-endpoints/{endpoint_id}webhooks.endpoints.get
PATCH/v1/webhook-endpoints/{endpoint_id}webhooks.endpoints.update
DELETE/v1/webhook-endpoints/{endpoint_id}webhooks.endpoints.delete
GET/v1/webhook-endpoints/{endpoint_id}/deliverieswebhooks.deliveries.list
POST/v1/webhook-endpoints/{endpoint_id}/rotate-secretwebhooks.endpoints.rotate_secret
POST/v1/webhook-endpoints/{endpoint_id}/testwebhooks.endpoints.test
GET/v1/webhook-eventswebhooks.events.list

webhooks.deliveries.redeliver

POST/v1/webhook-deliveries/{delivery_id}/redeliver

Send a finished delivery again: the same delivery id, event id and payload.

Operation idwebhooks.deliveries.redeliver
Scopeswebhooks:manage
Rate class`write`
Idempotency`Idempotency-Key` accepted
KeysDeveloper keys
RepsA key restricted to reps sees only data of its own reps

Path parameters

NameTypeRequiredDescription
delivery_idstringyesThe delivery id (uuid).. at most 64 characters

Response 202

FieldTypeRequiredDescription
delivery_idstringyes
status"pending" | "running" | "delivered" | "failed" | "cancelled"yes

Errors

StatusCodeWhen
404`WEBHOOK_DELIVERY_NOT_FOUND_404`No delivery with this id exists for an endpoint this key can see.
409`WEBHOOK_DELIVERY_IN_FLIGHT_409`The delivery is still pending or being sent; only a finished one can be redelivered.
409`WEBHOOK_ENDPOINT_INACTIVE_409`The endpoint is disabled; enable it first.

Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.

Example

bash
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
{
  "type": "object",
  "properties": {
    "delivery_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "running",
        "delivered",
        "failed",
        "cancelled"
      ]
    }
  },
  "required": [
    "delivery_id",
    "status"
  ],
  "additionalProperties": false
}

webhooks.endpoints.list

GET/v1/webhook-endpoints

The workspace's webhook endpoints (at most 15).

Operation idwebhooks.endpoints.list
Scopeswebhooks:manage
Rate class`read`
IdempotencyNot applicable
KeysDeveloper keys
RepsA key restricted to reps sees only data of its own reps

Response 200

FieldTypeRequiredDescription
dataobject[]yes
limitintegeryes-9007199254740991 to 9007199254740991

Errors

Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.

Example

bash
curl "https://api.dmhero.ai/v1/webhook-endpoints" \
  -H "Authorization: Bearer $DMHERO_API_KEY"
JSON Schema
Response 200
{
  "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
}

webhooks.endpoints.create

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 idwebhooks.endpoints.create
Scopeswebhooks:manage
Rate class`write`
Idempotency`Idempotency-Key` accepted
KeysDeveloper keys
RepsA key restricted to reps sees only data of its own reps

Request body

FieldTypeRequiredDescription
event_typesstring[]yesTypes from GET /v1/webhook-events.. 1 to 40 items
namestringyesat most 100 characters
urlstringyeshttps URL of your receiver. Never shown again: responses carry its host only.. at most 2048 characters
auth_headernull | objectnoA header the dispatcher sends with every delivery; null removes it.
campaign_idsstring[] | nullnoOnly events about these campaigns (uuids); null or empty for every one.
ig_account_idsstring[] | nullnoOnly 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_bulkbooleannoAlso receive events of mass operations (imports, bulk actions).

Response 201

FieldTypeRequiredDescription
endpointobjectyes
signing_secretstring | nullyes

Errors

StatusCodeWhen
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.

Example

bash
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
{
  "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
{
  "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
}

webhooks.endpoints.get

GET/v1/webhook-endpoints/{endpoint_id}

One webhook endpoint.

Operation idwebhooks.endpoints.get
Scopeswebhooks:manage
Rate class`read`
IdempotencyNot applicable
KeysDeveloper keys
RepsA key restricted to reps sees only data of its own reps

Path parameters

NameTypeRequiredDescription
endpoint_idstringyesThe endpoint id (uuid).. at most 64 characters

Response 200

FieldTypeRequiredDescription
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_hoststringyesThe host of the endpoint's URL; the URL itself is never returned.

Errors

StatusCodeWhen
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.

Example

bash
curl "https://api.dmhero.ai/v1/webhook-endpoints/string" \
  -H "Authorization: Bearer $DMHERO_API_KEY"
JSON Schema
Response 200
{
  "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
}

webhooks.endpoints.update

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 idwebhooks.endpoints.update
Scopeswebhooks:manage
Rate class`write`
IdempotencyNot applicable
KeysDeveloper keys
RepsA key restricted to reps sees only data of its own reps

Path parameters

NameTypeRequiredDescription
endpoint_idstringyesThe endpoint id (uuid).. at most 64 characters

Request body

FieldTypeRequiredDescription
auth_headernull | objectnoA header the dispatcher sends with every delivery; null removes it.
campaign_idsstring[] | nullnoOnly events about these campaigns (uuids); null or empty for every one.
event_typesstring[]noTypes from GET /v1/webhook-events.. 1 to 40 items
ig_account_idsstring[] | nullnoOnly 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_bulkbooleannoAlso receive events of mass operations (imports, bulk actions).
is_activebooleanno
namestringnoat most 100 characters
urlstringnohttps URL of your receiver. Never shown again: responses carry its host only.. at most 2048 characters

Response 200

FieldTypeRequiredDescription
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_hoststringyesThe host of the endpoint's URL; the URL itself is never returned.

Errors

StatusCodeWhen
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.

Example

bash
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
{
  "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
{
  "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
}

webhooks.endpoints.delete

DELETE/v1/webhook-endpoints/{endpoint_id}

Delete a webhook endpoint and its delivery log.

Operation idwebhooks.endpoints.delete
Scopeswebhooks:manage
Rate class`write`
IdempotencyNot applicable
KeysDeveloper keys
DestructiveYes: it removes or stops something that cannot be restored by repeating the call
RepsA key restricted to reps sees only data of its own reps

Path parameters

NameTypeRequiredDescription
endpoint_idstringyesThe endpoint id (uuid).. at most 64 characters

Response 204

No body.

Errors

StatusCodeWhen
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.

Example

bash
curl -X DELETE "https://api.dmhero.ai/v1/webhook-endpoints/string" \
  -H "Authorization: Bearer $DMHERO_API_KEY"

webhooks.deliveries.list

GET/v1/webhook-endpoints/{endpoint_id}/deliveries

One endpoint's deliveries, newest first. No payloads.

Operation idwebhooks.deliveries.list
Scopeswebhooks:manage
Rate class`read`
IdempotencyNot applicable
KeysDeveloper keys
RepsA key restricted to reps sees only data of its own reps

Path parameters

NameTypeRequiredDescription
endpoint_idstringyesThe endpoint id (uuid).. at most 64 characters

Query parameters

NameTypeRequiredDescription
limitintegerno1 to 200, default 50
cursorstringno1 to 2048 characters
status"pending" | "running" | "delivered" | "failed" | "cancelled"no

Response 200

FieldTypeRequiredDescription
dataobject[]yes
has_morebooleanyes
next_cursorstring | nullyes

Errors

StatusCodeWhen
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.

Example

bash
curl "https://api.dmhero.ai/v1/webhook-endpoints/string/deliveries" \
  -H "Authorization: Bearer $DMHERO_API_KEY"
JSON Schema
Response 200
{
  "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
}

webhooks.endpoints.rotate_secret

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 idwebhooks.endpoints.rotate_secret
Scopeswebhooks:manage
Rate class`write`
Idempotency`Idempotency-Key` accepted
KeysDeveloper keys
RepsA key restricted to reps sees only data of its own reps

Path parameters

NameTypeRequiredDescription
endpoint_idstringyesThe endpoint id (uuid).. at most 64 characters

Response 200

FieldTypeRequiredDescription
endpoint_idstringyes
secret_rotated_atdate-timeyes
signing_secretstring | nullyes

Errors

StatusCodeWhen
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).
409`WEBHOOK_SECRET_IN_GRACE_409`The previous secret still signs for 24 hours after a rotation; rotatable_at says when the next one is possible.

Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.

Example

bash
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
{
  "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
}

webhooks.endpoints.test

POST/v1/webhook-endpoints/{endpoint_id}/test

Queue one test.ping to this endpoint, whatever it subscribes to.

Operation idwebhooks.endpoints.test
Scopeswebhooks:manage
Rate class`write`
Idempotency`Idempotency-Key` accepted
KeysDeveloper keys
RepsA key restricted to reps sees only data of its own reps

Path parameters

NameTypeRequiredDescription
endpoint_idstringyesThe endpoint id (uuid).. at most 64 characters

Response 202

FieldTypeRequiredDescription
endpoint_idstringyes
enqueuedintegeryes-9007199254740991 to 9007199254740991

Errors

StatusCodeWhen
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).
409`WEBHOOK_ENDPOINT_INACTIVE_409`The endpoint is disabled; enable it first.
409`WEBHOOK_TEST_PENDING_409`A test event for this endpoint is still queued or being sent.
503`WEBHOOK_TEST_NOT_ENQUEUED_503`The test event could not be queued (outbound webhooks are switched off). Retry later.

Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.

Example

bash
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
{
  "type": "object",
  "properties": {
    "endpoint_id": {
      "type": "string"
    },
    "enqueued": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "endpoint_id",
    "enqueued"
  ],
  "additionalProperties": false
}

webhooks.events.list

GET/v1/webhook-events

Every event type an endpoint can subscribe to.

Operation idwebhooks.events.list
Scopeswebhooks:manage
Rate class`read`
IdempotencyNot applicable
KeysDeveloper keys

Response 200

FieldTypeRequiredDescription
dataobject[]yes
schema_versionstringyes

Errors

Every operation can also answer the shared errors: authentication, scopes, rate limits and validation.

Example

bash
curl "https://api.dmhero.ai/v1/webhook-events" \
  -H "Authorization: Bearer $DMHERO_API_KEY"
JSON Schema
Response 200
{
  "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
}
Webhooks | DM Hero Developers