NAV
shell php

Introduction

Welcome to FluentCRM API doc. This doc will describe the REST API Endpoints of FluentCRM.

This example API documentation page was created with Slate. If you find any typo or would like contribute please send a pull request with improvements. Please note that, All endpoints are not added to this doc (Work in progreess).

Authentication

FluentCRM uses WordPress REST API. So you can use any authorization method that supports WordPress.

Once you create your Application Password in WordPress, Add Authorization Header to every request.

Example API Call for contacts

# With shell, you can just pass the correct header with each request
curl "https://yourdomain.com/wp-json/fluent-crm/v2/subscribers" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

API Base URL: https://yourdomain.com/wp-json/fluent-crm/v2

Creating API Key

You can either create Application Password using WordPress's user editing Page. Please make sure, the user have access to FluentCRM. We recommend creating Application Password from inside FluentCRM. Navigate to FluentCRM -> Settings -> Managers and then create a Manager First. Please make sure the manager is not "Administrator" user role. Select the permissions you want to give to that user for FluentCRM.

Create manager on FluentCRM

Then Go to FluentCRM -> Settings > Rest API and Create the new key corresponding to manager.

Rest API Screen

Once you confirm, It will give you the username and application password. Please note that, You can not retrive the Application password later. So save that for the future use.

Application Create Success

In the background, FluentCRM create REST API in WordPress user.

Make sure to replace API_USERNAME & API_PASSWORD with your UserName & API Password.

Contacts

Get All Contacts

curl "https://yourdomain.com/wp-json/fluent-crm/v2/subscribers" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
  "current_page": 1,
  "per_page": 10,
  "from": 1,
  "to": 10,
  "last_page": 493,
  "total": 9860,
  "data": [
    {
      "id": "9860",
      "user_id": "5984",
      "hash": "4a6f1ed89704814c100a954ec403cd2f",
      "contact_owner": "string",
      "company_id": "string",
      "prefix": "string",
      "first_name": "Kelli",
      "last_name": "Hand",
      "email": "sonny.pacocha@example.net",
      "timezone": "string",
      "address_line_1": "string",
      "address_line_2": "string",
      "postal_code": "string",
      "city": "string",
      "state": "string",
      "country": "string",
      "ip": "string",
      "latitude": "string",
      "longitude": "string",
      "total_points": "0",
      "life_time_value": "0",
      "phone": "string",
      "status": "subscribed",
      "contact_type": "lead",
      "source": "wp_users",
      "avatar": "string",
      "date_of_birth": "string",
      "created_at": {},
      "last_activity": "string",
      "updated_at": "string",
      "photo": "https://www.gravatar.com/avatar/4a6f1ed89704814c100a954ec403cd2f?s=128",
      "full_name": "Kelli Hand",
      "tags": [
        {
          "id": "2",
          "title": "Fluent Forms Users",
          "slug": "fluent-forms-users",
          "description": "string",
          "created_at": {},
          "updated_at": {},
          "pivot": {
            "subscriber_id": "9860",
            "object_id": "2",
            "object_type": "FluentCrm\\App\\Models\\Tag",
            "created_at": {},
            "updated_at": {}
          }
        }
      ],
      "lists": [
        {
          "id": "1",
          "title": "List Item 1",
          "slug": "list-item-1",
          "description": "string",
          "is_public": "0",
          "created_at": {},
          "updated_at": {},
          "pivot": {
            "subscriber_id": "9860",
            "object_id": "1",
            "object_type": "FluentCrm\\App\\Models\\Lists",
            "created_at": {},
            "updated_at": {}
          }
        }
      ]
    }
  ]
}

This endpoint retrieves all Contact.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/subscribers

URL Parameters

Parameter Type Description Default
per_page int Records per page 10
page int Page Number for Pagination 1
search string Search Parameter for filtering contacts
tags array Tag Ids to filter contacts
lists array List Ids to filter contacts
statuses array Status slugs to filter contacts
order_by string Order By contact column Value to sort contacts id
order_type string Order Type contact column Value to sort contacts DESC
custom_fields boolean Flag to get custom contact field values too false
company_ids array Company Ids to filter contacts

Possible statuses values:

Get a Specific Contact

curl "https://yourdomain.com/wp-json/fluent-crm/v2/subscribers/<ID>" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
  "subscriber":{
    "id":"7743",
    "user_id":"1",
    "hash":"5acfbfb0e8135fe5a1e36bb40d90ad69",
    "contact_owner":null,
    "company_id":null,
    "prefix":null,
    "first_name":"JeweldddXXX",
    "last_name":"JewelZZZ",
    "email":"cep.jewel@gmail.com",
    "timezone":null,
    "address_line_1":"283ddd",
    "address_line_2":"sda",
    "postal_code":"34521",
    "city":"New",
    "state":"ME",
    "country":"US",
    "ip":"127.0.0.1",
    "latitude":null,
    "longitude":null,
    "total_points":"0",
    "life_time_value":"0",
    "phone":"01723371621",
    "status":"subscribed",
    "contact_type":"lead",
    "source":"woocommerce",
    "avatar":null,
    "date_of_birth":null,
    "created_at":"2021-07-17 21:08:30",
    "last_activity":"2021-07-18 13:45:42",
    "updated_at":"2021-07-18 20:22:48",
    "user_edit_url":"https:\/\/wp.lab\/wp-admin\/profile.php",
    "stats":{
      "emails":0,
      "opens":0,
      "clicks":0
    },
    "commerce_stat": [
      {
        "title": "Customer Since",
        "value": "March 24, 2022",
        "key": "customer_since",
        "actual_value": "2022-03-24 10:03:05"
      }
    ],
    "custom_values":{
      "some_number_field":"10",
      "checkbox":[
        "Value Option 1"
      ]
    },
    "photo":"https:\/\/www.gravatar.com\/avatar\/5acfbfb0e8135fe5a1e36bb40d90ad69?s=128",
    "full_name":"JeweldddXXX JewelZZZ",
    "tags":[
      {
        "id":"1",
        "title":"FluentCRM Users",
        "slug":"fluentcrm-users",
        "description":null,
        "created_at":"2021-07-17 21:06:25",
        "updated_at":"2021-07-17 21:06:25",
        "pivot":{
          "subscriber_id":"7743",
          "object_id":"1",
          "object_type":"FluentCrm\\App\\Models\\Tag",
          "created_at":"2021-07-19 17:30:52",
          "updated_at":"2021-07-19 17:30:52"
        }
      }
    ],
    "lists":[
      {
        "id":"1",
        "title":"List Item 1",
        "slug":"list-item-1",
        "description":null,
        "is_public":"0",
        "created_at":"2021-07-17 21:01:59",
        "updated_at":"2021-07-17 21:01:59",
        "pivot":{
          "subscriber_id":"7743",
          "object_id":"1",
          "object_type":"FluentCrm\\App\\Models\\Lists",
          "created_at":"2021-07-17 21:08:30",
          "updated_at":"2021-07-17 21:08:30"
        }
      }
    ]
  }
}

This endpoint retrieves a specific contact.

HTTP Request

Get subscriber by id:
GET https://yourdomain.com/wp-json/fluent-crm/v2/subscribers/<ID>

Or get by email:
GET https://yourdomain.com/wp-json/fluent-crm/v2/subscribers/0?get_by_email=<EMAIL>

URL Parameters

Parameter Type Description
with[] array Get Additional Contact Meta Properties

Possible with parameters:

Create a new contact


curl 'https://fcrm.test/wp-json/fluent-crm/v2/subscribers' \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD" \
  --data-raw 'first_name=Rafi&last_name=Ahmed&email=rafi%40authlab.io&phone=44+078+1961+0398&date_of_birth=2000-03-04&status=subscribed&address_line_1=1+Union+Street&address_line_2=64+Cunnery+Rd&city=Swansea&state=Swansea&postal_code=SA1+3EE&country=GB&tags%5B%5D=1&tags%5B%5D=2&lists%5B%5D=1&lists%5B%5D=2&custom_values%5Bcustom_field%5D=Custom+Field+Value&prefix=Mr&query_timestamp=1626770805540' \

The above command creates a new contact in Fluent CRM and returns the data in JSON.

{
    "message": "Successfully added the subscriber.",
    "contact": {
        "prefix": "Mr",
        "first_name": "Rafi",
        "last_name": "Ahmed",
        "email": "rafi@authlab.io",
        "phone": " 44 078 1961 0398",
        "date_of_birth": "2000-03-04",
        "address_line_1": "1 Union Street",
        "address_line_2": "64 Cunnery Rd",
        "city": "Swansea",
        "state": "Swansea",
        "country": "United Kingdom (UK)",
        "postal_code": "SA1 3EE",
        "status": "subscribed",
        "hash": "3f6e19a6d1fcf98c73e031882796091f",
        "updated_at": "2021-07-19 22:11:48",
        "created_at": "2021-07-19 22:11:48",
        "id": 17,
        "photo": "https://www.gravatar.com/avatar/3f6e19a6d1fcf98c73e031882796091f?s=128",
        "full_name": "Rafi Ahmed",
        "tags": [
            {
                "id": "1",
                "title": "User One",
                "slug": "user-one",
                "description": null,
                "created_at": "2021-07-19 08:25:34",
                "updated_at": "2021-07-19 08:25:34",
                "pivot": {
                    "subscriber_id": "17",
                    "object_id": "1",
                    "object_type": "FluentCrm\\App\\Models\\Tag",
                    "created_at": "2021-07-19 22:11:48",
                    "updated_at": "2021-07-19 22:11:48"
                }
            },
            {
                "id": "2",
                "title": "User Two",
                "slug": "user-two",
                "description": null,
                "created_at": "2021-07-19 08:25:34",
                "updated_at": "2021-07-19 08:25:34",
                "pivot": {
                    "subscriber_id": "17",
                    "object_id": "2",
                    "object_type": "FluentCrm\\App\\Models\\Tag",
                    "created_at": "2021-07-19 22:11:48",
                    "updated_at": "2021-07-19 22:11:48"
                }
            }
        ],
        "lists": [
            {
                "id": "1",
                "title": "User One",
                "slug": "user-one",
                "description": null,
                "is_public": "0",
                "created_at": "2021-07-19 08:25:22",
                "updated_at": "2021-07-19 08:25:22",
                "pivot": {
                    "subscriber_id": "17",
                    "object_id": "1",
                    "object_type": "FluentCrm\\App\\Models\\Lists",
                    "created_at": "2021-07-19 22:11:48",
                    "updated_at": "2021-07-19 22:11:48"
                }
            },
            {
                "id": "2",
                "title": "User Two",
                "slug": "user-two",
                "description": null,
                "is_public": "0",
                "created_at": "2021-07-19 08:25:22",
                "updated_at": "2021-07-19 08:25:22",
                "pivot": {
                    "subscriber_id": "17",
                    "object_id": "2",
                    "object_type": "FluentCrm\\App\\Models\\Lists",
                    "created_at": "2021-07-19 22:11:48",
                    "updated_at": "2021-07-19 22:11:48"
                }
            }
        ]
    },
    "action_type": "created"
}

This endpoint creates a new contact.

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/subscribers

URL Parameters

Parameter Type Required Description
prefix string no Add Name Prefix of a Contact
first_name string no Add Contact's First Name
last_name string no Add Contact's Last Name
email email yes Add Contact's Email
phone string no Add Contact's Phone Number
date_of_birth string no Add Contact's Date Of Birth ( Format: YYYY-MM-DD )
address_line_1 string no Add Contact's Address Line 1
address_line_2 string no Add Contact's Address Line 2
city string no Add Contact's City
state string no Add Contact's State
country string no Add Contact's Country
postal_code string no Add Contact's ZIP Code
photo string no Add Contact's Profile Picture
tags array no Add Contact To One or Multiple Tags ( Tags data type is array & only takes the ID of a tag, e.g. tags[]=1&tags[]=2 )
lists array no Add Contact To One or Multiple Lists ( List data type is array & only takes the ID of a list e.g. lists[]=1&lists[]=2)
custom_values array no Add Custom Value To a Contact ( Custom Field data type is array, To add data to custom field you have to define the key & value, key is custom field slug name, e.g. custom_values[custom_field_slug]= Custom Field Value)
__force_update boolean no If you add this flag as true then contact will be updated if exist
status string yes Add Contact's Status

Possible status values:

Update any user data


The above command JSON structured like this:

{
  "message": "Subscriber successfully updated",
  "contact": {
    "id": "22",
    "user_id": null,
    "hash": "d76b4b3ba7daf871cc03a6037fbaa019",
    "contact_owner": null,
    "company_id": null,
    "prefix": "Mr",
    "first_name": "Andres",
    "last_name": "Alexser",
    "email": "alex@mail.com",
    "timezone": null,
    "address_line_1": "3 Union Street",
    "address_line_2": "1 Union Street",
    "postal_code": "SA1 3EE",
    "city": "Swansea",
    "state": "Swansea",
    "country": "GB",
    "ip": null,
    "latitude": null,
    "longitude": null,
    "total_points": "0",
    "life_time_value": "0",
    "phone": "44 098 6726 635",
    "status": "subscribed",
    "contact_type": "lead",
    "source": null,
    "avatar": null,
    "date_of_birth": "1995-07-14",
    "created_at": "2021-07-20 10:39:06",
    "last_activity": null,
    "updated_at": "2021-07-20 11:32:43",
    "photo": "https://www.gravatar.com/avatar/d76b4b3ba7daf871cc03a6037fbaa019?s=128",
    "full_name": "Andres Alexser"
  },
  "isDirty": true
}

