# Sequences
NOTE
The URI for the API endpoint is often the same for multiple endpoints, the difference being in HTTP methods.
# Create Sequence
POST https://api.wolfeo.me/v1/sequence
# Example Request
curl --request POST "https://api.wolfeo.me/v1/sequence" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"name": "Welcome Series", "type": "normal"}'
# Parameters
| Parameter | Type | Description |
|---|---|---|
| name* | string | Name of the sequence |
| type | string | normal (default) or inverted |
* denotes a required parameter
# Sample Return
HTTP 201 Created
{
"success": true,
"data": {
"id": 12,
"name": "Welcome Series",
"type": "normal"
}
}
# Create Sequence Stage
POST https://api.wolfeo.me/v1/sequence-stage
Adds a step to an existing sequence. The step is created inactive — configure it in the dashboard before activating.
# Example Request
curl --request POST "https://api.wolfeo.me/v1/sequence-stage" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"sequence_id": 12, "name": "Day 1 Email", "stage_type": "send_email", "time_value": 1, "time_type": 86400}'
# Parameters
| Parameter | Type | Description |
|---|---|---|
| sequence_id* | integer | The sequence to add the step to |
| name | string | Name of the step (default: Step N) |
| stage_type | string | send_email, send_sms, or action |
| time_value | integer | Delay value (default: 1) |
| time_type | integer | Delay unit in seconds (default: 86400) |
* denotes a required parameter
# Possible values for time_type
| Value | Description |
|---|---|
3600 | Hours |
86400 | Days |
604800 | Weeks |
# Sample Return
HTTP 201 Created
{
"success": true,
"data": {
"id": 55,
"sequence_id": 12,
"step": 1,
"name": "Day 1 Email",
"stage_type": "send_email",
"time_value": 1,
"time_type": 86400
}
}
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| NOT_FOUND | 404 | Sequence not found |
# Update Sequence Stage Content
PUT https://api.wolfeo.me/v1/sequence-stage-content
Sets the HTML body of a send_email stage. The HTML is uploaded to storage and linked to the stage's email. Optional meta fields (subject, from_name, from_email) can be updated in the same call.
# Example Request
curl --request PUT "https://api.wolfeo.me/v1/sequence-stage-content" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"stage_id": 55, "html": "<p>Hello {{first_name}}</p>", "subject": "Welcome!"}'
# Parameters
| Parameter | Type | Description |
|---|---|---|
| stage_id* | integer | The stage whose email body you want to update |
| html* | string | Raw HTML body of the email |
| subject | string | Optional — update the email subject |
| from_name | string | Optional — update the sender name |
| from_email | string | Optional — update the sender email |
* denotes a required parameter
# Sample Return
{
"success": true,
"data": {
"id": 55,
"email_id": 209,
"path_to_email": "https://wolfeo.s3.eu-west-1.amazonaws.com/emails/files/file_209.html"
}
}
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| NOT_FOUND | 404 | Stage not found |
| STAGE_NOT_EMAIL | 422 | Stage is not a send_email stage or has no linked email |
| VALIDATION_ERROR | 422 | Missing or invalid field (see error.details) |
# Retrieve All Sequences
GET https://api.wolfeo.me/v1/sequences
# Example Request
curl --request GET "https://api.wolfeo.me/v1/sequences" \
--header "Authorization: Bearer YOUR_API_KEY"
# Parameters
| Parameter | Type | Description |
|---|---|---|
| page | int | Page number (default: 1) |
| per_page | int | Results per page, 1–100 (default: 50) |
# Sample Return
{
"success": true,
"data": [
{
"id": 1,
"name": "First Sequence",
"created_at": "2021-01-01 09:00:00"
},
{
"id": 2,
"name": "Second Sequence",
"created_at": "2021-01-01 09:00:00"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 50,
"total": 2
}
}
# Get An Individual Sequence
GET https://api.wolfeo.me/v1/sequence
# Example Request
curl --request GET "https://api.wolfeo.me/v1/sequence?sequence_id=1" \
--header "Authorization: Bearer YOUR_API_KEY"
# Parameters
| Parameter | Type | Description |
|---|---|---|
| sequence_id* | int | A sequence's ID |
* denotes a required parameter
# Sample Return
{
"success": true,
"data": {
"id": 1,
"name": "First Sequence",
"created_at": "2021-01-01 09:00:00",
"stages": [
{
"id": 1,
"step": 1,
"name": "Day 1 Email",
"stage_type": "send_email",
"time_value": 1,
"time_type": 86400,
"active": false,
"created_at": "2021-01-01 09:00:00"
}
]
}
}
# Get A Contact's Sequences
Returns all sequences a contact is subscribed to.
GET https://api.wolfeo.me/v1/contacts-sequences
# Example Request
curl --request GET "https://api.wolfeo.me/v1/contacts-sequences?contact_id=1" \
--header "Authorization: Bearer YOUR_API_KEY"
# Parameters
| Parameter | Type | Description |
|---|---|---|
| email** | string | A contact's email address |
| contact_id** | int | A contact's ID |
** at least one of these parameters must be passed
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| VALIDATION_ERROR | 422 | Neither email nor contact_id was provided, or one is malformed |
| NOT_FOUND | 404 | No contact found for given parameters |
# Sample Return
{
"success": true,
"data": [
{
"id": 1,
"name": "First Sequence",
"created_at": "2021-01-01 09:00:00"
},
{
"id": 2,
"name": "Second Sequence",
"created_at": "2021-01-01 09:00:00"
}
]
}
# Get A Sequence's Contacts
Returns all contacts subscribed to a sequence (paginated).
GET https://api.wolfeo.me/v1/sequences-contacts
# Example Request
curl --request GET "https://api.wolfeo.me/v1/sequences-contacts?sequence_id=1" \
--header "Authorization: Bearer YOUR_API_KEY"
# Parameters
| Parameter | Type | Description |
|---|---|---|
| sequence_id* | int | A sequence's ID |
| page | int | Page number (default: 1) |
| per_page | int | Results per page, 1–100 (default: 50) |
* denotes a required parameter
# Sample Return
{
"success": true,
"data": [
{
"id": 1,
"email": "first_contact@wolfeo.ie",
"first_name": "First",
"last_name": "Contact"
},
{
"id": 2,
"email": "second_contact@wolfeo.ie",
"first_name": "Second",
"last_name": "Contact"
}
],
"meta": {
"current_page": 1,
"last_page": 3,
"per_page": 50,
"total": 142
}
}
# Delete Sequence
DELETE https://api.wolfeo.me/v1/sequence
Permanently deletes a sequence and all its associated stages.
WARNING
This action is irreversible. All stages belonging to the sequence will also be deleted.
# Example Request
curl --request DELETE "https://api.wolfeo.me/v1/sequence" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"sequence_id": 12}'
# Parameters
| Parameter | Type | Description |
|---|---|---|
| sequence_id* | integer | The sequence ID to delete |
* denotes a required parameter
# Sample Return
{
"success": true,
"data": {
"deleted": true
}
}
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| NOT_FOUND | 404 | Sequence not found |
# Delete Sequence Stage
DELETE https://api.wolfeo.me/v1/sequence-stage
Permanently deletes a single stage from a sequence.
# Example Request
curl --request DELETE "https://api.wolfeo.me/v1/sequence-stage" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"stage_id": 55}'
# Parameters
| Parameter | Type | Description |
|---|---|---|
| stage_id* | integer | The stage ID to delete |
* denotes a required parameter
# Sample Return
{
"success": true,
"data": {
"deleted": true
}
}
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| NOT_FOUND | 404 | Stage not found |
# Retrieve Sequence Stats
GET https://api.wolfeo.me/v1/sequence-stats
Engagement breakdown stage by stage for one automated sequence, plus the number of contacts currently enrolled.
# Example Request
curl --request GET "https://api.wolfeo.me/v1/sequence-stats?sequence_id=18" \
--header "Authorization: Bearer YOUR_API_KEY"
# Parameters
| Parameter | Type | Description |
|---|---|---|
| sequence_id* | integer | The sequence id |
* denotes a required parameter
# Sample Return
{
"success": true,
"data": {
"id": 18,
"name": "Welcome series",
"active_contacts": 1240,
"stages": [
{
"id": 55,
"position": 1,
"subject": "Welcome aboard",
"sent": 1240,
"opened": 468,
"clicked": 91,
"unsubscribed": 12,
"bounced": 0,
"open_rate": 0.3774,
"click_rate": 0.0734,
"unsubscribe_rate": 0.0097
}
]
}
}
TIP
Only stages that send an email are listed, ordered by position. Waits and conditions
have no engagement to report and are left out. Rates are ratios against sent, so
0.3774 is 37.74%, and they are 0 when nothing has been sent yet.
WARNING
bounced is always 0. Wolfeo does not ingest bounce events yet, and the field is
reserved so it can be populated later without a breaking change.
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| NOT_FOUND | 404 | No sequence with this id in your account |
| VALIDATION_ERROR | 422 | sequence_id is missing or not an integer |
| UNAUTHORIZED | 401 | Invalid or missing API key |