Campaigns: 13 operations (campaign_leads.upsert_enroll, campaigns.list, campaigns.create, campaigns.get, campaigns.update, campaigns.delete, campaigns.archive, campaigns.clone, campaigns.pause, campaigns.resume, campaigns.start, campaigns.stats, campaigns.steps.replace).
POST /v1/campaign-leads
Upsert one lead, then enroll it into a campaign (the Clay add-to-campaign column).
A refusal to enroll (already in a campaign, opted out) is a 200 with skipped_reason; the lead keeps the fields the upsert wrote.
Operation id campaign_leads.upsert_enrollScopes leads:write, enrollments:writeRate class `write` , plus leads_created_dayIdempotency `Idempotency-Key` accepted Keys Developer keys and Clay compatible keys
Field Type Required Description campaign_idanyno Required: a campaign of the key's workspace. custom_fieldsanyno { key: value } of the workspace's custom fields. emailanyno external_idanyno fb_handleanyno first_nameanyno folderanyno Folder NAME, created when missing. followersanyno A number, or a numeric string. ig_handleanyno Required for every lead: the matching key. last_nameanyno mergeanyno fill_empty (default) or overwrite. nameanyno nicheanyno notesanyno phoneanyno profile_urlanyno rep_ig_usernameanyno One of the key's reps; omitted, the least loaded one. skip_if_in_any_campaignanyno Boolean, default true. tagsanyno An array of tags or one comma-separated string, at most 20.
JSON of type object.
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/campaign-leads" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"ig_handle": "jane.doe",
"first_name": "Jane",
"external_id": "crm-1042",
"campaign_id": "3f6c2a9e-8b1d-4c7a-9e2f-5d4b3a2c1e0f"
}'JSON Schema Request body Copy
{
"type": "object",
"properties": {
"ig_handle": {
"description": "Required for every lead: the matching key."
},
"name": {},
"first_name": {},
"last_name": {},
"fb_handle": {},
"profile_url": {},
"niche": {},
"followers": {
"description": "A number, or a numeric string."
},
"notes": {},
"tags": {
"description": "An array of tags or one comma-separated string, at most 20."
},
"folder": {
"description": "Folder NAME, created when missing."
},
"custom_fields": {
"description": "{ key: value } of the workspace's custom fields."
},
"external_id": {},
"email": {},
"phone": {},
"merge": {
"description": "fill_empty (default) or overwrite."
},
"campaign_id": {
"description": "Required: a campaign of the key's workspace."
},
"rep_ig_username": {
"description": "One of the key's reps; omitted, the least loaded one."
},
"skip_if_in_any_campaign": {
"description": "Boolean, default true."
}
}
}Response 200 Copy
{
"anyOf": [
{
"type": "object",
"properties": {
"lead_id": {
"type": "string"
},
"result": {
"type": "string"
},
"updated_fields": {
"type": "array",
"items": {
"type": "string"
}
},
"enrolled": {
"type": "boolean"
},
"skipped_reason": {
"type": [
"string",
"null"
]
},
"campaign_id": {
"type": "string"
},
"rep_ig_username": {
"type": [
"string",
"null"
]
},
"queue_state": {
"type": [
"string",
"null"
]
},
"lead_status": {
"type": "string"
}
},
"required": [
"lead_id",
"result",
"updated_fields",
"enrolled",
"skipped_reason",
"campaign_id",
"rep_ig_username",
"queue_state",
"lead_status"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"replayed": {
"type": "boolean",
"const": true
},
"status": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"ids": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"replayed",
"status",
"ids"
],
"additionalProperties": false
}
]
}GET /v1/campaigns
List the workspace's campaigns, newest first.
Offset paging ( limit, offset) is kept for existing integrations; cursor (from next_cursor) is the keyset alternative and cannot be combined with offset. limit and offset out of range are clamped.
Operation id campaigns.listScopes campaigns:readRate class `read` Idempotency Not applicable Keys Developer keys and Clay compatible keys
Name Type Required Description status"active" | "paused" | "completed" | "archived"no limitintegerno 1 to 200, default 100 offsetintegerno 0 to 1000000 cursorstringno 1 to 2048 characters
Field Type Required Description dataobject[]yes has_morebooleanyes limitintegeryes -9007199254740991 to 9007199254740991 next_cursorstring | nullyes offsetintegeryes -9007199254740991 to 9007199254740991 totalintegeryes -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/campaigns" \
-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"
},
"description": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"completed",
"archived"
]
},
"timezone": {
"type": "string"
},
"business_hours": {
"type": "string"
},
"send_weight": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"send_rank": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"enrolled_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones."
},
"active_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, the ones still in the sequence."
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"step_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"template_id": {
"type": [
"string",
"null"
]
},
"delay_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"platform": {
"type": "string"
},
"message_mode": {
"type": "string",
"enum": [
"template",
"ai"
],
"description": "Read only. `ai`: the step sends a first message written for each lead, and `template_id` is its fallback, sent only when no such message can be written. `template`: the step sends `template_id`. Set in the app; `campaigns.steps.replace` keeps each step's mode by `step_order`."
}
},
"required": [
"id",
"step_order",
"template_id",
"delay_days",
"platform",
"message_mode"
],
"additionalProperties": false
}
},
"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",
"description",
"status",
"timezone",
"business_hours",
"send_weight",
"send_rank",
"enrolled_count",
"active_count",
"created_at",
"updated_at"
],
"additionalProperties": false
}
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"limit": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"offset": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"has_more": {
"type": "boolean"
},
"next_cursor": {
"type": [
"string",
"null"
]
}
},
"required": [
"data",
"total",
"limit",
"offset",
"has_more",
"next_cursor"
],
"additionalProperties": false
}POST /v1/campaigns
Create a campaign, optionally with its steps. It starts paused.
Every step's template is checked before anything is written. Start the campaign with POST /v1/campaigns/{campaign_id}/start.
Operation id campaigns.createScopes campaigns:writeRate class `write` Idempotency `Idempotency-Key` accepted Keys Developer keys
Field Type Required Description namestringyes 1 to 80 characters business_hoursstringno Free text the AI Setter reads when it books.. at most 200 characters descriptionstring | nullno send_rankintegerno 0 to 1000 send_weightintegerno 1 to 100 stepsobject[]no The whole sequence, in order: the first item is step 1.. 1 to 10 items timezonestringno IANA timezone; defaults to the workspace's.. at most 64 characters
Field Type Required Description active_countintegeryes Of those, the ones still in the sequence.. -9007199254740991 to 9007199254740991 business_hoursstringyes created_atdate-timeyes descriptionstring | nullyes enrolled_countintegeryes Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones.. -9007199254740991 to 9007199254740991 idstringyes namestringyes send_rankintegeryes -9007199254740991 to 9007199254740991 send_weightintegeryes -9007199254740991 to 9007199254740991 status"active" | "paused" | "completed" | "archived"yes timezonestringyes updated_atdate-timeyes stepsobject[]no
Status Code When 404 `TEMPLATE_NOT_FOUND_404` A step names a template that is not in the key's workspace. Nothing was written.
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/campaigns" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'JSON Schema Request body Copy
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"description": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"timezone": {
"description": "IANA timezone; defaults to the workspace's.",
"type": "string",
"maxLength": 64
},
"business_hours": {
"description": "Free text the AI Setter reads when it books.",
"type": "string",
"maxLength": 200
},
"send_weight": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"send_rank": {
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"steps": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"template_id": {
"type": "string",
"maxLength": 64,
"description": "A template of this workspace (uuid)."
},
"delay_days": {
"type": "integer",
"minimum": 0,
"maximum": 90,
"description": "Days after the previous step (the first step: after enrollment)."
}
},
"required": [
"template_id",
"delay_days"
]
},
"description": "The whole sequence, in order: the first item is step 1."
}
},
"required": [
"name"
]
}Response 201 Copy
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"completed",
"archived"
]
},
"timezone": {
"type": "string"
},
"business_hours": {
"type": "string"
},
"send_weight": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"send_rank": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"enrolled_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones."
},
"active_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, the ones still in the sequence."
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"step_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"template_id": {
"type": [
"string",
"null"
]
},
"delay_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"platform": {
"type": "string"
},
"message_mode": {
"type": "string",
"enum": [
"template",
"ai"
],
"description": "Read only. `ai`: the step sends a first message written for each lead, and `template_id` is its fallback, sent only when no such message can be written. `template`: the step sends `template_id`. Set in the app; `campaigns.steps.replace` keeps each step's mode by `step_order`."
}
},
"required": [
"id",
"step_order",
"template_id",
"delay_days",
"platform",
"message_mode"
],
"additionalProperties": false
}
},
"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",
"description",
"status",
"timezone",
"business_hours",
"send_weight",
"send_rank",
"enrolled_count",
"active_count",
"created_at",
"updated_at"
],
"additionalProperties": false
}GET /v1/campaigns/{campaign_id}
Get one campaign with its steps.
Operation id campaigns.getScopes campaigns:readRate class `read` Idempotency Not applicable Keys Developer keys
Name Type Required Description campaign_idstringyes Campaign id (uuid). at most 64 characters
Field Type Required Description active_countintegeryes Of those, the ones still in the sequence.. -9007199254740991 to 9007199254740991 business_hoursstringyes created_atdate-timeyes descriptionstring | nullyes enrolled_countintegeryes Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones.. -9007199254740991 to 9007199254740991 idstringyes namestringyes send_rankintegeryes -9007199254740991 to 9007199254740991 send_weightintegeryes -9007199254740991 to 9007199254740991 status"active" | "paused" | "completed" | "archived"yes timezonestringyes updated_atdate-timeyes stepsobject[]no
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl "https://api.dmhero.ai/v1/campaigns/string" \
-H "Authorization: Bearer $DMHERO_API_KEY"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"completed",
"archived"
]
},
"timezone": {
"type": "string"
},
"business_hours": {
"type": "string"
},
"send_weight": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"send_rank": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"enrolled_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones."
},
"active_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, the ones still in the sequence."
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"step_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"template_id": {
"type": [
"string",
"null"
]
},
"delay_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"platform": {
"type": "string"
},
"message_mode": {
"type": "string",
"enum": [
"template",
"ai"
],
"description": "Read only. `ai`: the step sends a first message written for each lead, and `template_id` is its fallback, sent only when no such message can be written. `template`: the step sends `template_id`. Set in the app; `campaigns.steps.replace` keeps each step's mode by `step_order`."
}
},
"required": [
"id",
"step_order",
"template_id",
"delay_days",
"platform",
"message_mode"
],
"additionalProperties": false
}
},
"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",
"description",
"status",
"timezone",
"business_hours",
"send_weight",
"send_rank",
"enrolled_count",
"active_count",
"created_at",
"updated_at"
],
"additionalProperties": false
}PATCH /v1/campaigns/{campaign_id}
Update a campaign's settings.
status cannot be set here: use the start, pause, resume and archive endpoints.
Operation id campaigns.updateScopes campaigns:writeRate class `write` Idempotency Not applicable Keys Developer keys
Name Type Required Description campaign_idstringyes Campaign id (uuid). at most 64 characters
Field Type Required Description business_hoursstringno Free text the AI Setter reads when it books.. at most 200 characters descriptionstring | nullno namestringno 1 to 80 characters send_rankintegerno 0 to 1000 send_weightintegerno 1 to 100 statusstringno Refused: use the control endpoints.. at most 32 characters timezonestringno IANA timezone; defaults to the workspace's.. at most 64 characters
Field Type Required Description active_countintegeryes Of those, the ones still in the sequence.. -9007199254740991 to 9007199254740991 business_hoursstringyes created_atdate-timeyes descriptionstring | nullyes enrolled_countintegeryes Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones.. -9007199254740991 to 9007199254740991 idstringyes namestringyes send_rankintegeryes -9007199254740991 to 9007199254740991 send_weightintegeryes -9007199254740991 to 9007199254740991 status"active" | "paused" | "completed" | "archived"yes timezonestringyes updated_atdate-timeyes stepsobject[]no
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X PATCH "https://api.dmhero.ai/v1/campaigns/string" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Webinar follow-up",
"send_weight": 2
}'JSON Schema Request body Copy
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"description": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"timezone": {
"description": "IANA timezone; defaults to the workspace's.",
"type": "string",
"maxLength": 64
},
"business_hours": {
"description": "Free text the AI Setter reads when it books.",
"type": "string",
"maxLength": 200
},
"send_weight": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"send_rank": {
"type": "integer",
"minimum": 0,
"maximum": 1000
},
"status": {
"description": "Refused: use the control endpoints.",
"type": "string",
"maxLength": 32
}
}
}Response 200 Copy
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"completed",
"archived"
]
},
"timezone": {
"type": "string"
},
"business_hours": {
"type": "string"
},
"send_weight": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"send_rank": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"enrolled_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones."
},
"active_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, the ones still in the sequence."
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"step_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"template_id": {
"type": [
"string",
"null"
]
},
"delay_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"platform": {
"type": "string"
},
"message_mode": {
"type": "string",
"enum": [
"template",
"ai"
],
"description": "Read only. `ai`: the step sends a first message written for each lead, and `template_id` is its fallback, sent only when no such message can be written. `template`: the step sends `template_id`. Set in the app; `campaigns.steps.replace` keeps each step's mode by `step_order`."
}
},
"required": [
"id",
"step_order",
"template_id",
"delay_days",
"platform",
"message_mode"
],
"additionalProperties": false
}
},
"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",
"description",
"status",
"timezone",
"business_hours",
"send_weight",
"send_rank",
"enrolled_count",
"active_count",
"created_at",
"updated_at"
],
"additionalProperties": false
}DELETE /v1/campaigns/{campaign_id}
Delete a campaign with its steps and enrollments.
Operation id campaigns.deleteScopes campaigns:writeRate class `write` Idempotency Not applicable Keys Developer keys Destructive Yes: it removes or stops something that cannot be restored by repeating the call
Name Type Required Description campaign_idstringyes Campaign id (uuid). at most 64 characters
Name Type Required Description confirmbooleanno Must be true.
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/campaigns/string?confirm=true" \
-H "Authorization: Bearer $DMHERO_API_KEY"POST /v1/campaigns/{campaign_id}/archive
Archive a campaign: every enrollment stops sending.
Operation id campaigns.archiveScopes campaigns:controlRate class `write` Idempotency `Idempotency-Key` accepted Keys Developer keys Destructive Yes: it removes or stops something that cannot be restored by repeating the call
Name Type Required Description campaign_idstringyes Campaign id (uuid). at most 64 characters
Field Type Required Description confirmbooleanno Must be true.
Field Type Required Description active_countintegeryes Of those, the ones still in the sequence.. -9007199254740991 to 9007199254740991 business_hoursstringyes created_atdate-timeyes descriptionstring | nullyes enrolled_countintegeryes Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones.. -9007199254740991 to 9007199254740991 idstringyes namestringyes send_rankintegeryes -9007199254740991 to 9007199254740991 send_weightintegeryes -9007199254740991 to 9007199254740991 status"active" | "paused" | "completed" | "archived"yes timezonestringyes updated_atdate-timeyes stepsobject[]no
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/campaigns/string/archive" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"confirm": true
}'JSON Schema Request body Copy
{
"type": "object",
"properties": {
"confirm": {
"description": "Must be true.",
"type": "boolean"
}
}
}Response 200 Copy
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"completed",
"archived"
]
},
"timezone": {
"type": "string"
},
"business_hours": {
"type": "string"
},
"send_weight": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"send_rank": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"enrolled_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones."
},
"active_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, the ones still in the sequence."
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"step_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"template_id": {
"type": [
"string",
"null"
]
},
"delay_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"platform": {
"type": "string"
},
"message_mode": {
"type": "string",
"enum": [
"template",
"ai"
],
"description": "Read only. `ai`: the step sends a first message written for each lead, and `template_id` is its fallback, sent only when no such message can be written. `template`: the step sends `template_id`. Set in the app; `campaigns.steps.replace` keeps each step's mode by `step_order`."
}
},
"required": [
"id",
"step_order",
"template_id",
"delay_days",
"platform",
"message_mode"
],
"additionalProperties": false
}
},
"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",
"description",
"status",
"timezone",
"business_hours",
"send_weight",
"send_rank",
"enrolled_count",
"active_count",
"created_at",
"updated_at"
],
"additionalProperties": false
}POST /v1/campaigns/{campaign_id}/clone
Copy a campaign and its steps, without its enrollments. The copy starts paused.
Operation id campaigns.cloneScopes campaigns:writeRate class `write` Idempotency `Idempotency-Key` accepted Keys Developer keys
Name Type Required Description campaign_idstringyes Campaign id (uuid). at most 64 characters
Field Type Required Description namestringno 1 to 80 characters
Field Type Required Description active_countintegeryes Of those, the ones still in the sequence.. -9007199254740991 to 9007199254740991 business_hoursstringyes created_atdate-timeyes descriptionstring | nullyes enrolled_countintegeryes Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones.. -9007199254740991 to 9007199254740991 idstringyes namestringyes send_rankintegeryes -9007199254740991 to 9007199254740991 send_weightintegeryes -9007199254740991 to 9007199254740991 status"active" | "paused" | "completed" | "archived"yes timezonestringyes updated_atdate-timeyes stepsobject[]no
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/campaigns/string/clone" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'JSON Schema Request body Copy
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
}
}Response 201 Copy
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"completed",
"archived"
]
},
"timezone": {
"type": "string"
},
"business_hours": {
"type": "string"
},
"send_weight": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"send_rank": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"enrolled_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones."
},
"active_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, the ones still in the sequence."
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"step_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"template_id": {
"type": [
"string",
"null"
]
},
"delay_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"platform": {
"type": "string"
},
"message_mode": {
"type": "string",
"enum": [
"template",
"ai"
],
"description": "Read only. `ai`: the step sends a first message written for each lead, and `template_id` is its fallback, sent only when no such message can be written. `template`: the step sends `template_id`. Set in the app; `campaigns.steps.replace` keeps each step's mode by `step_order`."
}
},
"required": [
"id",
"step_order",
"template_id",
"delay_days",
"platform",
"message_mode"
],
"additionalProperties": false
}
},
"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",
"description",
"status",
"timezone",
"business_hours",
"send_weight",
"send_rank",
"enrolled_count",
"active_count",
"created_at",
"updated_at"
],
"additionalProperties": false
}POST /v1/campaigns/{campaign_id}/pause
Pause an active campaign.
active -> paused. Nothing more is sent until it is resumed. A campaign that is already paused is answered as is.
Operation id campaigns.pauseScopes campaigns:controlRate class `write` Idempotency `Idempotency-Key` accepted Keys Developer keys
Name Type Required Description campaign_idstringyes Campaign id (uuid). at most 64 characters
Field Type Required Description active_countintegeryes Of those, the ones still in the sequence.. -9007199254740991 to 9007199254740991 business_hoursstringyes created_atdate-timeyes descriptionstring | nullyes enrolled_countintegeryes Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones.. -9007199254740991 to 9007199254740991 idstringyes namestringyes send_rankintegeryes -9007199254740991 to 9007199254740991 send_weightintegeryes -9007199254740991 to 9007199254740991 status"active" | "paused" | "completed" | "archived"yes timezonestringyes updated_atdate-timeyes stepsobject[]no
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/campaigns/string/pause" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"completed",
"archived"
]
},
"timezone": {
"type": "string"
},
"business_hours": {
"type": "string"
},
"send_weight": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"send_rank": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"enrolled_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones."
},
"active_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, the ones still in the sequence."
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"step_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"template_id": {
"type": [
"string",
"null"
]
},
"delay_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"platform": {
"type": "string"
},
"message_mode": {
"type": "string",
"enum": [
"template",
"ai"
],
"description": "Read only. `ai`: the step sends a first message written for each lead, and `template_id` is its fallback, sent only when no such message can be written. `template`: the step sends `template_id`. Set in the app; `campaigns.steps.replace` keeps each step's mode by `step_order`."
}
},
"required": [
"id",
"step_order",
"template_id",
"delay_days",
"platform",
"message_mode"
],
"additionalProperties": false
}
},
"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",
"description",
"status",
"timezone",
"business_hours",
"send_weight",
"send_rank",
"enrolled_count",
"active_count",
"created_at",
"updated_at"
],
"additionalProperties": false
}POST /v1/campaigns/{campaign_id}/resume
Resume a paused campaign.
paused -> active, without the steps check of start. A campaign that is already active is answered as is.
Operation id campaigns.resumeScopes campaigns:controlRate class `write` Idempotency `Idempotency-Key` accepted Keys Developer keys
Name Type Required Description campaign_idstringyes Campaign id (uuid). at most 64 characters
Field Type Required Description active_countintegeryes Of those, the ones still in the sequence.. -9007199254740991 to 9007199254740991 business_hoursstringyes created_atdate-timeyes descriptionstring | nullyes enrolled_countintegeryes Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones.. -9007199254740991 to 9007199254740991 idstringyes namestringyes send_rankintegeryes -9007199254740991 to 9007199254740991 send_weightintegeryes -9007199254740991 to 9007199254740991 status"active" | "paused" | "completed" | "archived"yes timezonestringyes updated_atdate-timeyes stepsobject[]no
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/campaigns/string/resume" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"completed",
"archived"
]
},
"timezone": {
"type": "string"
},
"business_hours": {
"type": "string"
},
"send_weight": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"send_rank": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"enrolled_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones."
},
"active_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, the ones still in the sequence."
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"step_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"template_id": {
"type": [
"string",
"null"
]
},
"delay_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"platform": {
"type": "string"
},
"message_mode": {
"type": "string",
"enum": [
"template",
"ai"
],
"description": "Read only. `ai`: the step sends a first message written for each lead, and `template_id` is its fallback, sent only when no such message can be written. `template`: the step sends `template_id`. Set in the app; `campaigns.steps.replace` keeps each step's mode by `step_order`."
}
},
"required": [
"id",
"step_order",
"template_id",
"delay_days",
"platform",
"message_mode"
],
"additionalProperties": false
}
},
"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",
"description",
"status",
"timezone",
"business_hours",
"send_weight",
"send_rank",
"enrolled_count",
"active_count",
"created_at",
"updated_at"
],
"additionalProperties": false
}POST /v1/campaigns/{campaign_id}/start
Start a paused campaign.
paused -> active. The extension then sends each enrollment's due step at its own pace. A campaign that is already active is answered as is.
Operation id campaigns.startScopes campaigns:controlRate class `write` Idempotency `Idempotency-Key` accepted Keys Developer keys
Name Type Required Description campaign_idstringyes Campaign id (uuid). at most 64 characters
Field Type Required Description active_countintegeryes Of those, the ones still in the sequence.. -9007199254740991 to 9007199254740991 business_hoursstringyes created_atdate-timeyes descriptionstring | nullyes enrolled_countintegeryes Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones.. -9007199254740991 to 9007199254740991 idstringyes namestringyes send_rankintegeryes -9007199254740991 to 9007199254740991 send_weightintegeryes -9007199254740991 to 9007199254740991 status"active" | "paused" | "completed" | "archived"yes timezonestringyes updated_atdate-timeyes stepsobject[]no
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X POST "https://api.dmhero.ai/v1/campaigns/string/start" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string",
"enum": [
"active",
"paused",
"completed",
"archived"
]
},
"timezone": {
"type": "string"
},
"business_hours": {
"type": "string"
},
"send_weight": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"send_rank": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"enrolled_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Enrollments the key may see: its reps' ones, and for an unrestricted key also the unassigned ones."
},
"active_count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, the ones still in the sequence."
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"step_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"template_id": {
"type": [
"string",
"null"
]
},
"delay_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"platform": {
"type": "string"
},
"message_mode": {
"type": "string",
"enum": [
"template",
"ai"
],
"description": "Read only. `ai`: the step sends a first message written for each lead, and `template_id` is its fallback, sent only when no such message can be written. `template`: the step sends `template_id`. Set in the app; `campaigns.steps.replace` keeps each step's mode by `step_order`."
}
},
"required": [
"id",
"step_order",
"template_id",
"delay_days",
"platform",
"message_mode"
],
"additionalProperties": false
}
},
"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",
"description",
"status",
"timezone",
"business_hours",
"send_weight",
"send_rank",
"enrolled_count",
"active_count",
"created_at",
"updated_at"
],
"additionalProperties": false
}GET /v1/campaigns/{campaign_id}/stats
A campaign's funnel and enrollment numbers.
funnel (active enrollments by current step) and withheld_custom (active enrollments held back for a missing custom field value) are as of now. enrolled, active, completed and replied cover the enrollments of the last days days when given. Every number covers only the enrollments the key may see.
Operation id campaigns.statsScopes campaigns:readRate class `read` , costs 5 per call Idempotency Not applicable Keys Developer keys Reps A key restricted to reps sees only data of its own reps
Name Type Required Description campaign_idstringyes Campaign id (uuid). at most 64 characters
Name Type Required Description daysintegerno 1 to 365
Field Type Required Description activeintegeryes -9007199254740991 to 9007199254740991 completedintegeryes -9007199254740991 to 9007199254740991 enrolledintegeryes -9007199254740991 to 9007199254740991 funnelobject[]yes repliedintegeryes -9007199254740991 to 9007199254740991 withheld_customobjectyes
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl "https://api.dmhero.ai/v1/campaigns/string/stats" \
-H "Authorization: Bearer $DMHERO_API_KEY"JSON Schema Response 200 Copy
{
"type": "object",
"properties": {
"funnel": {
"type": "array",
"items": {
"type": "object",
"properties": {
"step": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"count": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"step",
"count"
],
"additionalProperties": false
}
},
"enrolled": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"active": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"completed": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"replied": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"withheld_custom": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"by_key": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
}
},
"required": [
"total",
"by_key"
],
"additionalProperties": false
}
},
"required": [
"funnel",
"enrolled",
"active",
"completed",
"replied",
"withheld_custom"
],
"additionalProperties": false
}PUT /v1/campaigns/{campaign_id}/steps
Replace a campaign's whole step sequence.
One transaction: a refused step leaves the old sequence intact. Enrollments keep their current step number, so a lead on step 2 continues with the new step 2. Each step keeps the message_mode the step with the same step_order had; a new step is template.
Operation id campaigns.steps.replaceScopes campaigns:writeRate class `write` Idempotency Not applicable Keys Developer keys
Name Type Required Description campaign_idstringyes Campaign id (uuid). at most 64 characters
Field Type Required Description stepsobject[]yes The whole sequence, in order: the first item is step 1.. 1 to 10 items
Field Type Required Description stepsobject[]yes
Every operation can also answer the shared errors : authentication, scopes, rate limits and validation.
bash Copy
curl -X PUT "https://api.dmhero.ai/v1/campaigns/string/steps" \
-H "Authorization: Bearer $DMHERO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"steps": [
{
"template_id": "string",
"delay_days": 0
}
]
}'JSON Schema Request body Copy
{
"type": "object",
"properties": {
"steps": {
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"template_id": {
"type": "string",
"maxLength": 64,
"description": "A template of this workspace (uuid)."
},
"delay_days": {
"type": "integer",
"minimum": 0,
"maximum": 90,
"description": "Days after the previous step (the first step: after enrollment)."
}
},
"required": [
"template_id",
"delay_days"
]
},
"description": "The whole sequence, in order: the first item is step 1."
}
},
"required": [
"steps"
]
}Response 200 Copy
{
"type": "object",
"properties": {
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"step_order": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"template_id": {
"type": [
"string",
"null"
]
},
"delay_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"platform": {
"type": "string"
},
"message_mode": {
"type": "string",
"enum": [
"template",
"ai"
],
"description": "Read only. `ai`: the step sends a first message written for each lead, and `template_id` is its fallback, sent only when no such message can be written. `template`: the step sends `template_id`. Set in the app; `campaigns.steps.replace` keeps each step's mode by `step_order`."
}
},
"required": [
"id",
"step_order",
"template_id",
"delay_days",
"platform",
"message_mode"
],
"additionalProperties": false
}
}
},
"required": [
"steps"
],
"additionalProperties": false
}