Herbby API

Campaigns API

The Campaigns API allows you to automate your messaging outreach. Programmatically create campaigns, define audiences via tags or direct numbers, and trigger dispatches seamlessly.

List Campaigns

Retrieve a paginated list of all campaigns in your workspace.

GET/api/v1/campaigns
curl -X GET https://api.herbby.digitechedge.com/api/campaigns \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Create a Campaign

Draft a new messaging campaign. This endpoint prepares the campaign but does not send it.

POST/api/v1/campaigns

Request Body

FieldTypeDescription
name *stringInternal name for the campaign.
message *stringThe message content. Supports dynamic variables like {name}.
targets *arrayArray of tag names or raw phone numbers to send to.
curl -X POST https://api.herbby.digitechedge.com/api/campaigns \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "Holiday Promo",
    "message": "Hey {name}! Grab a 20% discount this holiday season using code HOLIDAY20.",
    "targets": ["vip_customers", "+233505160686"]
  }'

Send a Campaign

Trigger the dispatch of an existing campaign by its ID.

POST/api/v1/campaigns/{id}/send
curl -X POST https://api.herbby.digitechedge.com/api/campaigns/123/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"