This endpoint update a specific contact. Make sure you are passing the data in body as raw JSON format. Below there's an example added.
{ "subscriber":{ "email": "alex@mail.com", "first_name": "Andres", "last_name": "Alexser" } }

HTTP Request

PUT https://fcrm.test/wp-json/fluent-crm/v2/subscribers/<ID>

URL Parameters

Parameter Type Required Description
prefix string no Add Name Prefix of a Contact
first_name string no Add Contact's First Name
last_name string no Add Contact's Last Name
email email yes Add Contact's Email
phone string no Add Contact's Phone Number
date_of_birth string no Add Contact's Date Of Birth ( Format: YYYY-MM-DD )
address_line_1 string no Add Contact's Address Line 1
address_line_2 string no Add Contact's Address Line 2
city string no Add Contact's City
state string no Add Contact's State
country string no Add Contact's Country
postal_code string no Add Contact's ZIP Code
photo string no Add Contact's Profile Picture
attach_tags array no Add Contact To One or Multiple Tags ( Tags data type is array & only takes the ID of a tag, e.g. attach_tags[]=1&attach_tags[]=2 )
detach_tags array no Remove One or Multiple Tags from Contact ( Tags data type is array & only takes the ID of a tag, e.g. detach_tags[]=1&detach_tags[]=2 )
attach_lists array no Add Contact To One or Multiple Lists ( List data type is array & only takes the ID of a list e.g. attach_lists[]=1&attach_lists[]=2)
detach_lists array no Remove One or Multiple Lists from Contact ( List data type is array & only takes the ID of a list, e.g. detach_lists[]=1&detach_lists[]=2 )
custom_values array no Add Custom Value To a Contact ( Custom Field data type is array, To add data to custom field you have to define the key & value, key is custom field slug name, e.g. custom_values[custom_field_slug]= Custom Field Value)
status string yes Add Contact's Status
company_id int no Add company to Contact

Possible status values:

Delete a Specific Contact


The above command returns JSON structured like this:

{
  "message": "Selected Subscribers has been deleted"
}

This endpoint deletes a specific contact.

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/subscribers/<ID>

URL Parameters

Parameter Description
subscribers[] The ID of the contact to delete

Custom Fields

Get All Custom Fields

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/custom-fields/contacts' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "fields": [
    {
      "field_key": "single-select",
      "type": "select-one",
      "label": "Blood Group",
      "options": [
        "A+",
        "A-",
        "B+",
        "B-"
      ],
      "slug": "blood_group"
    },
    {
      "field_key": "text",
      "type": "text",
      "label": "Username",
      "slug": "username"
    },
    {
      "field_key": "radio",
      "type": "radio",
      "label": "Is Valid",
      "options": [
        "Yes",
        "No"
      ],
      "slug": "is_valid"
    },
    {
      "field_key": "radio",
      "type": "radio",
      "label": "Choose",
      "options": [
        "Y",
        "X"
      ],
      "slug": "choose"
    },
    {
      "field_key": "radio",
      "type": "radio",
      "label": "Choose Country",
      "options": [
        "Bangladesh",
        "India",
        "USA"
      ],
      "slug": "choose_country"
    },
    {
      "field_key": "single-select",
      "type": "select-one",
      "label": "Select Country",
      "options": [
        "Bangladesh",
        "India",
        "Japan"
      ],
      "slug": "select_country"
    },
    {
      "field_key": "radio",
      "type": "radio",
      "label": "Radio Boxes",
      "options": [
        "AuthLab",
        "WPManageNinja",
        "Kamran Raja",
        "Option 4"
      ],
      "slug": "checking_box"
    },
    {
      "field_key": "checkbox",
      "type": "checkbox",
      "label": "Checkbox Field",
      "options": [
        "AuthLab",
        "WPManageNinja",
        "Kamran Raja",
        "Option 4"
      ],
      "slug": "checkbox_field"
    }
  ]
}

This endpoint returns all custom fields

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/custom-fields/contacts

URL Parameters

Parameter Type Description
with array Get other additional data

Possible with parameters:

Companies

Get All Companies

curl "https://yourdomain.com/wp-json/fluent-crm/v2/companies" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
    "companies": {
        "total": 2,
        "per_page": 15,
        "current_page": 1,
        "last_page": 1,
        "next_page_url": null,
        "prev_page_url": null,
        "from": 1,
        "to": 2,
        "data": [
            {
                "id": 2,
                "hash": "18740e0997e2a0f6b04756da5a9d7b44",
                "owner_id": "1913",
                "name": "Demo Company",
                "industry": "Alternative Dispute Resolution",
                "website": "https://www.php.net/manual",
                "email": "demo@gmail.com",
                "timezone": "",
                "address_line_1": "",
                "address_line_2": "",
                "postal_code": "",
                "city": "",
                "state": "",
                "country": "BD",
                "employees_number": "0",
                "description": "This is a demo company",
                "phone": "",
                "type": "active",
                "logo": "http://wp.test/wp-content/uploads/2022/11/1280px-Taka_Bengali_letter.svg_.png",
                "linkedin_url": "",
                "status": "active",
                "created_at": "2023-03-13 18:34:34",
                "updated_at": "2023-03-16 15:02:33",
                "contacts_count": 0,
                "owner": {
                    "id": 1913,
                    "user_id": "1",
                    "hash": "eedc61a75aec6315291f11c96cfc036a",
                    "contact_owner": null,
                    "company_id": null,
                    "prefix": "Mr",
                    "first_name": "Nihar",
                    "last_name": "Das",
                  ...
                }
            },
            ...
        ]
    }
}

This endpoint retrieves all Company.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/companies

URL Parameters

Parameter Type Description Default
per_page int Records per page 10
page int Page Number for Pagination 1
search string Search by 'name', 'phone', 'description', 'email' for filtering companies
sort_by string Sort By company column Value to sort companies id
sort_order string Sort Type company column Value to sort companies DESC

Possible searchable columns:

Search company


curl 'https://fcrm.test/wp-json/fluent-crm/v2/companies/search' \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD" \
  --data-raw 'search=demo' \


The above command returns JSON structured like this:

{
  "results": [
    {
      "id": 2,
      "name": "Demo Company",
      "email": "demo@gmail.com",
      "logo": "http://wp.test/wp-content/uploads/2022/11/1280px-Taka_Bengali_letter.svg_.png",
      "phone": "",
      "website": "https://www.php.net/manual"
    },
    {
      "id": 1,
      "name": "Hello",
      "email": "demo@d.com",
      "logo": "http://wp.test/wp-content/uploads/2022/03/pin.png",
      "phone": "",
      "website": ""
    }
  ],
  "has_more": false
}

This endpoint search company by 'name', 'phone', 'description', 'email'

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/contacts/search

URL Parameters

Parameter Description
subscriber_id The ID of the contact to search company
search search 'name', 'phone', 'description', 'email' Parameter for filtering companies

Possible searchable columns:

Get a Specific Company

curl "https://yourdomain.com/wp-json/fluent-crm/v2/companies/<ID>" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
    "company": {
        "id": 2,
        "hash": "18740e0997e2a0f6b04756da5a9d7b44",
        "owner_id": "1913",
        "name": "Demo Company",
        "industry": "Alternative Dispute Resolution",
        "website": "https://www.php.net/manual",
        "email": "demo@gmail.com",
        "timezone": "",
        "address_line_1": "",
        "address_line_2": "",
        "postal_code": "",
        "city": "",
        "state": "",
        "country": "BD",
        "employees_number": "0",
        "description": "This is a demo company",
        "phone": "",
        "type": "active",
        "logo": "http://wp.test/wp-content/uploads/2022/11/1280px-Taka_Bengali_letter.svg_.png",
        "linkedin_url": "",
        "status": "active",
        "created_at": "2023-03-13 18:34:34",
        "updated_at": "2023-03-16 15:02:33",
        "contacts_count": 0,
        "owner": {
            "id": 1913,
            "user_id": "1",
            "hash": "eedc61a75aec6315291f11c96cfc036a",
            "contact_owner": null,
            "company_id": null,
            "prefix": "Mr",
            "first_name": "Demo",
            "last_name": "Owner",
            "email": "demo@gmail.com",
            "timezone": null,
            "address_line_1": "Rahim Tower, Subhanighat Bishwa Road",
            "address_line_2": "Sylhet",
            "postal_code": "3100",
            "city": "Sylhet",
            "state": "BD-60",
            "country": "BD",
            "ip": null,
            "latitude": null,
            "longitude": null,
            "total_points": "0",
            "life_time_value": "0",
            "phone": "01761152186",
            "status": "subscribed",
            "contact_type": "customer",
            "source": "web",
            "avatar": null,
            "date_of_birth": "1994-10-13",
            "created_at": "2022-09-12 06:18:49",
            "last_activity": "2023-03-29 11:39:14",
            "updated_at": "2023-03-29 11:39:14",
            "stats": {
                "emails": 14,
                "opens": 1,
                "clicks": 1
            },
            "full_name": "Demo Owner",
            "photo": "https://www.gravatar.com/avatar/eedc61a75aec6315291f11c96cfc036a?s=128&d=https%3A%2F%2Fui-avatars.com%2Fapi%2FNihar%2BDas/128"
        }
    }
}

This endpoint retrieves a specific company.

HTTP Request

Get company by id:
GET https://yourdomain.com/wp-json/fluent-crm/v2/companies/<ID>

Or get by 'name', 'email', 'phone':
GET https://yourdomain.com/wp-json/fluent-crm/v2/companies/0?find_by=email&find_by_value=demo@gmail.com

Create a new company


curl 'https://fcrm.test/wp-json/fluent-crm/v2/companies' \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD" \
  --data-raw 'name=Bluesky&description=This is bluesky company&email=bluesky%26authlab.io&phone=44+078+1961+0398&owner_id=14&employees_number=120&industry=IT-farm&type=Running&address_line_1=1+Union+Street&address_line_2=64+Cunnery+Rd&city=Swansea&state=Swansea&postal_code=SA1+3EE&country=GB&query_timestamp=1626770805540' \

The above command creates a new company in Fluent CRM and returns the data in JSON.

{
    "message": "Company has been created successfully",
    "company": {
        "name": "Bluesky",
        "description": "This is bluesky company",
        "phone": "44 078 1961 0398",
        "email": "",
        "owner_id": "14",
        "employees_number": true,
        "industry": "IT-farm",
        "type": "Running",
        "address_line_1": "1 Union Street",
        "address_line_2": "64 Cunnery Rd",
        "postal_code": "SA1 3EE",
        "city": "Swansea",
        "state": "Swansea",
        "country": "GB",
        "hash": "dc9d1ea355621a1dfcb2b9c58771dfa4",
        "updated_at": "2023-03-30 11:12:57",
        "created_at": "2023-03-30 11:12:57",
        "id": 3
    }
}

This endpoint creates a new company.

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/companies

URL Parameters

Parameter Type Required Description
name string yes Add Company's Name
description string no Add Company's Description
email email no Add Company's Email
phone string no Add Company's Phone Number
address_line_1 string no Add Company's Address Line 1
address_line_2 string no Add Company's Address Line 2
city string no Add Company's City
state string no Add Company's State
country string no Add Company's Country
postal_code string no Add Company's ZIP Code
type string no Add Company's Type
owner_id string no Add Company's Owner
employees_number integer no Add Company's employee number
industry string no Add Company's industry category

Possible type values:

Update any company data

curl 'https://fcrm.test/wp-json/fluent-crm/v2/companies/<ID>' \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD" \
  --data-raw 'name=BlueSky&description=This is bluesky company&email=bluesky%26authlab.io&phone=44+078+1961+0398&owner_id=14&employees_number=110&industry=IT-farm&type=Running&address_line_1=1+Union+Street&address_line_2=64+Cunnery+Rd' \

The above command JSON structured like this:

{
    "message": "Company has been updated",
    "company": {
        "id": 3,
        "hash": "dc9d1ea355621a1dfcb2b9c58771dfa4",
        "owner_id": "14",
        "name": "BlueSky",
        "industry": "IT-farm",
        "website": null,
        "email": "",
        "timezone": null,
        "address_line_1": "1 Union Street",
        "address_line_2": "64 Cunnery Rd",
        "postal_code": "SA1 3EE",
        "city": "Swansea",
        "state": "Swansea",
        "country": "GB",
        "employees_number": true,
        "description": "This is bluesky company",
        "phone": "44 078 1961 0398",
        "type": "Running",
        "logo": null,
        "linkedin_url": null,
        "status": null,
        "created_at": "2023-03-30 11:12:57",
        "updated_at": "2023-03-30 11:56:05"
    }
}

This endpoint update any company.

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/companies/<ID>

URL Parameters

Parameter Type Required Description
name string yes Add Company's Name
description string no Add Company's Description
email email no Add Company's Email
phone string no Add Company's Phone Number
address_line_1 string no Add Company's Address Line 1
address_line_2 string no Add Company's Address Line 2
city string no Add Company's City
state string no Add Company's State
country string no Add Company's Country
postal_code string no Add Company's ZIP Code
type string no Add Company's Type
owner_id string no Add Company's Owner
employees_number integer no Add Company's employee number
industry string no Add Company's industry category

Possible type values:

Update company's properties


curl 'https://fcrm.test/wp-json/fluent-crm/v2/companies/companies-property' \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD" \
  --data-raw 'property=type&value=Partner&companies[]=1&companies[]=2' \


