# Tags
NOTE
The URI for the API endpoint is often the same for multiple endpoints, the difference being in HTTP methods.
# Retrieve All Tags
GET https://api.wolfeo.me/v1/tags
# Example Request
curl --request GET "https://api.wolfeo.me/v1/tags" \
--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 Tag",
"created_at": "2021-01-01 09:00:00"
},
{
"id": 2,
"name": "Second Tag",
"created_at": "2021-01-01 09:00:00"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 50,
"total": 2
}
}
# Get A Contact's Tags
Returns all tags a contact has.
GET https://api.wolfeo.me/v1/contacts-tags
# Example Request
curl --request GET "https://api.wolfeo.me/v1/contacts-tags?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 Tag",
"created_at": "2021-01-01 09:00:00"
},
{
"id": 2,
"name": "Second Tag",
"created_at": "2021-01-01 09:00:00"
}
]
}
# Get A Tag's Contacts
Returns all contacts that have a specific tag (paginated).
GET https://api.wolfeo.me/v1/tags-contacts
# Example Request
curl --request GET "https://api.wolfeo.me/v1/tags-contacts?tag_id=1" \
--header "Authorization: Bearer YOUR_API_KEY"
# Parameters
| Parameter | Type | Description |
|---|---|---|
| tag_id* | int | A tag'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
}
}
# Create Tag
POST https://api.wolfeo.me/v1/tag
# Example Request
curl --request POST "https://api.wolfeo.me/v1/tag" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"name": "VIP"}'
# Parameters
| Parameter | Type | Description |
|---|---|---|
| name* | string | Tag name (max 255 characters) |
* denotes a required parameter
# Sample Return
HTTP 201 Created
{
"success": true,
"data": {
"tag_id": 48,
"name": "VIP"
}
}
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| TAG_EXISTS | 409 | A tag with this name already exists |
# Delete Tag
DELETE https://api.wolfeo.me/v1/tag
# Example Request
curl --request DELETE "https://api.wolfeo.me/v1/tag" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"tag_id": 48}'
# Parameters
| Parameter | Type | Description |
|---|---|---|
| tag_id* | int | The ID of the tag |
* denotes a required parameter
# Sample Return
{
"success": true,
"data": {
"tag_id": 48,
"deleted": true
}
}
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| NOT_FOUND | 404 | Tag not found |
# Rename Tag
PUT https://api.wolfeo.me/v1/tag
Renames an existing tag.
# Example Request
curl --request PUT "https://api.wolfeo.me/v1/tag" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"tag_id": 48, "name": "Super VIP"}'
# Parameters
| Parameter | Type | Description |
|---|---|---|
| tag_id* | integer | The ID of the tag to rename |
| name* | string | New tag name |
* denotes a required parameter
# Sample Return
{
"success": true,
"data": {
"tag_id": 48,
"name": "Super VIP",
"updated": true
}
}
# Possible Errors
| Code | HTTP | Description |
|---|---|---|
| TAG_EXISTS | 409 | A tag with this name already exists |