General notes

Api is available at https://cloud.clientlist.io/partner-api/v1 under this conditions:

  • API always return JSON
  • content_type = application/json
  • authorization using HMAC
  • every right answer contains {“status”: “ok”}

Standard answers

Confirmation

{ “status”: “ok” } * always HTTP STATUS equals 200 * field status = “ok”

Error

{ “status”: “error”, “error”: “AccessDenied” } * error always has HTTP STATUS different than 200 (400,401,403,404,500) * it’s field status = “error” * error field can have additional parameter

Calculating a control sum of HMAC for GET and DELETE

X-hmac = hash_hmac(‘SHA1’ ,PUBLIC+REQUEST_PATH+HTTP_PARAMS, PRIVATE)

Calculating a control sum of HMAC for POST and PUT

X-hmac = hash_hmac(‘SHA1’, PUBLIC+REQUEST_PATH+HTTP_POST_JSON_BODY, PRIVATE)

API detail

Dictionary

Dictionary: Languages

HTTP Request
GET https://cloud.clientlist.io/partner-api/v1/language
Headers
X-public
833433b3adb6df69a79cb7af42f0b356
X-hmac
calculated_hmac
Example request
curl -X GET -H "X-public: 833433b3adb6df69a79cb7af42f0b356" -H "X-hmac: calculated_hmac" "https://cloud.clientlist.io/partner-api/v1/language"
GET /partner-api/v1/language HTTP/1.1
Host: cloud.clientlist.io
X-public: 833433b3adb6df69a79cb7af42f0b356
X-hmac: calculated_hmac
Example response
Status 200 OK
{
    "status": "ok",
    "data": [
        {
            "id": 1,
            "name": "English"
        },
        {
            "id": 2,
            "name": "Polski"
        },
        {
            "id": 3,
            "name": "German"
        },
        {
            "id": 4,
            "name": "French"
        },
        {
            "id": 5,
            "name": "Italian"
        },
        {
            "id": 6,
            "name": "Spanish"
        },
        {
            "id": 7,
            "name": "Arabic"
        },
        {
            "id": 8,
            "name": "Russian"
        }
    ]
}

Dictionary: List types

HTTP Request
GET https://cloud.clientlist.io/partner-api/v1/list-type
Headers
X-public
12313123qasdasd12313
X-hmac
calculated_hmac
Example request
curl -X GET -H "X-public: 12313123qasdasd12313" -H "X-hmac: calculated_hmac" "https://cloud.clientlist.io/partner-api/v1/list-type"
GET /partner-api/v1/list-type HTTP/1.1
Host: cloud.clientlist.io
X-public: 12313123qasdasd12313
X-hmac: calculated_hmac
Example response
Status 200 OK
{
    "status": "ok",
    "data": [
        {
            "id": 2,
            "name": "Agency"
        },
        {
            "id": 3,
            "name": "E-commerce"
        },
        {
            "id": 4,
            "name": "Services"
        },
        {
            "id": 5,
            "name": "Doctors"
        },
        {
            "id": 6,
            "name": "Lawyers"
        },
        {
            "id": 7,
            "name": "Internet Services"
        },
        {
            "id": 8,
            "name": "IoT"
        },
        {
            "id": 9,
            "name": "Beauty"
        },
        {
            "id": 10,
            "name": "Insurence"
        },
        {
            "id": 11,
            "name": "Photographers"
        },
        {
            "id": 12,
            "name": "SaaS"
        },
        {
            "id": 13,
            "name": "Education"
        },
        {
            "id": 14,
            "name": "Production"
        },
        {
            "id": 15,
            "name": "Consulting"
        },
        {
            "id": 17,
            "name": "Transportation"
        },
        {
            "id": 18,
            "name": "HR"
        },
        {
            "id": 19,
            "name": "Restaurants"
        },
        {
            "id": 20,
            "name": "Accounting"
        },
        {
            "id": 21,
            "name": "Freelancers"
        },
        {
            "id": 22,
            "name": "Real Estate"
        }
    ]
}