The above command returns JSON structured like this:


{
    "message": "Company successfully updated"
}

This endpoint update company properties.

HTTP Request

PUT https://yourdomain.com/wp-json/fluent-crm/v2/companies/companies-property

URL Parameters

Parameter Type Required Description
property string yes Updateable properties are 'type', 'logo' or 'owner_id'
value string yes Value of 'type', 'logo' or 'owner_id'
companies array yes Update will apply to provided company ids

Possible type values:

Attach subscribers to company


curl 'https://fcrm.test/wp-json/fluent-crm/v2/companies/attach-subscribers' \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD" \
  --data-raw 'subscriber_ids[]=1980&subscriber_ids[]=1979&company_ids[]=1&company_ids[]=2' \


The above command returns JSON structured like this:

{
  "message": "Selected Companies has been attached successfully",
  "companies": [
    {
      "id": 1,
      "hash": "a9ba241222b3ba9f7158e006ffc28aa7",
      "owner_id": "1968",
      "name": "Hello",
      "industry": "Apparel & Fashion",
      "website": "",
      "email": "demo@d.com",
      "timezone": "",
      "address_line_1": "Tahirpur",
      "address_line_2": "Sylhet",
      "postal_code": "",
      "city": "",
      "state": "",
      "country": "",
      "employees_number": "0",
      "description": "Hello",
      "phone": "",
      "type": "Partner",
      "logo": "http://wp.test/wp-content/uploads/2022/03/pin.png",
      "linkedin_url": "",
      "status": "active",
      "created_at": "2023-03-13 15:05:45",
      "updated_at": "2023-03-30 14:55:33"
    },
    {
      "id": 2,
      "hash": "18740e0997e2a0f6b04756da5a9d7b44",
      "owner_id": "1913",
      "name": "Demo Company",
      "industry": "Alternative Dispute Resolution",
      "website": "https://www.php.net/manual",
      "email": "demo@gmail.com",
      "timezone": "",
      "address_line_1": "",
      "address_line_2": "",
      "postal_code": "",
      "city": "",
      "state": "",
      "country": "BD",
      "employees_number": "0",
      "description": "This is a demo company",
      "phone": "",
      "type": "Partner",
      "logo": "http://wp.test/wp-content/uploads/2022/11/1280px-Taka_Bengali_letter.svg_.png",
      "linkedin_url": "",
      "status": "active",
      "created_at": "2023-03-13 18:34:34",
      "updated_at": "2023-03-30 14:55:33"
    }
  ]
}

This endpoint update company properties.

HTTP Request

PUT https://yourdomain.com/wp-json/fluent-crm/v2/companies/attach-subscribers

URL Parameters

Parameter Type Required Description
subscriber_ids array yes Subscriber ids will be attached with company
company_ids array yes Company ids where subscribers will be attached

Detach subscribers to company


curl 'https://fcrm.test/wp-json/fluent-crm/v2/companies/detach-subscribers' \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD" \
  --data-raw 'subscriber_ids[]=1980&subscriber_ids[]=1979&company_ids[]=1&company_ids[]=2' \


The above command returns JSON structured like this:

{
  "message": "Company has been successfully detached",
  "companies": [],
  "last_primary_company_id": false
}

This endpoint update company properties.

HTTP Request

PUT https://yourdomain.com/wp-json/fluent-crm/v2/companies/detach-subscribers

URL Parameters

Parameter Type Required Description
subscriber_ids array yes Subscriber ids will be detached with company
company_ids array yes Company ids where subscribers will be detached

Delete a Specific Company

curl 'https://fcrm.test/wp-json/fluent-crm/v2/companies/3' \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD" \

The above command returns JSON structured like this:

{
  "message": "Company has been deleted successfully"
}

This endpoint deletes a specific company.

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/companies/<ID>

Lists

Get All Lists

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/lists' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "lists": [
        {
            "id": "2",
            "title": "User Two",
            "slug": "user-two",
            "description": null,
            "is_public": "0",
            "created_at": "2021-07-19 08:25:22",
            "updated_at": "2021-07-19 08:25:22",
            "totalCount": 1,
            "subscribersCount": 1
        },
        {
            "id": "1",
            "title": "User One",
            "slug": "user-one",
            "description": null,
            "is_public": "0",
            "created_at": "2021-07-19 08:25:22",
            "updated_at": "2021-07-19 08:25:22",
            "totalCount": 1,
            "subscribersCount": 1
        }
    ]
}

This endpoint returns all available lists.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/lists

URL Parameters

Parameter Description
sort_by Sort your list by id, title, subscribers
sort_order Give a sorting order of the list DESC or ASC
search Search by title, slug, description
Other Parameters Description
exclude_counts Give exclude count status true or false. If false then return totalCount, subscribersCount with every list

Retrieve a List

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/lists/4' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "title": "User List",
  "slug": "user-list",
  "description": "",
  "updated_at": "2021-07-20 13:18:19",
  "created_at": "2021-07-20 13:18:19",
  "id": 4
}

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/lists/<ID>

This endpoint will return a list.

Create a new list

curl --location --request POST 'https://yourdomai.com/wp-json/fluent-crm/v2/lists?title=New List&slug=new-data' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "lists": {
        "title": "New List",
        "slug": "new-data",
        "description": "",
        "updated_at": "2021-07-20 13:18:19",
        "created_at": "2021-07-20 13:18:19",
        "id": 4
    },
    "message": "Successfully saved the list."
}

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/lists/

URL Parameters

Parameter Description
title Add name to your list.
slug Add slug name to your list.
description Add Internal Subtitle.

This endpoint will create a new list.

Update any list

curl --location --request PUT 'https://yourdomain.com/wp-json/fluent-crm/v2/lists/1?title=New Title' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "lists": "1",
  "message": "Successfully saved the list."
}

HTTP Request

PUT https://yourdomain.com/wp-json/fluent-crm/v2/lists/<ID>

URL Parameters

Parameter Description
title Add name to your list.
slug Add slug name to your list.
description Add Internal Subtitle.

This endpoint will update a specific list.

Delete a specific list

curl --location --request DELETE 'https://yourdomain.com/wp-json/fluent-crm/v2/lists/<ID>' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "message": "Successfully removed the list."
}

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/lists/<ID>

This endpoint will delete a specific list.

Tags

Get All Tags

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/tags' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "tags": [
        {
            "id": "2",
            "title": "User Two",
            "slug": "user-two",
            "description": null,
            "is_public": "0",
            "created_at": "2021-07-19 08:25:22",
            "updated_at": "2021-07-19 08:25:22",
            "totalCount": 1,
            "subscribersCount": 1
        },
        {
            "id": "1",
            "title": "User One",
            "slug": "user-one",
            "description": null,
            "is_public": "0",
            "created_at": "2021-07-19 08:25:22",
            "updated_at": "2021-07-19 08:25:22",
            "totalCount": 1,
            "subscribersCount": 1
        }
    ]
}

This endpoint returns all available tags.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/tags

URL Parameters

Parameter Description
sort_by Sort your tag by id, title, subscribers
sort_order Give a sorting order of the tag DESC or ASC
search Search by title, slug, description
Other Parameters Description
exclude_counts Give exclude count status true or false. If false then return totalCount, subscribersCount with every tag
all_tags Give all tags status true or false. If you want to get only id, title and slug only, then give value true

Retrieve a Tag

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/tags/4' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "tag": {
        "title": "User Tag",
        "slug": "user-tag",
        "description": "",
        "updated_at": "2021-07-20 13:18:19",
        "created_at": "2021-07-20 13:18:19",
        "id": 4
    }
}

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/tags/<ID>

This endpoint will return a tag.

Create a new Tag

curl --location --request POST 'https://yourdomain.com/wp-json/fluent-crm/v2/tags?title=New Tag&slug=new-data' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "tags": {
        "title": "New Tag",
        "slug": "new-data",
        "description": "",
        "updated_at": "2021-07-20 13:18:19",
        "created_at": "2021-07-20 13:18:19",
        "id": 4
    },
    "message": "Successfully saved the tag."
}

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/tags/

URL Parameters

Parameter Description
title Add name to your tag.
slug Add slug name to your tag.
description Add Internal Subtitle.

This endpoint will create a new tag.

Update any Tag

curl --location --request PUT 'https://yourdomain.com/wp-json/fluent-crm/v2/tags/1?title=New Title' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "tags": "1",
  "message": "Successfully saved the tag."
}

HTTP Request

PUT https://yourdomain.com/wp-json/fluent-crm/v2/tags/<ID>

URL Parameters

Parameter Description
title Add name to your tag.
slug Add slug name to your tag.
description Add Internal Subtitle.

This endpoint will update a specific tag.

Delete a specific Tag

curl --location --request DELETE 'https://yourdomain.com/wp-json/fluent-crm/v2/tags/<ID>' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "message": "Successfully removed the tag."
}

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/tags/<ID>

This endpoint will delete a specific tag.

Email Templates

Get All Email Templates

curl "https://yourdomain.com/wp-json/fluent-crm/v2/templates" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
    "templates": {
        "total": 18,
        "per_page": 15,
        "current_page": 1,
        "last_page": 2,
        "next_page_url": "/wp-json/fluent-crm/v2/templates?page=2",
        "prev_page_url": null,
        "from": 1,
        "to": 15,
        "data": [
            {
                "ID": 713,
                "post_author": "1",
                "post_date": "2022-08-08 06:46:21",
                "post_date_gmt": "2022-08-08 06:46:21",
                "post_content": "<!-- wp:paragraph -->\n<p>Start Writing Here</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:buttons -->\n<div class=\"wp-block-buttons\"><!-- wp:button {\"style\":{\"border\":{\"radius\":\"5px\"}}} -->\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link\" style=\"border-radius:5px\">hello</a></div>\n<!-- /wp:button --></div>\n<!-- /wp:buttons -->",
                "post_title": "Post title",
                "post_excerpt": "Post Excerpt",
                "post_status": "draft",
                "comment_status": "closed",
                "ping_status": "closed",
                "post_password": "",
                "post_name": "",
                "to_ping": "",
                "pinged": "",
                "post_modified": "2022-08-08 08:16:07",
                "post_modified_gmt": "2022-08-08 08:16:07",
                "post_content_filtered": "",
                "post_parent": "0",
                "guid": "http://test-plugins.test/?p=713",
                "menu_order": "0",
                "post_type": "fc_template",
                "post_mime_type": "",
                "comment_count": "0"
            }
        ]
    }
}

This endpoint retrieves all email Templates.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/templates

URL Parameters

Parameter Type Description Default
per_page int Records per page
page int Page Number for Pagination
search string Search Parameter for filtering templates
order_by string Order By template column Value to sort tmeplates ID
order_type string Order Type template column Value to sort templates desc

Get a Specific Email Template

curl "https://yourdomain.com/wp-json/fluent-crm/v2/templates/<ID>" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
    "template": {
        "post_title": "Post Title",
        "post_content": "<!-- wp:paragraph -->\n<p>Start Writing Here</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading -->\n<h2 id=\"cool\">Cool</h2>\n<!-- /wp:heading -->",
        "post_excerpt": "Post Excerpt",
        "email_subject": "Email Subject",
        "edit_type": "html",
        "design_template": "simple",
        "settings": {
            "template_config": {
                "content_width": "700",
                "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
                "text_color": "#202020",
                "link_color": "",
                "headings_color": "#202020",
                "body_bg_color": "#FF0000",
                "content_bg_color": "#FFFFFF",
                "footer_text_color": "#202020",
                "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
                "disable_footer": "no"
            }
        }
    }
}

This endpoint retrieves a specific email template.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/templates/<ID>

Create a new email template


curl 'https://fcrm.test/wp-json/fluent-crm/v2/templates' \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD" \
  --data-raw 'template[post_title]=Test&template[post_content]=Start Writing&template[post_excerpt]=Post Excerpt&template[design_template]=simple&template[email_subject]=Subject&template[edit_type]=html' \

The above command creates a new email template in Fluent CRM and returns the data in JSON.

{
    "message": "Template successfully created",
    "template_id": 1
}

This endpoint creates a new email template.

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/templates

URL Parameters

Parameter Type Required Description Default
template[post_title] string no Add title of a tmeplate
template[post_content] string no Add content of a tmeplate
template[post_excerpt] string no Add excerpt of a tmeplate
template[email_subject] string no Add email subject of a tmeplate
template[edit_type] string no Add edit type of a tmeplate html
template[design_template] string no Add design type of a tmeplate simple

Possible design_template values:

Duplicate a email template


{
    "message": "Template successfully duplicated",
    "template_id": 1
}

This endpoint duplicate a template.

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/templates/duplicate/<ID>

Update any email template data


The above command JSON structured like this:

{
  "message": "Template successfully updated",
  "template_id": "1"
}

This endpoint update a specific email template. Make sure you are passing the data in body as raw JSON format. Below there's an example added.
{ "template":{ "post_title": "Updated Title", "post_content": "Start Writing Here", "post_excerpt": "updated excerpt", "email_subject": "updated email subject", "design_template": "simple" } }

HTTP Request

PUT https://fcrm.test/wp-json/fluent-crm/v2/templates/<ID>

URL Parameters

Parameter Type Required Description
template[post_title] string no Add title of a tmeplate
template[post_content] string no Add content of a tmeplate
template[post_excerpt] string no Add excerpt of a tmeplate
template[email_subject] string no Add email subject of a tmeplate
template[edit_type] string no Add edit type of a tmeplate
template[design_template] string no Add design type of a tmeplate

