# 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": {
"sequence_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": {
"stage_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 |
# 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
# 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 |