User

User: Get

HTTP Request
GET https://cloud.clientlist.io/partner-api/v1/user/:id
Headers
X-public
833433b3adb6df69a79cb7af42f0b356
X-hmac
callculated_hmac
Example request
curl -X GET -H "X-public: 833433b3adb6df69a79cb7af42f0b356" -H "X-hmac: callculated_hmac" "https://cloud.clientlist.io/partner-api/v1/user/:id"
GET /partner-api/v1/user/:id HTTP/1.1
Host: cloud.clientlist.io
X-public: 833433b3adb6df69a79cb7af42f0b356
X-hmac: callculated_hmac
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 2005,
        "name": "partner@example.com",
        "email": "partner@example.com",
        "language": 1,
        "timezone": "Europe/Warsaw",
        "status": true,
        "added": "2020-11-02 08:53:12",
        "lastLogin": "2020-11-02 08:53:12"
    }
}

User: Add

HTTP Request
POST https://cloud.clientlist.io/partner-api/v1/user
Headers
X-public
833433b3adb6df69a79cb7af42f0b356
X-hmac
callculated_hmac
Example request
curl -X POST -H "X-public: 833433b3adb6df69a79cb7af42f0b356" -H "X-hmac: callculated_hmac" -d '{
    "email": "partner@example.com",
    "password": "password1",
    "language": 1,
    "timezone": "Europe/Warsaw"
}' "https://cloud.clientlist.io/partner-api/v1/user"
POST /partner-api/v1/user HTTP/1.1
Host: cloud.clientlist.io
X-public: 833433b3adb6df69a79cb7af42f0b356
X-hmac: callculated_hmac

{
    "email": "partner@example.com",
    "password": "password1",
    "language": 1,
    "timezone": "Europe/Warsaw"
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 2005,
        "name": "partner@example.com",
        "email": "partner@example.com",
        "language": 1,
        "timezone": "Europe/Warsaw",
        "status": true,
        "added": "2020-11-02 08:53:12",
        "lastLogin": "2020-11-02 08:53:12"
    }
}

User: Status

HTTP Request
PUT https://cloud.clientlist.io/partner-api/v1/user/:id/status
Headers
X-public
833433b3adb6df69a79cb7af42f0b356
X-hmac
callculated_hmac
Example request
curl -X PUT -H "X-public: 833433b3adb6df69a79cb7af42f0b356" -H "X-hmac: callculated_hmac" -d '{
    "status": false
}' "https://cloud.clientlist.io/partner-api/v1/user/:id/status"
PUT /partner-api/v1/user/:id/status HTTP/1.1
Host: cloud.clientlist.io
X-public: 833433b3adb6df69a79cb7af42f0b356
X-hmac: callculated_hmac

{
    "status": false
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 2005,
        "name": "partner@example.com",
        "email": "partner@example.com",
        "language": 1,
        "timezone": "Europe/Warsaw",
        "status": false,
        "added": "2020-11-02 08:53:12",
        "lastLogin": "2020-11-02 08:53:12"
    }
}

User: Change password

HTTP Request
PUT https://cloud.clientlist.io/partner-api/v1/user/:id/password
Headers
X-public
833433b3adb6df69a79cb7af42f0b356
X-hmac
callucalted_hmac
Example request
curl -X PUT -H "X-public: 833433b3adb6df69a79cb7af42f0b356" -H "X-hmac: callucalted_hmac" -d '{
    "password": "password2"
}' "https://cloud.clientlist.io/partner-api/v1/user/:id/password"
PUT /partner-api/v1/user/:id/password HTTP/1.1
Host: cloud.clientlist.io
X-public: 833433b3adb6df69a79cb7af42f0b356
X-hmac: callucalted_hmac

{
    "password": "password2"
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 2005,
        "name": "partner@example.com",
        "email": "partner@example.com",
        "language": 1,
        "timezone": "Europe/Warsaw",
        "status": false,
        "added": "2020-11-02 08:53:12",
        "lastLogin": "2020-11-02 08:53:12"
    }
}