Possible design_template values:

Delete Email Templates


{
  "message": "The template has been deleted successfully."
}

This endpoint deletes a specific email template.

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/templates/<ID>

Delete Multiple email templates

POST https://yourdomain.com/wp-json/fluent-crm/v2/templates/do-bulk-action

This endpoint deletes multiple email templates. Make sure you are passing the data in body as raw JSON format. Below there's an example added: { "action_name": "delete_templates", "template_ids": [1, 2] }

URL Parameters

Parameter type Description
template_ids array The ID of the template to delete

Email Sequences

Get All Email Sequences

curl "https://yourdomain.com/wp-json/fluent-crm/v2/sequences" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
  "sequences": {
    "total": 4,
    "per_page": 15,
    "current_page": 1,
    "last_page": 1,
    "next_page_url": null,
    "prev_page_url": null,
    "from": 1,
    "to": 4,
    "data": [
      {
        "id": 2,
        "parent_id": null,
        "type": "email_sequence",
        "title": "First Sequence",
        "available_urls": null,
        "slug": "first-sequence",
        "status": "draft",
        "template_id": null,
        "email_subject": null,
        "email_pre_header": null,
        "email_body": "",
        "recipients_count": 0,
        "delay": "0",
        "utm_status": "0",
        "utm_source": null,
        "utm_medium": null,
        "utm_campaign": null,
        "utm_term": null,
        "utm_content": null,
        "design_template": "simple",
        "scheduled_at": null,
        "settings": {
          "mailer_settings": {
            "from_name": "",
            "from_email": "",
            "reply_to_name": "",
            "reply_to_email": "",
            "is_custom": "no"
          }
        },
        "created_by": "1",
        "created_at": "2022-02-07 09:54:19",
        "updated_at": "2022-02-07 09:54:19",
        "stats": {
          "emails": 2,
          "subscribers": 4
        }
      }
    ]
  }
}

This endpoint retrieves all email sequences.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/sequences

URL Parameters

Parameter Type Description Default
per_page int Records per page
page int Page Number for Pagination
search string Search Parameter for filtering sequences
orderBy string Order By sequence column Value to sort sequences id
order string Order Type sequence column Value to sort sequences DESC
with[] array Get Additional Sequence Meta Properties

Possible with parameters:

Get a Specific email sequence

curl "https://yourdomain.com/wp-json/fluent-crm/v2/sequences/<ID>?with[]=sequence_emails&with[]=email_stats" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
  "sequence": {
    "id": 1,
    "parent_id": null,
    "type": "email_sequence",
    "title": "Test Sequence",
    "available_urls": null,
    "slug": "test-sequence",
    "status": "draft",
    "template_id": null,
    "email_subject": null,
    "email_pre_header": null,
    "email_body": "",
    "recipients_count": 0,
    "delay": "0",
    "utm_status": "0",
    "utm_source": null,
    "utm_medium": null,
    "utm_campaign": null,
    "utm_term": null,
    "utm_content": null,
    "design_template": "simple",
    "scheduled_at": null,
    "settings": {
      "mailer_settings": {
        "from_name": "",
        "from_email": "",
        "reply_to_name": "",
        "reply_to_email": "",
        "is_custom": "no"
      }
    },
    "created_by": "1",
    "created_at": "2022-02-14 04:49:14",
    "updated_at": "2022-02-14 04:49:14"
  },
  "sequence_emails": [
    {
      "id": 1,
      "parent_id": "1",
      "type": "sequence_mail",
      "title": "Fatal Error?",
      "available_urls": null,
      "slug": "fatal-error",
      "status": "published",
      "template_id": "0",
      "email_subject": "Fatal Error?",
      "email_pre_header": "Test Header",
      "email_body": "<!-- wp:paragraph -->\n<p>Start Writing Here</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading {\"style\":{\"color\":{\"text\":\"#2c7df6\"}}} -->\n<h2 class=\"has-text-color\" id=\"i-am-here\" style=\"color:#2c7df6\">I am here</h2>\n<!-- /wp:heading -->",
      "recipients_count": "0",
      "delay": "60",
      "utm_status": "0",
      "utm_source": null,
      "utm_medium": null,
      "utm_campaign": null,
      "utm_term": null,
      "utm_content": null,
      "design_template": "simple",
      "scheduled_at": null,
      "settings": {
        "timings": {
          "delay_unit": "minutes",
          "delay": "1",
          "is_anytime": "yes",
          "sending_time": ""
        },
        "template_config": {
          "content_width": "700",
          "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
          "text_color": "#202020",
          "link_color": "",
          "headings_color": "#202020",
          "body_bg_color": "#FAFAFA",
          "content_bg_color": "#FFFFFF",
          "footer_text_color": "#202020",
          "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
          "disable_footer": "no"
        },
        "mailer_settings": {
          "from_name": "",
          "from_email": "",
          "reply_to_name": "",
          "reply_to_email": "",
          "is_custom": "no"
        }
      },
      "created_by": "1",
      "created_at": "2022-02-14 04:50:06",
      "updated_at": "2022-02-14 04:50:06",
      "stats": {
        "total": 0,
        "sent": 0,
        "clicks": 0,
        "views": 0,
        "unsubscribers": 0,
        "revenue": false
      }
    }
  ]
}

This endpoint retrieves a specific email sequence.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/sequences/<ID>

URL Parameters

Parameter Type Description
with[] array Get Additional Sequence Meta Properties

Possible with parameters:

Get Email Sequences by specific Subscriber

curl "https://yourdomain.com/wp-json/fluent-crm/v2/sequences/subscriber/<ID>/sequences" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
    "sequence_trackers": {
        "total": 1,
        "per_page": 15,
        "current_page": 1,
        "last_page": 1,
        "next_page_url": null,
        "prev_page_url": null,
        "from": 1,
        "to": 1,
        "data": [
            {
                "id": 1,
                "campaign_id": "2",
                "last_sequence_id": "13",
                "subscriber_id": "17210",
                "next_sequence_id": null,
                "status": "completed",
                "type": "sequence_tracker",
                "last_executed_time": "2022-08-25 08:56:51",
                "next_execution_time": null,
                "notes": null,
                "created_at": "2022-08-25 08:56:51",
                "updated_at": "2022-08-25 08:56:51",
                "sequence": {
                    "id": 2,
                    "parent_id": null,
                    "type": "email_sequence",
                    "title": "First Sequence",
                    "available_urls": null,
                    "slug": "first-sequence",
                    "status": "draft",
                    "template_id": null,
                    "email_subject": null,
                    "email_pre_header": null,
                    "email_body": "",
                    "recipients_count": 0,
                    "delay": "0",
                    "utm_status": "0",
                    "utm_source": null,
                    "utm_medium": null,
                    "utm_campaign": null,
                    "utm_term": null,
                    "utm_content": null,
                    "design_template": "simple",
                    "scheduled_at": null,
                    "settings": {
                        "mailer_settings": {
                            "from_name": "",
                            "from_email": "",
                            "reply_to_name": "",
                            "reply_to_email": "",
                            "is_custom": "no"
                        }
                    },
                    "created_by": "1",
                    "created_at": "2022-02-07 09:54:19",
                    "updated_at": "2022-02-07 09:54:19"
                },
                "last_sequence": {
                    "id": 13,
                    "parent_id": "2",
                    "type": "sequence_mail",
                    "title": "Rounded Button",
                    "available_urls": null,
                    "slug": "rounded-button",
                    "status": "published",
                    "template_id": "315",
                    "email_subject": "Rounded Button",
                    "email_pre_header": "Rounded button",
                    "email_body": "<!-- wp:paragraph -->\n<p>Start Writing Here</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:buttons -->\n<div class=\"wp-block-buttons\"><!-- wp:button {\"style\":{\"border\":{\"radius\":\"100px\"}}} -->\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link\" style=\"border-radius:100px\">Rounded button</a></div>\n<!-- /wp:button --></div>\n<!-- /wp:buttons -->",
                    "recipients_count": "0",
                    "delay": "60",
                    "utm_status": "0",
                    "utm_source": null,
                    "utm_medium": null,
                    "utm_campaign": null,
                    "utm_term": null,
                    "utm_content": null,
                    "design_template": "simple",
                    "scheduled_at": null,
                    "settings": {
                        "timings": {
                            "delay_unit": "minutes",
                            "delay": "1",
                            "is_anytime": "yes",
                            "sending_time": ""
                        },
                        "template_config": {
                            "content_width": "700",
                            "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
                            "text_color": "#202020",
                            "link_color": "",
                            "headings_color": "#202020",
                            "body_bg_color": "#FAFAFA",
                            "content_bg_color": "#FFFFFF",
                            "footer_text_color": "#202020",
                            "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
                            "disable_footer": "no"
                        },
                        "mailer_settings": {
                            "from_name": "",
                            "from_email": "",
                            "reply_to_name": "",
                            "reply_to_email": "",
                            "is_custom": "no"
                        }
                    },
                    "created_by": "1",
                    "created_at": "2022-03-04 05:07:53",
                    "updated_at": "2022-03-04 05:07:53"
                },
                "next_sequence": null
            }
        ]
    }
}

This endpoint get email sequences by specific subscriber.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/sequences/subscriber/<ID>/sequences

Note: Use subscriber's ID

URL Parameters

Parameter Type Description
per_page int Records per page
page int Page Number for Pagination

Get Subscribers from a specific email sequence

curl "https://yourdomain.com/wp-json/fluent-crm/v2/sequences/<ID>/subscribers" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
    "total": 1,
    "per_page": 15,
    "current_page": 1,
    "last_page": 1,
    "next_page_url": null,
    "prev_page_url": null,
    "from": 1,
    "to": 1,
    "data": [
        {
            "id": 1,
            "campaign_id": "1",
            "last_sequence_id": "1",
            "subscriber_id": "1",
            "next_sequence_id": null,
            "status": "completed",
            "type": "sequence_tracker",
            "last_executed_time": "2022-08-25 08:44:16",
            "next_execution_time": null,
            "notes": null,
            "created_at": "2022-08-25 08:44:16",
            "updated_at": "2022-08-25 08:44:16",
            "subscriber": {
                "id": 1,
                "user_id": null,
                "hash": "67a7a8ce2603f193447d52fc0fb8f745",
                "contact_owner": null,
                "company_id": null,
                "prefix": null,
                "first_name": "",
                "last_name": "",
                "email": "mafobit507@kuruapp.com",
                "timezone": null,
                "address_line_1": "",
                "address_line_2": "",
                "postal_code": "1001",
                "city": "City",
                "state": "State",
                "country": "UK",
                "ip": null,
                "latitude": null,
                "longitude": null,
                "total_points": "0",
                "life_time_value": "0",
                "phone": "75456345",
                "status": "subscribed",
                "contact_type": "lead",
                "source": null,
                "avatar": null,
                "date_of_birth": "0000-00-00",
                "created_at": "2022-03-29 06:19:10",
                "last_activity": null,
                "updated_at": "2022-08-16 11:29:26",
                "full_name": "",
                "photo": "https://www.gravatar.com/avatar/67a7a8ce2603f193447d52fc0fb8f745?s=128"
            }
        }
    ]
}

This endpoint get subscribers from a email sequence.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/sequences/<ID>/subscribers

URL Parameters

Parameter type Description Default
per_page int Records per page
page int Page Number for Pagination

Duplicate a Specific email sequence

curl "https://yourdomain.com/wp-json/fluent-crm/v2/sequences/<ID>/duplicate" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
    "sequence": {
        "title": "[Duplicate] Test Sequence",
        "settings": {
            "mailer_settings": {
                "from_name": "",
                "from_email": "",
                "reply_to_name": "",
                "reply_to_email": "",
                "is_custom": "no"
            }
        },
        "design_template": "simple",
        "email_body": "",
        "status": "draft",
        "type": "email_sequence",
        "slug": "duplicate-test-sequence",
        "created_by": 0,
        "updated_at": "2022-08-25 08:21:45",
        "created_at": "2022-08-25 08:21:45",
        "id": 2
    },
    "message": "Selected sequence has been successfully duplicated"
}

This endpoint duplicate a email sequence.

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/sequences/<ID>/duplicate

Delete Email Sequence

curl "https://yourdomain.com/wp-json/fluent-crm/v2/sequences/<ID>" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
  "message": "Email sequence successfully deleted"
}
curl "https://yourdomain.com/wp-json/fluent-crm/v2/sequences/do-bulk-action?sequence_ids[]=1&sequence_ids[]=2" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
  "message": "Selected Sequences has been deleted permanently"
}

This endpoint deletes a specific email sequence.

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/sequences/<ID>

Delete multiple email sequences

POST https://yourdomain.com/wp-json/fluent-crm/v2/sequences/do-bulk-action

This endpoint deletes multiple email sequences. Make sure you are passing the data in body as raw JSON format. Below there's an example added:

{ "sequence_ids": [1, 2] }

URL Parameters

Parameter type Description
sequence_ids array The ID of the sequence to delete

Automation Funnels

Get All Funnels

