Quickstart

From zero to your first campaign in a few minutes.
View as Markdown

This guide creates an API key, lists the agents in your workspace, and creates an outreach campaign for one of them.

1

Create an API key

In the dashboard, open Settings → API Keys (https://app.jelliu.co/settings?tab=api-keys) and create a key.

  • Only the workspace owner can create, list or revoke keys.
  • Pick the permission. Creating and activating campaigns are admin operations, so for this guide choose full. See Authentication for what each scope can reach.
  • Copy the key when it is shown. It looks like jl_ followed by 64 hexadecimal characters, and it is displayed only once.

Store it in an environment variable:

export JELLIU_API_KEY="jl_..."
2

List your agents

Every campaign runs on an agent. Fetch the agents in your workspace and copy the id of the one you want to use.

curl -sS "https://api.jelliu.co/api/agents?limit=20" \
-H "Authorization: Bearer $JELLIU_API_KEY"

The response is { "data": [ ... ] }, newest agents first. limit accepts 1 to 200 (default 50); see Pagination for paging and the search filter.

3

Create a campaign

Create a campaign for that agent. New campaigns start in the draft status, so nothing is sent yet.

curl -sS -X POST "https://api.jelliu.co/api/campaigns" \
-H "Authorization: Bearer $JELLIU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "7c1d9f30-5e2a-4a7e-9c8f-91a0b1c2d3e4",
"name": "Webinar follow-up",
"productContext": "Follow-up calls to people who registered for our webinar but did not attend.",
"targetAudience": "Operations managers at logistics companies",
"channel": "voice",
"category": "sales",
"schedule": {
"timezone": "America/Bogota",
"days": [
{ "day": "monday", "startHour": 9, "endHour": 18, "enabled": true },
{ "day": "tuesday", "startHour": 9, "endHour": 18, "enabled": true },
{ "day": "wednesday", "startHour": 9, "endHour": 18, "enabled": true },
{ "day": "thursday", "startHour": 9, "endHour": 18, "enabled": true },
{ "day": "friday", "startHour": 9, "endHour": 17, "enabled": true }
]
}
}'

A successful request returns 201 Created with the campaign in data.

4

Add contacts and activate

Add at least one contact, then activate the campaign.

# Add a contact (E.164 phone number)
curl -sS -X POST "https://api.jelliu.co/api/campaigns/$CAMPAIGN_ID/contacts" \
-H "Authorization: Bearer $JELLIU_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "phoneNumber": "+573001234567", "name": "Ana Gómez" }'
# Activate
curl -sS -X PATCH "https://api.jelliu.co/api/campaigns/$CAMPAIGN_ID/activate" \
-H "Authorization: Bearer $JELLIU_API_KEY"

Activation starts real outreach to the contacts in the campaign, within the schedule you defined. A campaign with no pending contacts cannot be activated.

Campaign fields

agentId
string (uuid)Required

The agent that runs the campaign. It must belong to your workspace.

name
stringRequired

1 to 200 characters.

productContext
stringRequired

What the campaign is about. 10 to 5000 characters.

targetAudience
stringRequired

Who you are contacting. 1 to 1000 characters.

schedule
objectRequired

timezone is an IANA time zone (for example America/Bogota). days is an array of { day, startHour, endHour, enabled }, where day is monday through sunday, startHour is 0 to 23, endHour is 1 to 24, and startHour must be lower than endHour on enabled days. At least one day must be enabled.

channel
stringDefaults to voice

One of voice, whatsapp, webchat, email.

category
stringDefaults to sales

One of sales, support, scheduling, surveys, collections, retention, notifications, interview, language_assessment, general.

maxConcurrentCalls
numberDefaults to 10

1 to 500.

maxRetryAttempts
numberDefaults to 3

0 to 10.

retryIntervalMinutes
numberDefaults to 60

5 to 1440.

whatsappTemplateId
string (uuid)

WhatsApp campaigns: the approved template used to reach out. Without it, a WhatsApp campaign only answers people who write in.

emailSubject
string

Email campaigns: 1 to 300 characters.

emailBody
string

Email campaigns: 1 to 20000 characters.

Next steps