User: Remove

HTTP Request
DELETE https://cloud.clientlist.io/partner-api/v1/user/:id
Headers
X-public
833433b3adb6df69a79cb7af42f0b356
X-hmac
callculated_hmac
Example request
curl -X DELETE -H "X-public: 833433b3adb6df69a79cb7af42f0b356" -H "X-hmac: callculated_hmac" "https://cloud.clientlist.io/partner-api/v1/user/:id"
DELETE /partner-api/v1/user/:id HTTP/1.1
Host: cloud.clientlist.io
X-public: 833433b3adb6df69a79cb7af42f0b356
X-hmac: callculated_hmac
Example response
Status 200 OK
{
    "status": "ok"
}

User: Sign in

HTTP Request
POST https://cloud.clientlist.io/partner-api/v1/user/login-email
Headers
X-public
833433b3adb6df69a79cb7af42f0b356
X-hmac
callculated_hmac
Example request
curl -X POST -H "X-public: 833433b3adb6df69a79cb7af42f0b356" -H "X-hmac: callculated_hmac" -d '{
    "email": "partner@example.com"
}' "https://cloud.clientlist.io/partner-api/v1/user/login-email"
POST /partner-api/v1/user/login-email HTTP/1.1
Host: cloud.clientlist.io
X-public: 833433b3adb6df69a79cb7af42f0b356
X-hmac: callculated_hmac

{
    "email": "partner@example.com"
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "hash": "13aa2c620760e92e279053530d294b47",
        "url": "https://cloud.clientlist.io/login-otp/13aa2c620760e92e279053530d294b47"
    }
}

List

List: Add

List Type is optional

HTTP Request
POST https://cloud.clientlist.io/partner-api/v1/user/:id/list/add
Headers
X-hmac
calculated_hmac
X-public
833433b3adb6df69a79cb7af42f0b356
Content-type
application/json
Example request
curl -X POST -H "X-hmac: calculated_hmac" -H "X-public: 833433b3adb6df69a79cb7af42f0b356" -H "Content-type: application/json" -d '{
    "name": "My list",
    "type": 3
}' "https://cloud.clientlist.io/partner-api/v1/user/:id/list/add"
POST /partner-api/v1/user/:id/list/add HTTP/1.1
Host: cloud.clientlist.io
X-hmac: calculated_hmac
X-public: 833433b3adb6df69a79cb7af42f0b356
Content-type: application/json

{
    "name": "My list",
    "type": 3
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 2085,
        "name": "My list"
    }
}

List: Add user

HTTP Request
POST https://cloud.clientlist.io/partner-api/v1/list/:id/user
Headers
X-hmac
calculated_hmac
X-public
833433b3adb6df69a79cb7af42f0b356
Content-type
application/json
Example request
curl -X POST -H "X-hmac: calculated_hmac" -H "X-public: 833433b3adb6df69a79cb7af42f0b356" -H "Content-type: application/json" -d '{
    "email": "partner@example.com",
    "password": "password1",
    "language": 1,
    "timezone": "Europe/Warsaw"
}' "https://cloud.clientlist.io/partner-api/v1/list/:id/user"
POST /partner-api/v1/list/:id/user HTTP/1.1
Host: cloud.clientlist.io
X-hmac: calculated_hmac
X-public: 833433b3adb6df69a79cb7af42f0b356
Content-type: application/json

{
    "email": "partner@example.com",
    "password": "password1",
    "language": 1,
    "timezone": "Europe/Warsaw"
}
Example response
Status 200 OK
{
    "status": "ok",
    "data": {
        "id": 1622,
        "name": "partner123@example.com",
        "email": "partner123@example.com",
        "language": 1,
        "timezone": "Europe/Warsaw",
        "status": true,
        "added": "2021-05-21 12:55:35",
        "lastLogin": "2021-05-21 12:55:35"
    }
}