curl "https://yourdomain.com/wp-json/fluent-crm/v2/funnels?with[]=triggers" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
    "funnels": {
        "total": 1,
        "per_page": 15,
        "current_page": 1,
        "last_page": 1,
        "next_page_url": null,
        "prev_page_url": null,
        "from": 1,
        "to": 1,
        "data": [
            {
                "id": 1,
                "type": "funnels",
                "title": "Lists Applied",
                "trigger_name": "fluentcrm_contact_added_to_lists",
                "status": "published",
                "conditions": {
                    "run_multiple": "yes"
                },
                "settings": {
                    "lists": [
                        "1"
                    ],
                    "select_type": "any"
                },
                "created_by": "1",
                "created_at": "2022-05-16 08:26:28",
                "updated_at": "2022-06-28 06:22:55",
                "subscribers_count": 0
            }
        ]
    },
    "triggers": {
        "edd_update_payment_status": {
            "category": "Easy Digital Downloads",
            "label": "Edd - New Order Success",
            "description": "This Funnel will start once new order will be added as successful payment",
            "icon": "fc-icon-edd_new_order_success"
        },
        "user_register": {
            "category": "WordPress Triggers",
            "label": "New User Sign Up",
            "description": "This Funnel will be initiated when a new user has been registered in your site",
            "icon": "fc-icon-wp_new_user_signup"
        },
        "pmpro_after_change_membership_level": {
            "category": "Paid Membership Pro",
            "label": "Membership Level assignment of a User",
            "icon": "fc-icon-paid_membership_pro_user_level",
            "description": "This funnel will start when a user is assigned to specified membership levels"
        },
        "pmpro_membership_post_membership_expiry": {
            "category": "Paid Membership Pro",
            "label": "Membership Level Expiration",
            "icon": "fc-icon-membership_level_ex_pmp",
            "description": "This funnel will start when a membership has been expired for a user"
        },
        "mepr-account-is-active": {
            "category": "MemberPress",
            "label": "A member added to a membership level",
            "icon": "fc-icon-memberpress_membership",
            "description": "This funnel will start when a membership level get activated for a member"
        },
        "rcp_membership_post_activate": {
            "category": "Restrict Content Pro",
            "label": "A member added to a membership level",
            "icon": "fc-icon-rcp_membership_level",
            "description": "This funnel will start when a member is added to a level for the first time"
        },
        "learndash_update_course_access": {
            "category": "LearnDash",
            "label": "Enrolls in a Course",
            "icon": "fc-icon-learndash_enroll_course",
            "description": "This funnel will start when a student is enrolled in a course"
        },
        "rcp_membership_post_cancel": {
            "category": "Restrict Content Pro",
            "label": "Membership cancelled",
            "icon": "fc-icon-rcp_membership_cancle",
            "description": "This funnel will start when a membership has been cancelled"
        },
        "learndash_course_completed": {
            "category": "LearnDash",
            "label": "Completes a Course",
            "icon": "fc-icon-learndash_complete_course",
            "description": "This Funnel will start when a student completes a course"
        },
        "wp_login": {
            "category": "WordPress Triggers",
            "label": "User Login",
            "description": "This Funnel will be initiated when a user login to your site",
            "icon": "fc-icon-wp_new_user_signup"
        },
        "fluentcrm_contact_added_to_lists": {
            "category": "CRM",
            "label": "List Applied",
            "description": "This will run when selected lists have been applied to a contact",
            "icon": "fc-icon-list_applied_2"
        },
        "fluentcrm_contact_removed_from_lists": {
            "category": "CRM",
            "label": "List Removed",
            "description": "This will run when selected lists have been removed from a contact",
            "icon": "fc-icon-list_removed"
        },
        "fluentcrm_contact_added_to_tags": {
            "category": "CRM",
            "label": "Tag Applied",
            "description": "This will run when selected tags have been applied to a contact",
            "icon": "fc-icon-tag_applied"
        },
        "fluentcrm_contact_removed_from_tags": {
            "category": "CRM",
            "label": "Tag Removed",
            "description": "This will run when selected Tags have been removed from a contact",
            "icon": "fc-icon-tag_removed"
        },
        "woocommerce_order_status_processing": {
            "category": "WooCommerce",
            "label": "New Order (Processing)",
            "description": "This Funnel will start once new order has been placed as processing",
            "icon": "fc-icon-woo_new_order"
        },
        "woocommerce_order_status_completed": {
            "category": "WooCommerce",
            "label": "Order Completed",
            "icon": "fc-icon-woo_order_complete",
            "description": "This Funnel will start once new order has been marked as completed"
        },
        "woocommerce_order_refunded": {
            "category": "WooCommerce",
            "label": "Order Refunded",
            "icon": "fc-icon-woo_refund",
            "description": "This Automation will start once an order get refunded"
        },
        "learndash_lesson_completed": {
            "category": "LearnDash",
            "label": "Completes a Lesson",
            "icon": "fc-icon-learndash_complete_lesson",
            "description": "This Funnel will start a student completes a lesson"
        },
        "learndash_topic_completed": {
            "category": "LearnDash",
            "label": "Completes a Topic",
            "description": "This funnel will start when a user is completes a lesson topic"
        },
        "ld_added_group_access": {
            "category": "LearnDash",
            "label": "Enrolls in a Group",
            "icon": "fc-icon-learndash_course_group",
            "description": "This funnel will start when a user is enrolled in a group"
        },
        "mepr-event-transaction-expired": {
            "category": "MemberPress",
            "label": "A Subscription expired",
            "description": "This funnel will start when a subscription has been expired"
        },
        "woocommerce_order_status_changed": {
            "category": "WooCommerce",
            "label": "Order Status Changed",
            "description": "This Funnel will start when a Order status will change from one state to another",
            "icon": "fc-icon-woo"
        },
        "fluentform_submission_inserted": {
            "category": "CRM",
            "label": "New Form Submission (Fluent Forms)",
            "description": "This Funnel will be initiated when a new form submission has been submitted",
            "icon": "fc-icon-fluentforms"
        }
    }
}

This endpoint retrieves all funnels.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/funnels

URL Parameters

Parameter Type Description Default
per_page int Records per page
page int Page Number for Pagination
search string Search Parameter for filtering funnels
sort_by string Order By funnel column Value to sort funnels id
sort_type string Order Type funnel column Value to sort funnels DESC
with[] array Get Additional funnel Meta Properties

Possible with parameters:

Get a Specific funnel

curl "https://yourdomain.com/wp-json/fluent-crm/v2/funnels/<ID>" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
  "funnel": {
    "id": 1,
    "type": "funnels",
    "title": "ss",
    "trigger_name": "fluentcrm_contact_added_to_lists",
    "status": "published",
    "conditions": {
      "run_multiple": "yes"
    },
    "settings": {
      "lists": [
        "19"
      ],
      "select_type": "any"
    },
    "created_by": "1",
    "created_at": "2022-08-16 06:22:48",
    "updated_at": "2022-08-18 02:56:36",
    "trigger": {
      "category": "CRM",
      "label": "List Applied",
      "description": "This will run when selected lists have been applied to a contact",
      "icon": "fc-icon-list_applied_2"
    },
    "settingsFields": {
      "title": "List Applied",
      "sub_title": "This will run when selected lists have been applied to a contact",
      "fields": {
        "lists": {
          "type": "option_selectors",
          "option_key": "lists",
          "is_multiple": true,
          "label": "Select Lists",
          "placeholder": "Select List"
        },
        "select_type": {
          "label": "Run When",
          "type": "radio",
          "options": [
            {
              "id": "any",
              "title": "contact added in any of the selected lists"
            },
            {
              "id": "all",
              "title": "contact added in all of the selected lists"
            }
          ],
          "dependency": {
            "depends_on": "lists",
            "operator": "!=",
            "value": []
          }
        }
      }
    },
    "conditionFields": {
      "run_multiple": {
        "type": "yes_no_check",
        "label": "",
        "check_label": "Restart the Automation Multiple times for a contact for this event. (Only enable if you want to restart automation for the same contact)",
        "inline_help": "If you enable, then it will restart the automation for a contact if the contact already in the automation. Otherwise, It will just skip if already exist"
      }
    },
    "description": ""
  }
}

This endpoint retrieves all funnels.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/funnels/<ID>

URL Parameters

Parameter Type Description Default
with[] array Get Additional funnel Meta Properties

Possible with parameters:

Get Subscribers from a specific funnel

curl "https://yourdomain.com/wp-json/fluent-crm/v2/funnels/<ID>/subscribers" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
    "funnel_subscribers": {
        "total": 1,
        "per_page": 15,
        "current_page": 1,
        "last_page": 1,
        "next_page_url": null,
        "prev_page_url": null,
        "from": 1,
        "to": 1,
        "data": [
            {
                "id": 199,
                "funnel_id": "25",
                "starting_sequence_id": null,
                "next_sequence": "6",
                "subscriber_id": "17216",
                "last_sequence_id": "45",
                "next_sequence_id": "43",
                "last_sequence_status": "complete",
                "status": "cancelled",
                "type": "funnel",
                "last_executed_time": "2022-08-19 10:46:24",
                "next_execution_time": "2022-08-19 12:00:24",
                "notes": null,
                "source_trigger_name": "fluentcrm_contact_added_to_lists",
                "source_ref_id": null,
                "created_at": "2022-08-19 10:45:12",
                "updated_at": "2022-08-19 10:50:51",
                "subscriber": {
                    "id": 17216,
                    "user_id": null,
                    "hash": "fe48b7b2cb1f37b5f11dfbbac11d9a73",
                    "contact_owner": null,
                    "company_id": null,
                    "prefix": null,
                    "first_name": "fname",
                    "last_name": "lname",
                    "email": "example@gmail.com",
                    "timezone": null,
                    "address_line_1": null,
                    "address_line_2": null,
                    "postal_code": null,
                    "city": null,
                    "state": null,
                    "country": null,
                    "ip": "127.0.0.1",
                    "latitude": null,
                    "longitude": null,
                    "total_points": "0",
                    "life_time_value": "0",
                    "phone": null,
                    "status": "unsubscribed",
                    "contact_type": "lead",
                    "source": "FluentForms",
                    "avatar": null,
                    "date_of_birth": null,
                    "created_at": "2022-08-19 10:45:12",
                    "last_activity": "2022-08-19 10:50:10",
                    "updated_at": "2022-08-19 10:50:51",
                    "full_name": "fname lname",
                    "photo": "https://www.gravatar.com/avatar/fe48b7b2cb1f37b5f11dfbbac11d9a73?s=128"
                },
                "last_sequence": null,
                "next_sequence_item": null,
                "metrics": [
                    {
                        "id": 1,
                        "funnel_id": "1",
                        "sequence_id": "1",
                        "subscriber_id": "1",
                        "benchmark_value": "0",
                        "benchmark_currency": "USD",
                        "status": "completed",
                        "notes": null,
                        "created_at": "2022-08-19 10:46:22",
                        "updated_at": "2022-08-19 10:46:22"
                    }
                ]
            }
        ]
    }
}

This endpoint get subscribers from a specific funnel.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/funnels/<ID>/subscribers

URL Parameters

Parameter Type Description
per_page int Records per page
page int Page Number for Pagination
search string Search Parameter for filtering subscribers
status string Status slugs to filter subscribers
with array Get Additional subscriber Meta Properties

Possible with parameters:

Duplicate a Specific Funnel

curl "https://yourdomain.com/wp-json/fluent-crm/v2/funnels/<ID>/clone" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
  "message": "Funnel has been successfully cloned",
  "funnel": {
    "title": "[Copy] List Apply Trigger",
    "trigger_name": "fluentcrm_contact_added_to_lists",
    "status": "draft",
    "conditions": {
      "run_multiple": "yes"
    },
    "settings": {
      "lists": [
        "3"
      ],
      "select_type": "any"
    },
    "created_by": 0,
    "type": "funnels",
    "updated_at": "2022-08-30 03:43:01",
    "created_at": "2022-08-30 03:43:01",
    "id": 3
  }
}

This endpoint duplicate a email sequence.

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/funnels/<ID>/clone

Get report of a Specific Funnel

curl "https://yourdomain.com/wp-json/fluent-crm/v2/funnels/<ID>/report" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
    "stats": {
        "metrics": [
            {
                "label": "Entrance",
                "count": 6,
                "sequence_id": 0,
                "type": "root",
                "percent": 100,
                "percent_text": 100,
                "previous_step_count": 6,
                "drop_count": 0,
                "drop_percent": 0
            }
        ],
        "total_revenue": 0,
        "total_revenue_formatted": "0.00",
        "revenue_currency": "USD"
    }
}

This endpoint get report of a specific funnel.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/funnels/<ID>/report

Delete Funnel

curl "https://yourdomain.com/wp-json/fluent-crm/v2/funnels/<ID>" \
  -H "Authorization: BASIC API_USERNAME:API_PASSWORD"

The above command returns JSON structured like this:

{
  "message": "Funnel has been deleted"
}

This endpoint deletes funnels.

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/funnels/<ID>

Delete multiple funnels

POST https://yourdomain.com/wp-json/fluent-crm/v2/funnels/do-bulk-action

This endpoint deletes funnels. Make sure you are passing the data in body as raw JSON format. Below there's an example added:

{ "action_name": "delete_funnels", "funnel_ids": [1, 2] }

URL Parameters

Parameter type Description
funnel_ids array The ID of the funnel to delete

Campaigns

Get All Campaigns

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "campaigns": {
    "total": 14,
    "per_page": 15,
    "current_page": 1,
    "last_page": 1,
    "next_page_url": null,
    "prev_page_url": null,
    "from": 1,
    "to": 14,
    "data": [
      {
        "id": 52,
        "parent_id": null,
        "type": "campaign",
        "title": "Testing mail",
        "available_urls": null,
        "slug": "testing-mail",
        "status": "archived",
        "template_id": "0",
        "email_subject": "Testing mail header",
        "email_pre_header": "Testing mail pre-header",
        "email_body": "<!-- wp:paragraph -->\n<p>This is testing mail</p>\n<!-- /wp:paragraph -->",
        "recipients_count": 44,
        "delay": "0",
        "utm_status": "0",
        "utm_source": "",
        "utm_medium": "",
        "utm_campaign": "",
        "utm_term": "",
        "utm_content": "",
        "design_template": "simple",
        "scheduled_at": "2022-08-19 10:47:19",
        "settings": {
          "mailer_settings": {
            "from_name": "",
            "from_email": "",
            "reply_to_name": "",
            "reply_to_email": "",
            "is_custom": "no"
          },
          "subscribers": [
            {
              "list": "2",
              "tag": "all"
            }
          ],
          "excludedSubscribers": null,
          "sending_filter": "list_tag",
          "dynamic_segment": {
            "id": "",
            "slug": ""
          },
          "template_config": {
            "content_width": "700",
            "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
            "text_color": "#202020",
            "link_color": "",
            "headings_color": "#202020",
            "body_bg_color": "#FAFAFA",
            "content_bg_color": "#FFFFFF",
            "footer_text_color": "#202020",
            "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
            "disable_footer": "no"
          },
          "advanced_filters": [
            []
          ]
        },
        "created_by": "1",
        "created_at": "2022-08-19 10:38:32",
        "updated_at": "2022-08-19 10:47:29"
      }
    ]
  }
}

This endpoint returns all available campaign.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/campaigns

URL Parameters

Parameter Type Description
searchBy string Search by title
sort_type string Give a sorting order of the list DESC or ASC
sort_by string Sort your list by id, title, type, email_subject, design_template, recipients_count, status and many more
with array Get other additional data

Possible with parameters:

Get a Specific Campaign

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "campaign": {
    "id": 52,
    "parent_id": null,
    "type": "campaign",
    "title": "Testing mail",
    "available_urls": null,
    "slug": "testing-mail",
    "status": "archived",
    "template_id": "0",
    "email_subject": "Testing mail header",
    "email_pre_header": "Testing mail pre-header",
    "email_body": "<!-- wp:paragraph -->\n<p>This is testing mail</p>\n<!-- /wp:paragraph -->",
    "recipients_count": 44,
    "delay": "0",
    "utm_status": "0",
    "utm_source": "",
    "utm_medium": "",
    "utm_campaign": "",
    "utm_term": "",
    "utm_content": "",
    "design_template": "simple",
    "scheduled_at": "2022-08-19 10:47:19",
    "settings": {
      "mailer_settings": {
        "from_name": "",
        "from_email": "",
        "reply_to_name": "",
        "reply_to_email": "",
        "is_custom": "no"
      },
      "subscribers": [
        {
          "list": "2",
          "tag": "all"
        }
      ],
      "excludedSubscribers": null,
      "sending_filter": "list_tag",
      "dynamic_segment": {
        "id": "",
        "slug": ""
      },
      "template_config": {
        "content_width": "700",
        "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
        "text_color": "#202020",
        "link_color": "",
        "headings_color": "#202020",
        "body_bg_color": "#FAFAFA",
        "content_bg_color": "#FFFFFF",
        "footer_text_color": "#202020",
        "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
        "disable_footer": "no"
      },
      "advanced_filters": [
        []
      ]
    },
    "created_by": "1",
    "created_at": "2022-08-19 10:38:32",
    "updated_at": "2022-08-19 10:47:29",
    "server_time": "2022-08-25 08:29:26"
  },
  "templates": []
}

This endpoint returns a campaign details.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>

URL Parameters

Parameter Type Description
with array Get other additional data

Possible with parameters:

Pause a Specific Campaign

curl --location --request POST 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/pause' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "message": "Campaign has been successfully marked as paused",
  "campaign": {
    "campaign": {
      "id": 52,
      "parent_id": null,
      "type": "campaign",
      "title": "Testing mail",
      "available_urls": null,
      "slug": "testing-mail",
      "status": "archived",
      "template_id": "0",
      "email_subject": "Testing mail header",
      "email_pre_header": "Testing mail pre-header",
      "email_body": "<!-- wp:paragraph -->\n<p>This is testing mail</p>\n<!-- /wp:paragraph -->",
      "recipients_count": 44,
      "delay": "0",
      "utm_status": "0",
      "utm_source": "",
      "utm_medium": "",
      "utm_campaign": "",
      "utm_term": "",
      "utm_content": "",
      "design_template": "simple",
      "scheduled_at": "2022-08-19 10:47:19",
      "settings": {
        "mailer_settings": {
          "from_name": "",
          "from_email": "",
          "reply_to_name": "",
          "reply_to_email": "",
          "is_custom": "no"
        },
        "subscribers": [
          {
            "list": "2",
            "tag": "all"
          }
        ],
        "excludedSubscribers": null,
        "sending_filter": "list_tag",
        "dynamic_segment": {
          "id": "",
          "slug": ""
        },
        "template_config": {
          "content_width": "700",
          "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
          "text_color": "#202020",
          "link_color": "",
          "headings_color": "#202020",
          "body_bg_color": "#FAFAFA",
          "content_bg_color": "#FFFFFF",
          "footer_text_color": "#202020",
          "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
          "disable_footer": "no"
        },
        "advanced_filters": [
          []
        ]
      },
      "created_by": "1",
      "created_at": "2022-08-19 10:38:32",
      "updated_at": "2022-08-19 10:47:29",
      "server_time": "2022-08-25 08:29:26"
    },
    "templates": []
  }
}

This endpoint returns response after pausing a campaign.

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/pause

Note: You can pause a campaign only if the campaign is in working state

Resume a Specific Campaign

curl --location --request POST 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/resume' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "message": "Campaign has been successfully marked as resumed",
  "campaign": {
    "campaign": {
      "id": 52,
      "parent_id": null,
      "type": "campaign",
      "title": "Testing mail",
      "available_urls": null,
      "slug": "testing-mail",
      "status": "archived",
      "template_id": "0",
      "email_subject": "Testing mail header",
      "email_pre_header": "Testing mail pre-header",
      "email_body": "<!-- wp:paragraph -->\n<p>This is testing mail</p>\n<!-- /wp:paragraph -->",
      "recipients_count": 44,
      "delay": "0",
      "utm_status": "0",
      "utm_source": "",
      "utm_medium": "",
      "utm_campaign": "",
      "utm_term": "",
      "utm_content": "",
      "design_template": "simple",
      "scheduled_at": "2022-08-19 10:47:19",
      "settings": {
        "mailer_settings": {
          "from_name": "",
          "from_email": "",
          "reply_to_name": "",
          "reply_to_email": "",
          "is_custom": "no"
        },
        "subscribers": [
          {
            "list": "2",
            "tag": "all"
          }
        ],
        "excludedSubscribers": null,
        "sending_filter": "list_tag",
        "dynamic_segment": {
          "id": "",
          "slug": ""
        },
        "template_config": {
          "content_width": "700",
          "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
          "text_color": "#202020",
          "link_color": "",
          "headings_color": "#202020",
          "body_bg_color": "#FAFAFA",
          "content_bg_color": "#FFFFFF",
          "footer_text_color": "#202020",
          "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
          "disable_footer": "no"
        },
        "advanced_filters": [
          []
        ]
      },
      "created_by": "1",
      "created_at": "2022-08-19 10:38:32",
      "updated_at": "2022-08-19 10:47:29",
      "server_time": "2022-08-25 08:29:26"
    },
    "templates": []
  }
}

This endpoint returns response after pausing a campaign.

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/resume

Note: You can resume a campaign only if the campaign is in paused state

Duplicate a Specific Campaign

curl --location --request POST 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/duplicate' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "campaign": {
    "title": "[Duplicate] Testing mail",
    "slug": "testing-mail-1661422372",
    "email_body": "<!-- wp:paragraph -->\n<p>This is testing mail</p>\n<!-- /wp:paragraph -->",
    "status": "draft",
    "template_id": "0",
    "email_subject": "Testing mail header",
    "email_pre_header": "Testing mail pre-header",
    "utm_status": "0",
    "utm_source": "",
    "utm_medium": "",
    "utm_campaign": "",
    "utm_term": "",
    "utm_content": "",
    "design_template": "simple",
    "created_by": 0,
    "settings": {
      "mailer_settings": {
        "from_name": "",
        "from_email": "",
        "reply_to_name": "",
        "reply_to_email": "",
        "is_custom": "no"
      },
      "subscribers": [
        {
          "list": "2",
          "tag": "all"
        }
      ],
      "excludedSubscribers": null,
      "sending_filter": "list_tag",
      "dynamic_segment": {
        "id": "",
        "slug": ""
      },
      "template_config": {
        "content_width": "700",
        "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
        "text_color": "#202020",
        "link_color": "",
        "headings_color": "#202020",
        "body_bg_color": "#FAFAFA",
        "content_bg_color": "#FFFFFF",
        "footer_text_color": "#202020",
        "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
        "disable_footer": "no"
      },
      "advanced_filters": [
        []
      ]
    },
    "type": "campaign",
    "updated_at": "2022-08-25 10:12:52",
    "created_at": "2022-08-25 10:12:52",
    "id": 54
  },
  "message": "Campaign has been successfully duplicated"
}

This endpoint returns response after duplicating a campaign.

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/duplicate

Update a Campaign's Title

curl --location --request PUT 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/title' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "message": "Campaign has been updated",
  "campaign": {
    "id": 54,
    "parent_id": null,
    "type": "campaign",
    "title": "Ha Ha La La",
    "available_urls": null,
    "slug": "testing-mail-1661422372",
    "status": "draft",
    "template_id": "0",
    "email_subject": "Testing mail header",
    "email_pre_header": "Testing mail pre-header",
    "email_body": "<!-- wp:paragraph -->\n<p>This is testing mail</p>\n<!-- /wp:paragraph -->",
    "recipients_count": 0,
    "delay": "0",
    "utm_status": "0",
    "utm_source": "",
    "utm_medium": "",
    "utm_campaign": "",
    "utm_term": "",
    "utm_content": "",
    "design_template": "simple",
    "scheduled_at": null,
    "settings": {
      "mailer_settings": {
        "from_name": "",
        "from_email": "",
        "reply_to_name": "",
        "reply_to_email": "",
        "is_custom": "no"
      },
      "subscribers": [
        {
          "list": "2",
          "tag": "all"
        }
      ],
      "excludedSubscribers": null,
      "sending_filter": "list_tag",
      "dynamic_segment": {
        "id": "",
        "slug": ""
      },
      "template_config": {
        "content_width": "700",
        "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
        "text_color": "#202020",
        "link_color": "",
        "headings_color": "#202020",
        "body_bg_color": "#FAFAFA",
        "content_bg_color": "#FFFFFF",
        "footer_text_color": "#202020",
        "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
        "disable_footer": "no"
      },
      "advanced_filters": [
        []
      ]
    },
    "created_by": "0",
    "created_at": "2022-08-25 10:12:52",
    "updated_at": "2022-08-25 10:19:48"
  }
}

This endpoint returns response after updating a campaign title.

HTTP Request

PUT https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/title

URL Parameters

Parameter Type Description Required
title string Title of a campaign true

Delete a Specific Campaign

curl --location --request DELETE 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/54' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "success": true
}

This endpoint returns response after deleting a campaign.

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>

Get Campaign's Recipients Count

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/estimated-recipients-count' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "estimated_count": 44
}

This endpoint returns a campaign's total recipient count.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/estimated-recipients-count

Get Campaign's Emails

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/emails' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "emails": {
    "total": 44,
    "per_page": 15,
    "current_page": 1,
    "last_page": 3,
    "next_page_url": "/wp-json/fluent-crm/v2/campaigns/52/emails?page=2",
    "prev_page_url": null,
    "from": 1,
    "to": 15,
    "data": [
      {
        "id": 130,
        "campaign_id": "52",
        "email_type": "campaign",
        "subscriber_id": "99",
        "email_subject_id": null,
        "email_address": "cexim77235@mahazai.com",
        "email_subject": "Testing mail header",
        "email_body": "",
        "email_headers": [],
        "is_open": "0",
        "is_parsed": "1",
        "click_counter": null,
        "status": "sent",
        "note": null,
        "scheduled_at": "2022-08-19 10:47:25",
        "email_hash": "49ac7f4a-6f7c-4dcd-ac06-f0391b2ff0f8",
        "created_at": "2022-08-19 10:47:19",
        "updated_at": "2022-08-19 10:47:25",
        "subscriber": {
          "id": 99,
          "user_id": "26",
          "hash": "e75efca302bc760109bd6a04793f9647",
          "contact_owner": null,
          "company_id": null,
          "prefix": null,
          "first_name": "dscasdvc",
          "last_name": "vdsv",
          "email": "cexim77235@mahazai.com",
          "timezone": null,
          "address_line_1": "Ambarkhana",
          "address_line_2": null,
          "postal_code": "3030",
          "city": "Sylhet",
          "state": "BD-60",
          "country": "BD",
          "ip": null,
          "latitude": null,
          "longitude": null,
          "total_points": "0",
          "life_time_value": "0",
          "phone": "01761152186",
          "status": "subscribed",
          "contact_type": "customer",
          "source": "web",
          "avatar": null,
          "date_of_birth": null,
          "created_at": "2022-06-27 10:25:18",
          "last_activity": null,
          "updated_at": "2022-07-21 10:46:34",
          "full_name": "dscasdvc vdsv",
          "photo": "https://www.gravatar.com/avatar/e75efca302bc760109bd6a04793f9647?s=128"
        }
      }
    ]
  },
  "failed_counts": 0
}

This endpoint returns a campaign's emails.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/emails

Delete Campaign's Emails

curl --location --request DELETE 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/emails' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "message": "Selected emails are deleted",
  "recipients_count": 9
}

This endpoint returns response after deleting a campaign's emails.

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/emails

URL Parameters

Parameter Type Description Default
email_ids array Email Ids of a campaign []

Get Campaign's Processing State

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/processing-stat' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "reload": true,
  "campaign": {
    "id": 52,
    "parent_id": null,
    "type": "campaign",
    "title": "Testing mail",
    "available_urls": null,
    "slug": "testing-mail",
    "status": "archived",
    "template_id": "0",
    "email_subject": "Testing mail header",
    "email_pre_header": "Testing mail pre-header",
    "email_body": "<!-- wp:paragraph -->\n<p>This is testing mail</p>\n<!-- /wp:paragraph -->",
    "recipients_count": 44,
    "delay": "0",
    "utm_status": "0",
    "utm_source": "",
    "utm_medium": "",
    "utm_campaign": "",
    "utm_term": "",
    "utm_content": "",
    "design_template": "simple",
    "scheduled_at": "2022-08-19 10:47:19",
    "settings": {
      "mailer_settings": {
        "from_name": "",
        "from_email": "",
        "reply_to_name": "",
        "reply_to_email": "",
        "is_custom": "no"
      },
      "subscribers": [
        {
          "list": "2",
          "tag": "all"
        }
      ],
      "excludedSubscribers": null,
      "sending_filter": "list_tag",
      "dynamic_segment": {
        "id": "",
        "slug": ""
      },
      "template_config": {
        "content_width": "700",
        "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
        "text_color": "#202020",
        "link_color": "",
        "headings_color": "#202020",
        "body_bg_color": "#FAFAFA",
        "content_bg_color": "#FFFFFF",
        "footer_text_color": "#202020",
        "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
        "disable_footer": "no"
      },
      "advanced_filters": [
        []
      ]
    },
    "created_by": "1",
    "created_at": "2022-08-19 10:38:32",
    "updated_at": "2022-08-19 10:47:29"
  }
}

This endpoint returns a campaign's processing stat.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/processing-stat

Get Campaign's Status

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/status' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "current_timestamp": "2022-08-25 08:49:04",
  "stat": [
    {
      "status": "sent",
      "total": "44"
    }
  ],
  "campaign": {
    "id": 52,
    "parent_id": null,
    "type": "campaign",
    "title": "Testing mail",
    "available_urls": null,
    "slug": "testing-mail",
    "status": "archived",
    "template_id": "0",
    "email_subject": "Testing mail header",
    "email_pre_header": "Testing mail pre-header",
    "email_body": "<!-- wp:paragraph -->\n<p>This is testing mail</p>\n<!-- /wp:paragraph -->",
    "recipients_count": 44,
    "delay": "0",
    "utm_status": "0",
    "utm_source": "",
    "utm_medium": "",
    "utm_campaign": "",
    "utm_term": "",
    "utm_content": "",
    "design_template": "simple",
    "scheduled_at": "2022-08-19 10:47:19",
    "settings": {
      "mailer_settings": {
        "from_name": "",
        "from_email": "",
        "reply_to_name": "",
        "reply_to_email": "",
        "is_custom": "no"
      },
      "subscribers": [
        {
          "list": "2",
          "tag": "all"
        }
      ],
      "excludedSubscribers": null,
      "sending_filter": "list_tag",
      "dynamic_segment": {
        "id": "",
        "slug": ""
      },
      "template_config": {
        "content_width": "700",
        "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
        "text_color": "#202020",
        "link_color": "",
        "headings_color": "#202020",
        "body_bg_color": "#FAFAFA",
        "content_bg_color": "#FFFFFF",
        "footer_text_color": "#202020",
        "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
        "disable_footer": "no"
      },
      "advanced_filters": [
        []
      ]
    },
    "created_by": "1",
    "created_at": "2022-08-19 10:38:32",
    "updated_at": "2022-08-19 10:47:29"
  },
  "sent_count": 44,
  "analytics": {
    "unsubscribe": {
      "type": "unsubscribe",
      "total": "1",
      "icon_class": "el-icon el-icon-warning-outline",
      "is_percent": true,
      "label": "Unsubscribe Rate (1)"
    }
  },
  "subject_analytics": []
}

This endpoint returns a campaign's status.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/status

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/link-report' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "links": []
}

This endpoint returns a campaign's links.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/link-report

Get Campaign's Revenues

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/revenues?per_page=2&page=1' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "orders": [],
  "labels": {
    "id": "ID",
    "title": "Title",
    "status": "Status",
    "date": "Date",
    "total": "Total"
  },
  "total": 0
}

This endpoint returns a campaign's revenues.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/revenues

URL Parameters

Parameter Type Description Default
per_page int Records per page 10
page int Page Number for Pagination 1

Get Campaign's Unsubscribes

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/unsubscribers?per_page=2&page=1' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "unsubscribes": {
    "total": 0,
    "per_page": 2,
    "current_page": 1,
    "last_page": 0,
    "next_page_url": null,
    "prev_page_url": null,
    "from": null,
    "to": null,
    "data": []
  }
}

This endpoint returns a campaign's unsubscribers.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/unsubscribers

URL Parameters

Parameter Type Description Default
per_page int Records per page 15
page int Page Number for Pagination 1

Get Campaign's Contacts by Segment

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/52/contacts-by-segment?per_page=2&page=1' \
-H 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "subscribers": {
    "total": 44,
    "per_page": 15,
    "current_page": 1,
    "last_page": 3,
    "next_page_url": "/wp-json/fluent-crm/v2/campaigns/52/contacts-by-segment?page=2",
    "prev_page_url": null,
    "from": 1,
    "to": 15,
    "data": [
      {
        "id": 658,
        "user_id": null,
        "hash": "93b66e2a55f146e2e3cb9ea2e06e4a81",
        "contact_owner": null,
        "company_id": null,
        "prefix": null,
        "first_name": "Laurence",
        "last_name": null,
        "email": "lboudet@free.fr",
        "timezone": null,
        "address_line_1": null,
        "address_line_2": null,
        "postal_code": null,
        "city": null,
        "state": null,
        "country": null,
        "ip": "127.0.0.1",
        "latitude": null,
        "longitude": null,
        "total_points": "0",
        "life_time_value": "0",
        "phone": null,
        "status": "subscribed",
        "contact_type": "lead",
        "source": "ActiveCampaign",
        "avatar": null,
        "date_of_birth": null,
        "created_at": "2022-01-22 00:45:54",
        "last_activity": null,
        "updated_at": "2022-08-02 08:28:15",
        "full_name": "Laurence",
        "photo": "https://www.gravatar.com/avatar/93b66e2a55f146e2e3cb9ea2e06e4a81?s=128",
        "lists": [
          {
            "id": 2,
            "title": "WooCommerce",
            "slug": "woocommerce",
            "description": null,
            "is_public": "0",
            "created_at": "2022-03-23 08:08:16",
            "updated_at": "2022-03-23 08:08:16"
          }
        ],
        "tags": [
          {
            "id": 9,
            "title": "Hello",
            "slug": "hello",
            "description": null,
            "created_at": "2022-06-24 05:23:49"
          }
        ]
      }
    ]
  }
}

This endpoint returns a campaign's contacts by segment.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/campaigns/<ID>/contacts-by-segment

URL Parameters

Parameter Type Description Default
per_page int Records per page 15
page int Page Number for Pagination 1
search string Filter by contacts email, first_name, last_name, address_line_1, address_line_2, postal_code, city, state, country, phone empty
sort_by string Give a sorting field of the contacts field id
sort_type string Give a sorting order of the contacts DESC or ASC DESC

Reports

Get Dashboard Stats

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/reports/dashboard-stats' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "stats": {
        "total_subscribers": {
            "title": "Total Contacts",
            "count": 114,
            "route": {
                "name": "subscribers"
            }
        },
        "total_campaigns": {
            "title": "Campaigns",
            "count": 18,
            "route": {
                "name": "campaigns"
            }
        },
        "email_sent": {
            "title": "Emails Sent",
            "count": 79,
            "route": {
                "name": "all_emails"
            }
        },
        "tags": {
            "title": "Tags",
            "count": 5,
            "route": {
                "name": "tags"
            }
        },
        "total_templates": {
            "title": "Email Templates",
            "count": 3,
            "route": {
                "name": "templates"
            }
        }
    },
    "sales": [
      {
         "title":"Earnings (Today)",
         "content":"&#36;0.00"
      },
      {
         "title":"Earnings (Current Month)",
         "content":"&#36;0.00"
      },
      {
         "title":"Earnings (All Time)",
         "content":"&#36;0.00"
      }
    ],
    "onboarding": {
        "total": 5,
        "completed": 3,
        "steps": [
            {
                "label": "Create a Tag",
                "completed": true,
                "route": {
                    "name": "tags"
                }
            },
            {
                "label": "Import Contacts",
                "completed": true,
                "route": {
                    "name": "subscribers"
                }
            },
            {
                "label": "Create a Campaign",
                "completed": false,
                "route": {
                    "name": "campaigns"
                }
            },
            {
                "label": "Create an Automation",
                "completed": true,
                "route": {
                    "name": "funnels"
                }
            },
            {
                "label": "Create a Form",
                "completed": false,
                "route": {
                    "name": "forms"
                }
            }
        ]
    },
    "quick_links": [
        {
            "title": "View Contacts",
            "url": "https://yourdomain.com/wp-admin/admin.php?page=fluentcrm-admin#/subscribers",
            "icon": "el-icon-user"
        },
        {
            "title": "Contact Segments",
            "url": "https://yourdomain.com/wp-admin/admin.php?page=fluentcrm-admin#/contact-groups/lists",
            "icon": "el-icon-folder"
        },
        {
            "title": "Email Campaigns",
            "url": "https://yourdomain.com/wp-admin/admin.php?page=fluentcrm-admin#/email/campaigns",
            "icon": "el-icon-message"
        },
        {
            "title": "Email Sequences",
            "url": "https://yourdomain.com/wp-admin/admin.php?page=fluentcrm-admin#/email/sequences",
            "icon": "el-icon-alarm-clock"
        },
        {
            "title": "Forms",
            "url": "https://yourdomain.com/wp-admin/admin.php?page=fluentcrm-admin#/forms",
            "icon": "el-icon-document-checked"
        },
        {
            "title": "Automations",
            "url": "https://yourdomain.com/wp-admin/admin.php?page=fluentcrm-admin#/funnels",
            "icon": "el-icon-cold-drink"
        },
        {
            "title": "Settings",
            "url": "https://yourdomain.com/wp-admin/admin.php?page=fluentcrm-admin#/settings",
            "icon": "el-icon-setting"
        },
        {
            "title": "Documentations",
            "url": "https://yourdomain.com/wp-admin/admin.php?page=fluentcrm-admin#/documentation",
            "icon": "el-icon-document"
        }
    ],
    "ff_config": {
        "is_installed": true,
        "create_form_link": "https://yourdomain.com/wp-admin/admin.php?page=fluent_forms#add=1"
    }
}

This endpoint returns numbers of total contact, total campaigns, total email sent, total tags & total emails templates, quick_links, onboarding, sales and many more information.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/reports/dashboard-stats

Get Subscribers Growth Rate

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/reports/subscribers?date_range[]=2020-02-01&date_range[]=2022-02-10' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "stats": {
        "Feb 2020": 90,
        "Mar 2020": 60,
        "Apr 2020": 34,
        "May 2020": 76,
        "Jun 2020": 98,
        "Jul 2020": 96,
        "Aug 2020": 76,
        "Sep 2020": 87,
        "Oct 2020": 78,
        "Nov 2020": 87,
        "Dec 2020": 65,
        "Jan 2021": 88,
        "Feb 2021": 45,
        "Mar 2021": 56,
        "Apr 2021": 87,
        "May 2021": 105,
        "Jun 2021": 65,
        "Jul 2021": 109,
        "Aug 2021": 67,
        "Sep 2021": 54,
        "Oct 2021": 34,
        "Nov 2021": 79,
        "Dec 2021": 87,
        "Jan 2022": 56,
        "Feb 2022": 88
    }
}

This endpoint returns subscribers growth rate.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/reports/subscribers

URL Parameters

Parameter Type Description
date_range[] Date Accept from date & to date. And date format should be " YYYY-MM-DD ".

How To Input The Date Range In URL?

date_range[]=2020-02-01 1st date will work for from date.
date_range[]=2022-02-10 2nd date will work for to date.
date_range[]=2020-02-01&date_range[]=2022-02-10 Use like this one in the URL

Get Email Sending Stats

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/reports/email-sents?date_range[]=2020-02-01&date_range[]=2022-02-10' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "stats": {
        "2020-03-03": 37,
        "2020-03-04": 54,
        "2020-03-05": 31,
        "2020-03-06": 35,
        "2020-03-07": 21,
        "2020-03-08": 31,
        "2020-03-09": 35,
        "2020-03-10": 43,
        "2020-03-11": 34
    }
}

This endpoint returns email sending rate.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/reports/email-sents

URL Parameters

Parameter Type Description
date_range[] Date Accept from date & to date. And date format should be " YYYY-MM-DD ".

How To Input The Date Range In URL?

date_range[]=2020-03-03 1st date will work for from date.
date_range[]=2022-03-11 2nd date will work for to date.
date_range[]=2020-03-03&date_range[]=2022-03-11 Use like this one in the URL

Get Email Open Stats

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/reports/email-opens?date_range[]=2020-02-01&date_range[]=2022-02-10' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "stats": {
        "2020-03-03": 37,
        "2020-03-04": 54,
        "2020-03-05": 31,
        "2020-03-06": 35,
        "2020-03-07": 21,
        "2020-03-08": 31,
        "2020-03-09": 35,
        "2020-03-10": 43,
        "2020-03-11": 34
    }
}

This endpoint returns email sending rate.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/reports/email-opens

URL Parameters

Parameter Type Description
date_range[] Date Accept from date & to date. And date format should be " YYYY-MM-DD ".

How To Input The Date Range In URL?

date_range[]=2020-03-03 1st date will work for from date.
date_range[]=2022-03-11 2nd date will work for to date.
date_range[]=2020-03-03&date_range[]=2022-03-11 Use like this one in the URL

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/reports/email-clicks?date_range[]=2020-02-01&date_range[]=2022-02-10' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
    "stats": {
        "2020-03-03": 37,
        "2020-03-04": 54,
        "2020-03-05": 31,
        "2020-03-06": 35,
        "2020-03-07": 21,
        "2020-03-08": 31,
        "2020-03-09": 35,
        "2020-03-10": 43,
        "2020-03-11": 34
    }
}

This endpoint returns email sending rate.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/reports/email-clicks

URL Parameters

Parameter Type Description
date_range[] Date Accept from date & to date. And date format should be " YYYY-MM-DD ".

How To Input The Date Range In URL?

date_range[]=2020-03-03 1st date will work for from date.
date_range[]=2022-03-11 2nd date will work for to date.
date_range[]=2020-03-03&date_range[]=2022-03-11 Use like this one in the URL

Get Options

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/reports/options?fields=roles,custom_fields' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "options": {
    "roles": {
      "subscriber": {
        "name": "Subscriber",
        "capabilities": {
          "read": true,
          "level_0": true
        }
      }
    },
    "custom_fields": [
      {
        "field_key": "single-select",
        "type": "select-one",
        "label": "Blood Group",
        "options": [
          "A+",
          "A-",
          "B+",
          "B-"
        ],
        "slug": "blood_group"
      },
      {
        "field_key": "text",
        "type": "text",
        "label": "Username",
        "slug": "username"
      }
    ]
  }
}

This endpoint returns options.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/reports/options

URL Parameters

Parameter Description
fields get specific options e.g. fields=countries,lists,tags

Possible fields parameters

Get Ajax Options

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/reports/ajax-options?option_key=woo_categories' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "options": [
    {
      "id": 27,
      "title": "Smartphone"
    },
    {
      "id": 26,
      "title": "Soft drink"
    },
    {
      "id": 25,
      "title": "Uncategorized"
    }
  ]
}

This endpoint returns ajax options.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/reports/ajax-options

URL Parameters

Parameter Type Description Default
option_key string get specific plugin's options empty
search string Search Parameter for filtering empty
values array Search By Option Ids empty

Possible option_key parameters

Get Taxonomy Terms

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/reports/taxonomy-terms' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "options": [
    {
      "id": "4",
      "title": "Advanced"
    },
    {
      "id": "37",
      "title": "Aged Oak 691D"
    },
    {
      "id": "32",
      "title": "API"
    },
    {
      "id": "49",
      "title": "Backend"
    },
    {
      "id": "48",
      "title": "Basic"
    }
  ]
}

This endpoint returns taxonomy terms.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/reports/taxonomy-terms

URL Parameters

Parameter Type Description Default
taxonomy string get specific taxonomy empty
search string Search Parameter for filtering empty
values array Search By texonomy Ids empty

Get Emails

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/reports/emails' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "emails": {
    "total": 207,
    "per_page": 15,
    "current_page": 1,
    "last_page": 14,
    "next_page_url": "/wp-json/fluent-crm/v2/reports/emails?page=2",
    "prev_page_url": null,
    "from": 1,
    "to": 15,
    "data": [
      {
        "id": 314,
        "campaign_id": "41",
        "email_type": "campaign",
        "subscriber_id": "1905",
        "email_subject_id": null,
        "email_address": "koxohen302@ukgent.com",
        "email_subject": "Heleoo",
        "email_body": "",
        "email_headers": [],
        "is_open": "0",
        "is_parsed": "1",
        "click_counter": null,
        "status": "sent",
        "note": null,
        "scheduled_at": "2022-08-22 16:53:48",
        "email_hash": "ae8a3f46-2f77-4ea3-921a-3fa04b941079",
        "created_at": "2022-08-22 16:47:28",
        "updated_at": "2022-08-22 16:53:48",
        "subscriber": {
          "id": 1905,
          "user_id": null,
          "hash": "3f0ed92b231d748a1e4539fc9e3617d4",
          "contact_owner": null,
          "company_id": null,
          "prefix": null,
          "first_name": "Koxohen",
          "last_name": "302",
          "email": "koxohen302@ukgent.com",
          "timezone": null,
          "address_line_1": "Modina Market, Sylhet",
          "address_line_2": null,
          "postal_code": null,
          "city": null,
          "state": null,
          "country": null,
          "ip": "127.0.0.1",
          "latitude": null,
          "longitude": null,
          "total_points": "0",
          "life_time_value": "0",
          "phone": null,
          "status": "subscribed",
          "contact_type": "lead",
          "source": "FluentForms",
          "avatar": null,
          "date_of_birth": null,
          "created_at": "2022-08-19 10:55:22",
          "last_activity": null,
          "updated_at": "2022-08-19 10:55:39",
          "full_name": "Koxohen 302",
          "photo": "https://www.gravatar.com/avatar/3f0ed92b231d748a1e4539fc9e3617d4?s=128"
        },
        "campaign": {
          "id": 41,
          "parent_id": null,
          "type": "campaign",
          "title": "Order Status",
          "available_urls": null,
          "slug": "order-status",
          "status": "scheduled",
          "template_id": "0",
          "email_subject": "Heleoo",
          "email_pre_header": "",
          "email_body": "<!-- wp:paragraph -->\n<p>Start Writing Here</p>\n<!-- /wp:paragraph -->",
          "recipients_count": 44,
          "delay": "0",
          "utm_status": "0",
          "utm_source": "",
          "utm_medium": "",
          "utm_campaign": "",
          "utm_term": "",
          "utm_content": "",
          "design_template": "simple",
          "scheduled_at": "2022-08-22 16:53:02",
          "settings": {
            "mailer_settings": {
              "from_name": "",
              "from_email": "",
              "reply_to_name": "",
              "reply_to_email": "",
              "is_custom": "no"
            },
            "subscribers": [
              {
                "list": "2",
                "tag": "all"
              }
            ],
            "excludedSubscribers": null,
            "sending_filter": "list_tag",
            "dynamic_segment": {
              "id": "",
              "slug": ""
            },
            "template_config": {
              "content_width": "700",
              "headings_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
              "text_color": "#202020",
              "link_color": "",
              "headings_color": "#202020",
              "body_bg_color": "#FAFAFA",
              "content_bg_color": "#FFFFFF",
              "footer_text_color": "#202020",
              "content_font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
              "disable_footer": "no"
            },
            "advanced_filters": [
              []
            ]
          },
          "created_by": "1",
          "created_at": "2022-07-20 11:11:20",
          "updated_at": "2022-08-22 16:47:28"
        }
      },
      "...."
    ]
  }
}

This endpoint returns taxonomy terms.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/reports/emails

Delete Bulk Emails

curl --location --request DELETE 'https://yourdomain.com/wp-json/fluent-crm/v2/reports/emails' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD' \
--data-raw 'email_ids[]=314&email_ids[]=313&email_ids[]=312' 

The above command returns JSON structured like this:

{
  "message": "Selected emails has been deleted"
}

This endpoint returns message after deleting emails by email_ids.

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/reports/emails

URL Parameters

Parameter Type Description Required
email_ids array delete emails by provided id true

Get Advance Providers

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/reports/advanced-providers' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "providers": {
    "crm": {
      "title": "CRM"
    },
    "learndash": {
      "title": "LearnDash"
    }
  }
}

This endpoint returns advance providers.

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/reports/advanced-providers

Webhooks

Get All Webhooks

curl --location --request GET 'https://yourdomain.com/wp-json/fluent-crm/v2/webhooks' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "webhooks": [],
  "fields": [
    {
      "key": "prefix",
      "field": "Name Prefix"
    },
    {
      "key": "first_name",
      "field": "First Name"
    }
  ],
  "custom_fields": [
    {
      "key": "blood_group",
      "field": "Blood Group"
    },
    {
      "key": "username",
      "field": "Username"
    }
  ],
  "schema": {
    "name": "",
    "lists": [],
    "tags": [],
    "url": "",
    "status": ""
  },
  "lists": [
    {
      "id": 1,
      "title": "TutorLMS",
      "slug": "tutorlms",
      "description": null,
      "is_public": "0",
      "created_at": "2022-03-23 08:08:16",
      "updated_at": "2022-03-23 08:08:16"
    },
    {
      "id": 2,
      "title": "WooCommerce",
      "slug": "woocommerce",
      "description": null,
      "is_public": "0",
      "created_at": "2022-03-23 08:08:16",
      "updated_at": "2022-03-23 08:08:16"
    }
  ],
  "tags": [
    {
      "id": 1,
      "title": "Course Enrolled",
      "slug": "course-enrolled",
      "description": null,
      "created_at": "2022-03-23 08:08:55",
      "updated_at": "2022-03-23 08:08:55"
    },
    {
      "id": 2,
      "title": "Course Completed",
      "slug": "course-completed",
      "description": null,
      "created_at": "2022-03-23 08:08:55",
      "updated_at": "2022-03-23 08:08:55"
    }
  ]
}

This endpoint returns all webhooks as well as fields, custom_fields, schema, lists and tags

HTTP Request

GET https://yourdomain.com/wp-json/fluent-crm/v2/webhooks

URL Parameters

Parameter Type Description Default
search string Filter by webhook name empty

Create a webhook

curl --location --request POST 'https://yourdomain.com/wp-json/fluent-crm/v2/webhook' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "id": 82,
  "webhook": {
    "name": "Demo Webhook",
    "status": "pending",
    "tags": [
      1,
      2
    ],
    "lists": [
      1,
      2
    ],
    "url": "http://wp.test/?fluentcrm=1&route=contact&hash=0d501311-7884-4060-b10f-14a0cbc1e829"
  },
  "webhooks": [
    {
      "id": 82,
      "object_type": "webhook",
      "object_id": null,
      "key": "0d501311-7884-4060-b10f-14a0cbc1e829",
      "value": {
        "name": "Demo Webhook",
        "status": "pending",
        "tags": [
          1,
          2
        ],
        "lists": [
          1,
          2
        ],
        "url": "http://wp.test/?fluentcrm=1&route=contact&hash=0d501311-7884-4060-b10f-14a0cbc1e829"
      },
      "created_at": "2022-08-26 06:42:26",
      "updated_at": "2022-08-26 06:42:26"
    }
  ],
  "message": "Successfully created the WebHook"
}

This endpoint return response after creating a webhook.

HTTP Request

POST https://yourdomain.com/wp-json/fluent-crm/v2/webhook

URL Parameters

Parameter Type Description Required
name string The name of webhook true
status boolean The status of webhook true
tags array Id's of tags false
lists array Id's of lists false

Possible status parameters

Update a webhook

curl --location --request PUT 'https://yourdomain.com/wp-json/fluent-crm/v2/webhook/82' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "webhooks": [
    {
      "id": 82,
      "object_type": "webhook",
      "object_id": null,
      "key": "0d501311-7884-4060-b10f-14a0cbc1e829",
      "value": {
        "name": "Changed webhook",
        "status": "subscribed",
        "tags": [],
        "lists": [],
        "url": "http://wp.test/?fluentcrm=1&route=contact&hash=0d501311-7884-4060-b10f-14a0cbc1e829",
        "query_timestamp": "1661496607456"
      },
      "created_at": "2022-08-26 06:42:26",
      "updated_at": "2022-08-26 06:52:00"
    }
  ],
  "message": "Successfully updated the webhook"
}

This endpoint return response after updating a webhook.

HTTP Request

PUT https://yourdomain.com/wp-json/fluent-crm/v2/webhook/<ID>

URL Parameters

Parameter Type Description Required
name string The name of webhook true
status boolean The status of webhook true
tags array Id's of tags false
lists array Id's of lists false

Possible status parameters

Delete a webhook

curl --location --request DELETE 'https://yourdomain.com/wp-json/fluent-crm/v2/webhook/82' \
--header 'Authorization: Basic API_USERNAME:API_PASSWORD'

The above command returns JSON structured like this:

{
  "webhooks": [],
  "message": "Successfully deleted the webhook"
}

This endpoint return response after deleting a webhook.

HTTP Request

DELETE https://yourdomain.com/wp-json/fluent-crm/v2/webhook/<ID>

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.