NAV
shell javascript

Introduction

Welcome to the OneSuite API! You can use our API to access endpoints for managing your digital agency’s needs, including leads, clients, projects, invoices, and documents in our database.

Start integrating with OneSuite today to streamline your workflow and enhance productivity!

We have language bindings in Shell, JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
  -H "Authorization: your-api-key"
fetch("api_endpoint_here", {
    headers: {
        Authorization: "your-api-key",
    },
});

Make sure to replace your-api-key with your API key.

OneSuite uses API keys to allow access to the API. You can register a new OneSuite API key in your business settings.

OneSuite expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: your-api-key

Leads

Get All Leads

curl -X GET "https://api.onesuite.io/v1/leads" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "leads": [
        {
            "id": "cly42bt1z0000b0gifv0g05wt",
            "firstName": "Farhan",
            "lastName": "Mahbub",
            "fullName": "Farhan Mahbub",
            "email": "[email protected]",
            "profileImg": "",
            "personalEmail": "",
            "dateOfBirth": "1997-10-02",
            "designation": "",
            "primaryContact": "",
            "secondaryContact": "",
            "status": "lead",
            "primaryPhone": "",
            "secondaryPhone": "",
            "address": {
                "city": "",
                "state": "",
                "address": "",
                "country": "",
                "postalCode": ""
            },
            "fax": "",
            "personalWebsite": "",
            "customerStatus": "Pending",
            "linkedinUrl": "",
            "shortNote": "",
            "keywords": "",
            "industry": null,
            "leadAssignedTo": [
                {
                    "id": "clxsoc3ga000013sfno0b8ve6",
                    "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c",
                    "fullName": "Farhaan Mahbub",
                    "email": "[email protected]"
                }
            ],
            "leadSource": null,
            "priority": "high",
            "tags": [],
            "opportunityStage": {
                "id": "clxsofj8l005m13sftt7hdavu",
                "stageName": "Qualified Leads",
                "stageColor": "#f4f4f6",
                "stageNo": 1,
                "isFolded": false
            },
            "leadSortId": -1,
            "createdAt": "Tue Jul 02 2024",
            "updatedAt": "Thu Jul 11 2024"
        }
    ]
}

To fetch all existing leads, you can use the following HTTP request:

HTTP Request

GET https://api.onesuite.io/v1/leads

Get Specific Lead

curl -X GET "https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "lead": {
        "id": "clyh6jm5w000011qy9u50ojy6",
        "firstName": "John",
        "lastName": "Doe",
        "fullName": "John Doe",
        "email": "[email protected]",
        "profileImg": "http://surl.li/poztbl",
        "status": "lead",
        "personalEmail": "[email protected]",
        "dateOfBirth": "1990-01-01",
        "designation": "CEO",
        "primaryContact": "Jane Smith",
        "secondaryContact": "Bob Johnson",
        "primaryPhone": "555-123-4567",
        "secondaryPhone": "555-987-6543",
        "address": {
            "city": "Anytown",
            "state": "CA",
            "address": "123 Main St",
            "country": "USA",
            "postalCode": "12345"
        },
        "fax": "555-112-2334",
        "personalWebsite": "https://johnswebsite.com",
        "linkedinUrl": "https://linkedin.com/in/johndoe",
        "shortNote": "High-priority client.",
        "keywords": "Key Lead, Important",
        "companyId": "clyh5cnx40007h0bjyrtye0tb",
        "clientStatus": "pending",
        "companyName": "Doe Enterprises",
        "companyEmail": "[email protected]",
        "companyPhone": "555-000-1111",
        "companyAddress": {
            "companyCity": "Businesstown",
            "companyState": "NY",
            "companyAddress": "456 Corporate Blvd",
            "companyCountry": "USA",
            "companyPostalCode": "67890"
        },
        "foundedDate": "2005-05-15",
        "companyWebsite": "https://doeenterprises.com",
        "companyServices": null,
        "companyServiceArea": "Global",
        "industry": {
            "id": "clxsofj8s005s13sfdk45iq2j",
            "name": "Fintech"
        },
        "leadAssignedTo": [
            {
                "id": "clxsoc3ga000013sfno0b8ve6",
                "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c",
                "fullName": "Farhaan Mahbub"
            }
        ],
        "leadSource": {
            "id": "clxsofj8z006013sfba1htksx",
            "name": "SEO"
        },
        "priority": "very_high",
        "tags": [
            {
                "id": "clxsofj96006713sfr9iikxoj",
                "name": "Client"
            }
        ],
        "opportunityStage": {
            "id": "clxsofj8l005m13sftt7hdavu",
            "stageName": "Qualified Leads"
        },
        "probability": 0,
        "expectedRevenue": 0,
        "clientReclassifiedAsLead": false,
        "createdAt": "Thu Jul 11 2024",
        "updatedAt": "Thu Jul 11 2024"
    }
}

This endpoint retrieves a specific lead.

HTTP Request

GET https://api.onesuite.io/v1/leads/<LEAD_ID>

URL Parameters

Parameter Description
LEAD_ID The ID of the lead to retrieve

Create Lead

curl -X POST https://api.onesuite.io/v1/leads \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "firstName": "John",
    "lastName": "Doe",
    "profileImg": "http://surl.li/poztbl",
    "address": {
        "address": "123 Main St",
        "city": "Anytown",
        "state": "CA",
        "postalCode": "12345",
        "country": "USA"
    },
    "priority": "very_high",
    "industry": "clxsofj8s005s13sfdk45iq2j",
    "source": "clxsofj8z006013sfba1htksx",
    "opportunityStage": "Qualified Leads",
    "tags": [{"key": "clxsofj96006713sfr9iikxoj"}],
    "email": "[email protected]",
    "personalEmail": "[email protected]",
    "dateOfBirth": "1990-01-01",
    "designation": "CEO",
    "primaryPhone": "555-123-4567",
    "secondaryPhone": "555-987-6543",
    "fax": "555-112-2334",
    "personalWebsite": "https://johnswebsite.com",
    "linkedinUrl": "https://linkedin.com/in/johndoe",
    "shortNote": "High-priority client.",
    "notes": ["Important client with potential for large contract.", "This is a note"],
    "probability": 23,
    "expectedRevenue":233,
    "keywords": "Key Lead, Important",
    "companyName": "Doe Enterprises",
    "companyEmail": "[email protected]",
    "companyPhone": "555-000-1111",
    "companyAddress": {
        "companyAddress": "456 Corporate Blvd",
        "companyCity": "Businesstown",
        "companyState": "NY",
        "companyPostalCode": "67890",
        "companyCountry": "USA"
    },
    "foundedDate": "2005-05-15",
    "companyWebsite": "https://doeenterprises.com",
    "companyServiceArea": "Global",

}'

fetch("https://api.onesuite.io/v1/leads", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        firstName: "John",
        lastName: "Doe",
        profileImg: "http://surl.li/poztbl",
        address: {
            address: "123 Main St",
            city: "Anytown",
            state: "CA",
            postalCode: "12345",
            country: "USA",
        },
        priority: "very_high",
        industry: "clxsofj8s005s13sfdk45iq2j",
        source: "clxsofj8z006013sfba1htksx",
        opportunityStage: "Qualified Leads",
        tags: [{ key: "clxsofj96006713sfr9iikxoj" }],
        email: "[email protected]",
        personalEmail: "[email protected]",
        dateOfBirth: "1990-01-01",
        designation: "CEO",
        primaryPhone: "555-123-4567",
        secondaryPhone: "555-987-6543",
        fax: "555-112-2334",
        personalWebsite: "https://johnswebsite.com",
        linkedinUrl: "https://linkedin.com/in/johndoe",
        shortNote: "High-priority client.",
        notes: [
            "Important client with potential for large contract.",
            "This is a note",
        ],
        probability: 23,
        expectedRevenue: 233,
        keywords: "Key Lead, Important",
        companyName: "Doe Enterprises",
        companyEmail: "[email protected]",
        companyPhone: "555-000-1111",
        companyAddress: {
            companyAddress: "456 Corporate Blvd",
            companyCity: "Businesstown",
            companyState: "NY",
            companyPostalCode: "67890",
            companyCountry: "USA",
        },
        foundedDate: "2005-05-15",
        companyWebsite: "https://doeenterprises.com",
        companyServiceArea: "Global",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "data": {
        "id": "clyh5ge8x000dh0bje1oxwxpy",
        "firstName": "John",
        "lastName": "Doe",
        "fullName": "John Doe",
        "profileImg": "http://surl.li/poztbl",
        "email": "[email protected]",
        "personalEmail": "[email protected]",
        "password": null,
        "dateOfBirth": "1990-01-01",
        "designation": "CEO",
        "primaryContact": "Jane Smith",
        "secondaryContact": "Bob Johnson",
        "primaryPhone": "555-123-4567",
        "secondaryPhone": "555-987-6543",
        "address": {
            "city": "Anytown",
            "state": "CA",
            "address": "123 Main St",
            "country": "USA",
            "postalCode": "12345"
        },
        "fax": "555-112-2334",
        "personalWebsite": "https://johnswebsite.com",
        "linkedinUrl": "https://linkedin.com/in/johndoe",
        "keywords": "Key Lead, Important",
        "additionalField": null,
        "failedLoginAttempts": 0,
        "passwordChangeAt": null,
        "passwordResetToken": null,
        "status": "lead",
        "customerStatus": "pending",
        "leadSortId": -1,
        "probability": 23,
        "expectedRevenue": 233,
        "opportunityStageId": "clxsofj8l005m13sftt7hdavu",
        "clientReclassifiedAsLead": false,
        "industryId": null,
        "priority": "high",
        "leadSourceId": null,
        "shortNote": "High-priority client.",
        "clinetCompanyId": "clyh5cnx40007h0bjyrtye0tb",
        "userToBusinessId": null,
        "lastLoggedInAt": null,
        "createdAt": "2024-07-11T10:52:13.473Z",
        "updatedAt": "2024-07-11T10:52:13.473Z",
        "notes": [
            {
                "id": "cm2x6q5jr0004c7niy0u4gorx",
                "name": "Important client with potential for large contract.",
                "noteCreatedById": null,
                "clientProfileId": "cm2x6q5j80000c7niznzp9a3k",
                "createdAt": "2024-10-31T10:50:56.535Z",
                "updatedAt": "2024-10-31T10:50:56.535Z"
            },
            {
                "id": "cm2x6q5js0006c7ni9vtgrx8a",
                "name": "This is a note",
                "noteCreatedById": null,
                "clientProfileId": "cm2x6q5j80000c7niznzp9a3k",
                "createdAt": "2024-10-31T10:50:56.537Z",
                "updatedAt": "2024-10-31T10:50:56.537Z"
            }
        ]
    }
}

This endpoint creates a new lead to your business.

HTTP Request

POST https://api.onesuite.io/v1/leads

Body Parameters

Parameter Type Required Description
firstName string yes Add first name of a lead
lastName string no Add last name of a lead
email string yes Add email of a lead
profileImg string no Add profile image of a lead
address object no Add address of a lead. object requires { address, city, state, postalCode, country }
priority string no Add priority of a lead . Can be either of "very_high" or "high" or "medium" or "low"
industry string no Industry id of an existing industry from your business
source string no Source id of an existing source from your business
opportunityStageId string no Stage id from the stages available in your business.If not given, first stage will be used by default.
tags array no Attach tags available in your business. The array is a list of objects. Example - [{key="tag_id"}]
personalEmail string no Add personal email of a lead
dateOfBirth date no Add DOB of a lead
designation string no Add designation of a lead
primaryPhone string no Add primary phone of a lead
secondaryPhone string no Add secondary phone of a lead
fax string no Add fax of a lead
personalWebsite string no Add portfolio website of a lead
linkedinUrl string no Add linkedin url of a lead
shortNote string no Add project hints or short note for a lead
keywords string no Add keywords of a lead. Keywords can be comma seperated. "Key Lead, Important"
notes array of strings no Add notes for a lead.
probability number (1<=value<=100) no Add probability for a lead.
expectedRevenue number (1<=value) no Add expected revenue for a lead.
companyName string no Add company of a lead. If no company avaialble with given, a company will be created.
companyEmail string no Add company email for given company
companyPhone string no Add company phone for given company
companyAddress object no Add company address for given company. object requires { companyAddress, companyCity, companyState, companyPostalCode, companyCountry }
foundedDate string no Add founded date for given company lead

| companyWebsite | string | no | Add website for given company | | companyServiceArea | string | no | Add service area for given company |

Edit Lead

curl -X PATCH https://api.onesuite.io/v1/leads/clyl4njxl00001cf9rb5qsjzb?type=primary-data \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "firstName": "John",
    "lastName": "Doe",
    "profileImg": "http://surl.li/poztbl",
    "address": {
        "address": "123 Main St",
        "city": "Anytown",
        "state": "CA",
        "postalCode": "12345",
        "country": "USA"
    },
    "email": "[email protected]",
    "personalEmail": "[email protected]",
    "dateOfBirth": "1990-01-01",
    "designation": "CEO",
    "primaryPhone": "555-123-4567",
    "secondaryPhone": "555-987-6543",
    "fax": "555-112-2334",
    "personalWebsite": "https://johnswebsite.com",
    "linkedinUrl": "https://linkedin.com/in/johndoe",
    "notes": "Important client with potential for large contract.",
    "shortNote": "High-priority client.",
    "keywords": "Key Lead, Important",
    "companyName": "Doe Enterprises",
    "companyEmail": "[email protected]",
    "companyPhone": "555-000-1111",
    "companyAddress": {
        "companyAddress": "456 Corporate Blvd",
        "companyCity": "Businesstown",
        "companyState": "NY",
        "companyPostalCode": "67890",
        "companyCountry": "USA"
    },
    "foundedDate": "2005-05-15",
    "companyWebsite": "https://doeenterprises.com",
    "companyServiceArea": "Global",
}'

fetch(
    "https://api.onesuite.io/v1/leads/clyl4njxl00001cf9rb5qsjzb?type=primary-data",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            firstName: "John",
            lastName: "Doe",
            profileImg: "http://surl.li/poztbl",
            address: {
                address: "123 Main St",
                city: "Anytown",
                state: "CA",
                postalCode: "12345",
                country: "USA",
            },
            email: "[email protected]",
            personalEmail: "[email protected]",
            dateOfBirth: "1990-01-01",
            designation: "CEO",
            primaryPhone: "555-123-4567",
            secondaryPhone: "555-987-6543",
            fax: "555-112-2334",
            personalWebsite: "https://johnswebsite.com",
            linkedinUrl: "https://linkedin.com/in/johndoe",
            notes: "Important client with potential for large contract.",
            shortNote: "High-priority client.",
            keywords: "Key Lead, Important",
            companyName: "Doe Enterprises",
            companyEmail: "[email protected]",
            companyPhone: "555-000-1111",
            companyAddress: {
                companyAddress: "456 Corporate Blvd",
                companyCity: "Businesstown",
                companyState: "NY",
                companyPostalCode: "67890",
                companyCountry: "USA",
            },
            foundedDate: "2005-05-15",
            companyWebsite: "https://doeenterprises.com",
            companyServiceArea: "Global",
        }),
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "data": {
        "id": "clyl4njxl00001cf9rb5qsjzb",
        "firstName": "Updated John",
        "lastName": "Doe",
        "fullName": "Updated John Doe",
        "profileImg": "http://surl.li/poztbl",
        "email": "[email protected]",
        "personalEmail": "[email protected]",
        "password": null,
        "dateOfBirth": "1990-01-01",
        "designation": "CEO",
        "primaryContact": "Jane Smith",
        "secondaryContact": "Bob Johnson",
        "primaryPhone": "555-123-4567",
        "secondaryPhone": "555-987-6543",
        "address": {
            "city": "Anytown",
            "state": "CA",
            "address": "123 Main St",
            "country": "USA",
            "postalCode": "12345"
        },
        "fax": "555-112-2334",
        "personalWebsite": "https://johnswebsite.com",
        "linkedinUrl": "https://linkedin.com/in/johndoe",
        "keywords": "Key Lead, Important",
        "additionalField": null,
        "failedLoginAttempts": 0,
        "passwordChangeAt": null,
        "passwordResetToken": null,
        "status": "lead",
        "customerStatus": "pending",
        "leadSortId": -1,
        "probability": 0,
        "expectedRevenue": 0,
        "opportunityStageId": "clxsofj8l005m13sftt7hdavu",
        "clientReclassifiedAsLead": false,
        "industryId": "clxsofj8s005s13sfdk45iq2j",
        "priority": "very_high",
        "leadSourceId": "clxsofj8z006013sfba1htksx",
        "shortNote": "High-priority client.",
        "clinetCompanyId": "clylgaq980000zhrs3y3e6zcs",
        "userToBusinessId": "clyl4njy400021cf997rdrz43",
        "lastLoggedInAt": null,
        "createdAt": "2024-07-14T05:40:52.520Z",
        "updatedAt": "2024-07-14T11:30:17.828Z"
    }
}

This endpoint updates an existing lead in your business.

HTTP Request

PATCH https://api.onesuite.io/v1/leads/<LEAD_ID>?type=primary-data

URL Parameters

Parameter Description
LEAD_ID The ID of the lead to edit

Body Parameters

Parameter Type Required Description
firstName string yes Add first name of a lead
lastName string no Add last name of a lead
email string yes Add email of a lead
profileImg string no Add profile image of a lead
address object no Add address of a lead. object requires { address, city, state, postalCode, country }
personalEmail string no Add personal email of a lead
dateOfBirth date no Add DOB of a lead
designation string no Add designation of a lead
primaryPhone string no Add primary phone of a lead
secondaryPhone string no Add secondary phone of a lead
fax string no Add fax of a lead
personalWebsite string no Add portfolio website of a lead
linkedinUrl string no Add linkedin url of a lead
shortNote string no Add short note of a lead
keywords string no Add keywords of a lead. Keywords can be comma seperated. "Key Lead, Important"
companyName string no Add company of a lead. If no company avaialble with given, a company will be created.
companyEmail string no Add company email for given company
companyPhone string no Add company phone for given company
companyAddress object no Add company address for given company. object requires { companyAddress, companyCity, companyState, companyPostalCode, companyCountry }
foundedDate string no Add notes of a lead
notes string no Add founded date for given company
companyWebsite string no Add website for given company
companyServiceArea string no Add service area for given company

Delete Lead

curl -X DELETE "https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6", {
    method: "DELETE",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "message": "Deleted successfully"
}

This endpoint deletes a specific lead.

HTTP Request

DELETE https://api.onesuite.io/v1/leads/<LEAD_ID>

URL Parameters

Parameter Description
LEAD_ID The ID of the lead to delete

Convert Lead to Client

curl -X POST "https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6/convert-to-client" \
  -H "Authorization: your-api-key"
fetch(
    "https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6/convert-to-client",
    {
        method: "POST",
        headers: {
            Authorization: "your-api-key",
        },
    }
);

The above command returns JSON structured like this:

{
    "message": "Lead is converted to client"
}

This endpoint converts a lead into client.

HTTP Request

DELETE https://api.onesuite.io/v1/leads/<LEAD_ID>/convert-to-client

URL Parameters

Parameter Description
LEAD_ID The ID of the lead to convert

Lead Opportunity Stages

Get All Opportunity Stages

curl -X GET "https://api.onesuite.io/v1/leads/opportuniy-stages" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/opportuniy-stages", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "data": [
        {
            "stageName": "Qualified Leads",
            "stageColor": "#f4f4f6",
            "id": "cm0teaf6t005mobeu15b5sghy"
        },
        {
            "stageName": "Meeting Scheduled",
            "stageColor": "#f4f4f6",
            "id": "cm0teaf6u005nobeuhb42qa2g"
        },
        {
            "stageName": "Proposal Sent",
            "stageColor": "#f4f4f6",
            "id": "cm0teaf6u005oobeu11yv1c6o"
        },
        {
            "stageName": "Follow Up Needed",
            "stageColor": "#f4f4f6",
            "id": "cm0teaf6u005pobeuz8ofguxk"
        },
        {
            "stageName": "Won",
            "stageColor": "#f4f4f6",
            "id": "cm0teaf6u005qobeuavzaanb5"
        },
        {
            "stageName": "Lost",
            "stageColor": "#f4f4f6",
            "id": "cm0teaf6u005robeuy1jsmhsv"
        }
    ]
}

This endpoint retrieves all lead opportunity stages for a business.

HTTP Request

GET https://api.onesuite.io/v1/leads/opportuniy-stages

Lead Tasks

Get All Tasks

curl -X GET "https://api.onesuite.io/v1/leads/clyl4njxl00001cf9rb5qsjzb/tasks" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/clyl4njxl00001cf9rb5qsjzb/tasks", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "leadTasks": [
        {
            "id": "clyl4tqj70000mpw8l4lruls2",
            "name": "Example of lead task",
            "status": "incomplete",
            "priority": "high",
            "dueDate": "2024-07-30T23:45",
            "remainderDate": "2024-07-29T23:45",
            "assignedToId": "clxsof7jh001r13sf6pjlxytc",
            "clientProfileId": "clyl4njxl00001cf9rb5qsjzb",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-14T05:45:41.012Z",
            "updatedAt": "2024-07-14T05:45:41.012Z"
        }
    ],
    "message": "success"
}

This endpoint retrieves all tasks created for a lead.

HTTP Request

GET https://api.onesuite.io/v1/leads/<LEAD_ID>/tasks

URL Parameters

Get Specific Task

curl -X GET "https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6/tasks/clyl4tqj70000mpw8l4lruls2" \
  -H "Authorization: your-api-key"
fetch(
    "https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6/tasks/clyl4tqj70000mpw8l4lruls2",
    {
        method: "GET",
        headers: {
            Authorization: "your-api-key",
        },
    }
);

The above command returns JSON structured like this:

{
    "leadTask": {
        "id": "clyl4tqj70000mpw8l4lruls2",
        "name": "Example of lead task",
        "status": "incomplete",
        "priority": "high",
        "dueDate": "2024-07-30T23:45",
        "remainderDate": "2024-07-29T23:45",
        "assignedToId": "clxsof7jh001r13sf6pjlxytc",
        "clientProfileId": "clyl4njxl00001cf9rb5qsjzb",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-07-14T05:45:41.012Z",
        "updatedAt": "2024-07-14T05:45:41.012Z"
    },
    "message": "success"
}

This endpoint retrieves a specific task of a lead.

HTTP Request

GET https://api.onesuite.io/v1/leads/<LEAD_ID>/tasks/<TASK_ID>

URL Parameters

Create Task

curl -X POST https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6/tasks/ \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "Description of lead task",
    "priority": "high",
    "dueDate": "2024-07-30T12:25",
    "remainderDate": "2024-07-29T12:25",
    "assignedTo":"clxsof7jh001r13sf6pjlxytc"
}'

fetch("https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6/tasks/", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "Description of lead task",
        priority: "high",
        dueDate: "2024-07-30T12:25",
        remainderDate: "2024-07-29T12:25",
        assignedTo: "clxsof7jh001r13sf6pjlxytc",
    }),
});

The above command returns JSON structured like this:

{
    "leadTasks": [
        {
            "id": "clyl6awg70001ya8e0ocw1bwx",
            "name": "Description of lead task",
            "status": "incomplete",
            "priority": "high",
            "dueDate": "2024-07-30T12:25",
            "remainderDate": "2024-07-29T12:25",
            "assignedToId": "clxsof7jh001r13sf6pjlxytc",
            "clientProfileId": "clyl4njxl00001cf9rb5qsjzb",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-14T06:27:01.447Z",
            "updatedAt": "2024-07-14T06:27:01.447Z"
        }
    ],
    "message": "Task added successfully"
}

This endpoint creates a new task for a specific lead.

HTTP Request

POST https://api.onesuite.io/v1/leads/<LEAD_ID>/tasks/

Body Parameters

Parameter Type Required Description
name string yes Task description
priority enum yes Priority of the task (urgent, high, medium, normal low)
dueDate datetime no Due date for the task
remainderDate datetime no Reminder date for the task
assignedTo string yes Team member's userToBusinessId. It will assign the member to the task

Edit Task

curl -X PATCH https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6/tasks/clyl4tqj70000mpw8l4lruls2 \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "Updated Description of lead task",
    "priority": "urgent",
    "dueDate": "2024-07-30T12:25",
    "remainderDate": "2024-07-29T12:25",
    "assignedTo":"clxsof7jh001r13sf6pjlxytc"
}'

fetch(
    "https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6/tasks/clyl4tqj70000mpw8l4lruls2",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            name: "Updated Description of lead task",
            priority: "urgent",
            dueDate: "2024-07-30T12:25",
            remainderDate: "2024-07-29T12:25",
            assignedTo: "clxsof7jh001r13sf6pjlxytc",
        }),
    }
);

The above command returns JSON structured like this:

{
    "task": {
        "id": "clyl6awg70001ya8e0ocw1bwx",
        "name": "Updated Description of lead task",
        "status": "incomplete",
        "priority": "urgent",
        "dueDate": "2024-07-30T12:25",
        "remainderDate": "2024-07-29T12:25",
        "assignedToId": "clxsof7jh001r13sf6pjlxytc",
        "clientProfileId": "clyl4njxl00001cf9rb5qsjzb",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-07-14T06:27:01.447Z",
        "updatedAt": "2024-07-14T06:42:32.135Z",
        "assignedTo": {
            "id": "clxsof7jh001r13sf6pjlxytc",
            "status": "active",
            "role": "admin",
            "memberId": "",
            "user": {
                "id": "clxsoc3ga000013sfno0b8ve6",
                "fullName": "Farhaan Mahbub",
                "email": "[email protected]",
                "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
            }
        },
        "lead": {
            "id": "clyl4njxl00001cf9rb5qsjzb",
            "name": "John Doe",
            "profileImg": "http://surl.li/poztbl",
            "email": "[email protected]"
        },
        "assignedUser": {
            "fullName": "Farhaan Mahbub",
            "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c",
            "email": "[email protected]"
        }
    },
    "message": "Task updated successfully"
}

This endpoint updates a task for a specific lead.

HTTP Request

POST https://api.onesuite.io/v1/leads/<LEAD_ID>/tasks/<TASK_ID>

Body Parameters

Parameter Type Required Description
name string yes Task description
priority enum yes Priority of the task (urgent, high, medium, normal low)
dueDate datetime no Due date for the task
remainderDate datetime no Reminder date for the task
assignedTo string yes Team member's userToBusinessId. It will assign the member to the task

Delete Task

curl -X DELETE "https://api.onesuite.io/v1/leads/clyl4njxl00001cf9rb5qsjzb/tasks/clyh6jm5w000011qy9u50ojy6" \
  -H "Authorization: your-api-key"
fetch(
    "https://api.onesuite.io/v1/leads/clyl4njxl00001cf9rb5qsjzb/tasks/clyh6jm5w000011qy9u50ojy6",
    {
        method: "DELETE",
        headers: {
            Authorization: "your-api-key",
        },
    }
);

The above command returns JSON structured like this:

{
    "leadTasks": [
        {
            "id": "clyl4tqj70000mpw8l4lruls2",
            "name": "Example of lead task",
            "status": "complete",
            "priority": "high",
            "dueDate": "2024-07-30T23:45",
            "remainderDate": "2024-07-29T23:45",
            "assignedToId": "clxsof7jh001r13sf6pjlxytc",
            "clientProfileId": "clyl4njxl00001cf9rb5qsjzb",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-14T05:45:41.012Z",
            "updatedAt": "2024-07-14T06:44:29.341Z"
        },
        {
            "id": "clyl68zp10000ya8e03w3pizu",
            "name": "Description of task",
            "status": "incomplete",
            "priority": "high",
            "dueDate": "2024-07-30T12:25",
            "remainderDate": "2024-07-29T12:25",
            "assignedToId": "clxsof7jh001r13sf6pjlxytc",
            "clientProfileId": "clyl4njxl00001cf9rb5qsjzb",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-14T06:25:32.341Z",
            "updatedAt": "2024-07-14T06:25:32.341Z"
        }
    ],
    "message": "Task successfully deleted"
}

This endpoint deletes a specific task of a lead.

HTTP Request

DELETE https://api.onesuite.io/v1/leads/<LEAD_ID>/tasks/<TASK_ID>

URL Parameters

Update Task Status

curl -X PATCH https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6/tasks/clyl4tqj70000mpw8l4lruls2/status \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "status": "complete"
}'

fetch(
    "https://api.onesuite.io/v1/leads/clyh6jm5w000011qy9u50ojy6/tasks/clyl4tqj70000mpw8l4lruls2",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            status: "complete",
        }),
    }
);

The above command returns JSON structured like this:

{
    "task": {
        "id": "clyl6awg70001ya8e0ocw1bwx",
        "name": "Updated Description of lead task",
        "status": "complete",
        "priority": "urgent",
        "dueDate": "2024-07-30T12:25",
        "remainderDate": "2024-07-29T12:25",
        "assignedToId": "clxsof7jh001r13sf6pjlxytc",
        "clientProfileId": "clyl4njxl00001cf9rb5qsjzb",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-07-14T06:27:01.447Z",
        "updatedAt": "2024-07-14T06:48:00.723Z",
        "assignedTo": {
            "id": "clxsof7jh001r13sf6pjlxytc",
            "status": "active",
            "role": "admin",
            "memberId": "",
            "user": {
                "id": "clxsoc3ga000013sfno0b8ve6",
                "fullName": "Farhaan Mahbub",
                "email": "[email protected]",
                "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
            }
        },
        "lead": {
            "id": "clyl4njxl00001cf9rb5qsjzb",
            "name": "John Doe",
            "profileImg": "http://surl.li/poztbl",
            "email": "[email protected]"
        },
        "assignedUser": {
            "fullName": "Farhaan Mahbub",
            "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c",
            "email": "[email protected]"
        }
    },
    "message": "Task status is updated"
}

This endpoint updates the status of a task.

HTTP Request

POST https://api.onesuite.io/v1/leads/<LEAD_ID>/tasks/<TASK_ID>/status

Body Parameters

Parameter Type Required Description
status enum yes Status of the task. (complete, incomplete)

Lead Tags

Get All Tags

To retrieve all tags, you can use the following HTTP request:

curl -X GET "https://api.onesuite.io/v1/leads/tags" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/tags", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "tags": [
        {
            "key": "clxsofj96006713sfr9iikxoj",
            "label": "Client",
            "totalLeads": 5,
            "createdAt": "2024-06-24T07:49:11.610Z",
            "updatedAt": "2024-06-24T07:49:11.610Z"
        },
        {
            "key": "clxsofj96006813sf9sqzqt5e",
            "label": "North America",
            "totalLeads": 0,
            "createdAt": "2024-06-24T07:49:11.610Z",
            "updatedAt": "2024-06-24T07:49:11.610Z"
        },
        {
            "key": "clxsofj96006913sfmge4m9y5",
            "label": "Europe",
            "totalLeads": 0,
            "createdAt": "2024-06-24T07:49:11.610Z",
            "updatedAt": "2024-06-24T07:49:11.610Z"
        }
    ]
}

This endpoint retrieves all tags available in Leads module.

HTTP Request

GET https://api.onesuite.io/v1/leads/tags

Get Specific Tag

To retrieve a specific tag, you can use the following HTTP request:

curl -X GET "https://api.onesuite.io/v1/leads/tags/<TAG_ID>" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/tags/<TAG_ID>", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "tag": {
        "id": "clxsofj96006813sf9sqzqt5e",
        "name": "North America",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-06-24T07:49:11.610Z",
        "updatedAt": "2024-06-24T07:49:11.610Z"
    }
}

This endpoint retrieves a specific tag by its ID.

HTTP Request

GET https://api.onesuite.io/v1/leads/tags/<TAG_ID>

URL Parameters

Parameter Description
TAG_ID The ID of the tag to retrieve

Create Tag

To create a new tag, you can use the following HTTP request:

curl -X POST https://api.onesuite.io/v1/leads/tags \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "New Tag"
}'
fetch("https://api.onesuite.io/v1/leads/tags", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "New Tag",
    }),
});

The above command returns JSON structured like this:

{
    "leadTags": [
        {
            "id": "clylc7zn000001wlczimwznaw",
            "name": "New Tag",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-14T09:12:43.308Z",
            "updatedAt": "2024-07-14T09:12:43.308Z"
        }
    ],
    "message": "Tag added successfully"
}

This endpoint creates a new tag in the Leads module.

HTTP Request

POST https://api.onesuite.io/v1/leads/tags

Body Parameters

Parameter Type Required Description
name string yes Name of the tag

Edit Tag

To edit an existing tag, you can use the following HTTP request:

curl -X PATCH https://api.onesuite.io/v1/leads/tags/<TAG_ID> \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "Updated Tag Name"
}'
fetch("https://api.onesuite.io/v1/leads/tags/<TAG_ID>", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "Updated Tag Name",
    }),
});

The above command returns JSON structured like this:

{
    "leadTag": {
        "id": "clxsofj96006813sf9sqzqt5e",
        "name": "Updated Tag Name",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-06-24T07:49:11.610Z",
        "updatedAt": "2024-07-14T09:18:24.149Z"
    },
    "message": "Tag name updated"
}

This endpoint allows you to edit the name of an existing tag in the Leads module.

HTTP Request

PATCH https://api.onesuite.io/v1/leads/tags/<TAG_ID>

URL Parameters

Parameter Description
TAG_ID The ID of the tag to edit

Body Parameters

Parameter Type Required Description
name string yes Updated tag name

Delete Tag

To delete an existing tag, you can use the following HTTP request:

curl -X DELETE "https://api.onesuite.io/v1/leads/tags/<TAG_ID>" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/tags/<TAG_ID>", {
    method: "DELETE",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "leadTags": [
        {
            "id": "clxsofj96006713sfr9iikxoj",
            "name": "Client",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-06-24T07:49:11.610Z",
            "updatedAt": "2024-06-24T07:49:11.610Z"
        },
        {
            "id": "clxsofj96006913sfmge4m9y5",
            "name": "Europe",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-06-24T07:49:11.610Z",
            "updatedAt": "2024-06-24T07:49:11.610Z"
        },
        {
            "id": "clylc7zn000001wlczimwznaw",
            "name": "New Tag",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-14T09:12:43.308Z",
            "updatedAt": "2024-07-14T09:12:43.308Z"
        }
    ],
    "message": "Tag successfully deleted"
}

This endpoint allows you to delete an existing tag in the Leads module.

HTTP Request

DELETE https://api.onesuite.io/v1/leads/tags/<TAG_ID>

URL Parameters

Parameter Description
TAG_ID The ID of the tag to delete

Lead Sources

Get All Sources

To retrieve all sources, you can use the following HTTP request.

curl -X GET "https://api.onesuite.io/v1/leads/sources" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/sources", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "data": [
        {
            "id": "clxsofj8z006013sfba1htksx",
            "name": "SEO",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-06-24T07:49:11.603Z",
            "updatedAt": "2024-06-24T07:49:11.603Z"
        },
        {
            "id": "clxsofj8z006113sftafck2u4",
            "name": "Website",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-06-24T07:49:11.603Z",
            "updatedAt": "2024-06-24T07:49:11.603Z"
        },
        {
            "id": "clxsofj8z006213sfhlsnjqsa",
            "name": "Linkedin",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-06-24T07:49:11.603Z",
            "updatedAt": "2024-06-24T07:49:11.603Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/leads/sources

Get Specific Source

To retrieve a specific source, you can use the following HTTP request:

curl -X GET "https://api.onesuite.io/v1/leads/sources/<SOURCE_ID>" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/sources/<SOURCE_ID>", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "data": {
        "id": "clxsofj8z006213sfhlsnjqsa",
        "name": "Linkedin",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-06-24T07:49:11.603Z",
        "updatedAt": "2024-06-24T07:49:11.603Z"
    }
}

This endpoint retrieves a specific source by its ID.

HTTP Request

GET https://api.onesuite.io/v1/leads/sources/<SOURCE_ID>

URL Parameters

Parameter Description
SOURCE_ID The ID of the source to retrieve

Create Source

To create a new tag, you can use the following HTTP request:

curl -X POST https://api.onesuite.io/v1/leads/sources \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "New Source"
}'
fetch("https://api.onesuite.io/v1/leads/sources", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "New Source",
    }),
});

The above command returns JSON structured like this:

{
    "leadSources": [
        {
            "id": "clyld2v8o0000c33s14rckxgw",
            "name": "New Source",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-14T09:36:43.944Z",
            "updatedAt": "2024-07-14T09:36:43.944Z"
        }
    ],
    "message": "Source added successfully"
}

HTTP Request

POST https://api.onesuite.io/v1/leads/sources

Body Parameters

Parameter Type Required Description
name string yes Name of the source

Edit Source

To edit an existing source, you can use the following HTTP request:

curl -X PATCH https://api.onesuite.io/v1/leads/sources/<SOURCE_ID> \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "Updated Source Name"
}'
fetch("https://api.onesuite.io/v1/leads/sources/<SOURCE_ID>", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "Updated Source Name",
    }),
});

The above command returns JSON structured like this:

{
    "leadSource": {
        "id": "clxsofj8z006213sfhlsnjqsa",
        "name": "Updated Source Name",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-06-24T07:49:11.603Z",
        "updatedAt": "2024-07-14T09:40:07.144Z"
    },
    "message": "Source name updated"
}

HTTP Request

PATCH https://api.onesuite.io/v1/leads/sources/<SOURCE_ID>

URL Parameters

Parameter Description
SOURCE_ID The ID of the source to edit

Body Parameters

Parameter Type Required Description
name string yes Updated source name

Delete Source

To delete an existing source, you can use the following HTTP request:

curl -X DELETE "https://api.onesuite.io/v1/leads/sources/<SOURCE_ID>" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/sources/<SOURCE_ID>", {
    method: "DELETE",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "leadSources": [
        {
            "id": "clxsofj8z006513sfd9simjtb",
            "name": "Social Media",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-06-24T07:49:11.603Z",
            "updatedAt": "2024-06-24T07:49:11.603Z"
        },
        {
            "id": "clxsofj90006613sfu8eauhk9",
            "name": "Email Campaign",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-06-24T07:49:11.603Z",
            "updatedAt": "2024-06-24T07:49:11.603Z"
        },
        {
            "id": "clyld2v8o0000c33s14rckxgw",
            "name": "New Source",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-14T09:36:43.944Z",
            "updatedAt": "2024-07-14T09:36:43.944Z"
        }
    ],
    "message": "Source successfully deleted"
}

HTTP Request

DELETE https://api.onesuite.io/v1/leads/sources/<SOURCE_ID>

URL Parameters

Parameter Description
SOURCE_ID The ID of the source to delete

Lead Industries

Get All Industries

To retrieve all industries, you can use the following HTTP request.

curl -X GET "https://api.onesuite.io/v1/leads/industries" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/industries", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "data": [
        {
            "id": "clxsofj8s005s13sfdk45iq2j",
            "name": "Fintech",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-06-24T07:49:11.596Z",
            "updatedAt": "2024-06-24T07:49:11.596Z"
        },
        {
            "id": "clxsofj8s005t13sf9tmuotzp",
            "name": "EdTech",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-06-24T07:49:11.596Z",
            "updatedAt": "2024-06-24T07:49:11.596Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/leads/industries

Get Specific Industry

To retrieve a specific industry, you can use the following HTTP request:

curl -X GET "https://api.onesuite.io/v1/leads/industries/<INDUSTRY_ID>" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/industries/<INDUSTRY_ID>", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "data": {
        "id": "clxsofj8s005t13sf9tmuotzp",
        "name": "EdTech",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-06-24T07:49:11.596Z",
        "updatedAt": "2024-06-24T07:49:11.596Z"
    }
}

This endpoint retrieves a specific industry by its ID.

HTTP Request

GET https://api.onesuite.io/v1/leads/sources/<INDUSTRY_ID>

URL Parameters

Parameter Description
INDUSTRY_ID The ID of the industry to retrieve

Create Industry

To create a new industry, you can use the following HTTP request:

curl -X POST https://api.onesuite.io/v1/leads/industries \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
        "name": "New Industry"
}'
fetch("https://api.onesuite.io/v1/leads/industries", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "New Industry",
    }),
});

The above command returns JSON structured like this:

{
    "leadIndustries": [
        {
            "id": "clyledwt60000myodef3fh3zc",
            "name": "New Industry",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-14T10:13:18.810Z",
            "updatedAt": "2024-07-14T10:13:18.810Z"
        }
    ],
    "message": "Industry added successfully"
}

HTTP Request

POST https://api.onesuite.io/v1/leads/industries

Body Parameters

Parameter Type Required Description
name string yes Name of the source

Edit Industry

To edit an existing industry, you can use the following HTTP request:

curl -X PATCH https://api.onesuite.io/v1/leads/industries/<INDUSTRY_ID> \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "Updated Industry Name"
}'
fetch("https://api.onesuite.io/v1/leads/industries/<INDUSTRY_ID>", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "Updated Industry Name",
    }),
});

The above command returns JSON structured like this:

{
    "leadIndustry": {
        "id": "clxsofj8s005t13sf9tmuotzp",
        "name": "Updated Industry Name",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-06-24T07:49:11.596Z",
        "updatedAt": "2024-07-14T10:15:05.603Z"
    },
    "message": "Industry name updated"
}

HTTP Request

PATCH https://api.onesuite.io/v1/leads/industries/<INDUSTRY_ID>

URL Parameters

Parameter Description
INDUSTRY_ID The ID of the industry to edit

Body Parameters

Parameter Type Required Description
name string yes Updated industry name

Delete Industry

To delete an existing industry, you can use the following HTTP request:

curl -X DELETE "https://api.onesuite.io/v1/leads/industries/<INDUSTRY_ID>" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/industries/<INDUSTRY_ID>", {
    method: "DELETE",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "leadIndustries": [
        {
            "id": "clxsofj8s005z13sfmrfqn9sf",
            "name": "AI",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-06-24T07:49:11.596Z",
            "updatedAt": "2024-06-24T07:49:11.596Z"
        },
        {
            "id": "clyledwt60000myodef3fh3zc",
            "name": "New Industry",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-14T10:13:18.810Z",
            "updatedAt": "2024-07-14T10:13:18.810Z"
        }
    ],
    "message": "Industry successfully deleted"
}

HTTP Request

DELETE https://api.onesuite.io/v1/leads/industries/<INDUSTRY_ID>

URL Parameters

Parameter Description
INDUSTRY_ID The ID of the industry to delete

Companies

Get All Companies

To retrieve all companies, you can use the following HTTP request.

curl -X GET "https://api.onesuite.io/v1/leads/companies" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/companies", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "companies": [
        {
            "id": "clyh5cnx40007h0bjyrtye0tb",
            "companyName": "Doe Enterprises",
            "companyEmail": "[email protected]",
            "companyPhone": "555-000-1111",
            "companyAddress": {
                "companyCity": "Businesstown",
                "companyState": "NY",
                "companyAddress": "456 Corporate Blvd",
                "companyCountry": "USA",
                "companyPostalCode": "67890"
            },
            "foundedDate": "2005-05-15",
            "companyWebsite": "https://doeenterprises.com",
            "companyServices": null,
            "companyServiceArea": "Global",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-11T10:49:19.385Z",
            "updatedAt": "2024-07-11T10:49:19.385Z"
        },
        {
            "id": "clyh58a430000h0bjixckpd51",
            "companyName": "Company Name",
            "companyEmail": "[email protected]",
            "companyPhone": "3732294709",
            "companyAddress": {
                "companyCity": "City",
                "companyState": "State",
                "companyAddress": "Address",
                "companyCountry": "",
                "companyPostalCode": "Zip Code"
            },
            "foundedDate": "2024-07-11",
            "companyWebsite": "https://company.com",
            "companyServices": "",
            "companyServiceArea": "",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "createdAt": "2024-07-11T10:45:54.867Z",
            "updatedAt": "2024-07-11T10:45:54.867Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/leads/companies

Get Specific Company

To retrieve a specific company, you can use the following HTTP request:

curl -X GET "https://api.onesuite.io/v1/leads/companies/<COMPANY_ID>" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/companies/<COMPANY_ID>", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "company": {
        "id": "clyh5cnx40007h0bjyrtye0tb",
        "companyName": "Doe Enterprises",
        "companyEmail": "[email protected]",
        "companyPhone": "555-000-1111",
        "companyAddress": {
            "companyCity": "Businesstown",
            "companyState": "NY",
            "companyAddress": "456 Corporate Blvd",
            "companyCountry": "USA",
            "companyPostalCode": "67890"
        },
        "foundedDate": "2005-05-15",
        "companyWebsite": "https://doeenterprises.com",
        "companyServices": null,
        "companyServiceArea": "Global",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-07-11T10:49:19.385Z",
        "updatedAt": "2024-07-11T10:49:19.385Z",
        "clientProfile": [
            {
                "id": "clyh5dgew000ah0bjvovozekw",
                "fullName": "John Doe",
                "profileImg": "https://example.com/image.jpg",
                "designation": "CEO",
                "email": "[email protected]",
                "primaryPhone": "555-123-4567"
            },
            {
                "id": "clyh5ge8x000dh0bje1oxwxpy",
                "fullName": "John Doe",
                "profileImg": "http://surl.li/poztbl",
                "designation": "CEO",
                "email": "[email protected]",
                "primaryPhone": "555-123-4567"
            },
            {
                "id": "clyl4njxl00001cf9rb5qsjzb",
                "fullName": "John Doe",
                "profileImg": "http://surl.li/poztbl",
                "designation": "CEO",
                "email": "[email protected]",
                "primaryPhone": "555-123-4567"
            }
        ]
    }
}

This endpoint retrieves a specific company by its ID.

HTTP Request

GET https://api.onesuite.io/v1/leads/companies/<COMPANY_ID>

URL Parameters

Parameter Description
COMPANY_ID The ID of the company to retrieve

Extra Response Data

Parameter Description
clientProfile List of all leads under this company

Create Company

To create a new company, you can use the following HTTP request:

curl -X POST https://api.onesuite.io/v1/leads/companies \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "companyName": "Acme Corp",
    "companyEmail": "[email protected]",
    "companyPhone": "555-123-4567",
    "companyAddress": {
        "companyCity": "Innovation City",
        "companyState": "CA",
        "companyAddress": "123 Future Rd.",
        "companyCountry": "USA",
        "companyPostalCode": "90210"
    },
    "foundedDate": "2010-09-01",
    "companyWebsite": "https://acmecorp.com",
    "companyServices": "Product Development, Consulting",
    "companyServiceArea": "Global"
}'
fetch("https://api.onesuite.io/v1/leads/companies", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        companyName: "Acme Corp",
        companyEmail: "[email protected]",
        companyPhone: "555-123-4567",
        companyAddress: {
            companyCity: "Innovation City",
            companyState: "CA",
            companyAddress: "123 Future Rd.",
            companyCountry: "USA",
            companyPostalCode: "90210",
        },
        foundedDate: "2010-09-01",
        companyWebsite: "https://acmecorp.com",
        companyServices: "Product Development, Consulting",
        companyServiceArea: "Global",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "data": {
        "id": "clylf3irp000012eq94kwx2nm",
        "companyName": "Acme Corp",
        "companyEmail": "[email protected]",
        "companyPhone": "555-123-4567",
        "companyAddress": {
            "companyCity": "Innovation City",
            "companyState": "CA",
            "companyAddress": "123 Future Rd.",
            "companyCountry": "USA",
            "companyPostalCode": "90210"
        },
        "foundedDate": "2010-09-01",
        "companyWebsite": "https://acmecorp.com",
        "companyServices": "Product Development, Consulting",
        "companyServiceArea": "Global",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-07-14T10:33:13.669Z",
        "updatedAt": "2024-07-14T10:33:13.669Z"
    }
}

HTTP Request

POST https://api.onesuite.io/v1/leads/companies

Body Parameters

Parameter Type Required Description
companyName string yes Name of the company
companyEmail string no Email of the company
companyPhone string no Phone of the company
companyAddress object no Address of the company. Object expects { companyCity, companyState, companyAddress, companyCountry, companyPostalCode} in String format
foundedDate date no Founding date of the company
companyWebsite string no Website of the company
companyServices string no Services provided by the company. List of services with comma seperated string
companyServiceArea string no Service area of the company

Edit Company

To edit an existing company, you can use the following HTTP request:

curl -X PATCH https://api.onesuite.io/v1/leads/companies/<COMPANY_ID> \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "companyName": "Updated Acme Corp",
    "companyEmail": "[email protected]",
    "companyPhone": "555-123-4567",
    "companyAddress": {
        "companyCity": "Innovation City",
        "companyState": "CA",
        "companyAddress": "123 Future Rd.",
        "companyCountry": "USA",
        "companyPostalCode": "90210"
    },
    "foundedDate": "2010-09-01",
    "companyWebsite": "https://acmecorp.com",
    "companyServices": "Product Development, Consulting",
    "companyServiceArea": "Global"
}'
fetch("https://api.onesuite.io/v1/leads/companies/<COMPANY_ID>", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        companyName: "Updated Acme Corp",
        companyEmail: "[email protected]",
        companyPhone: "555-123-4567",
        companyAddress: {
            companyCity: "Innovation City",
            companyState: "CA",
            companyAddress: "123 Future Rd.",
            companyCountry: "USA",
            companyPostalCode: "90210",
        },
        foundedDate: "2010-09-01",
        companyWebsite: "https://acmecorp.com",
        companyServices: "Product Development, Consulting",
        companyServiceArea: "Global",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "data": {
        "id": "clylf3irp000012eq94kwx2nm",
        "companyName": "Updated Acme Corp",
        "companyEmail": "[email protected]",
        "companyPhone": "555-123-4567",
        "companyAddress": {
            "companyCity": "Innovation City",
            "companyState": "CA",
            "companyAddress": "123 Future Rd.",
            "companyCountry": "USA",
            "companyPostalCode": "90210"
        },
        "foundedDate": "2010-09-01",
        "companyWebsite": "https://acmecorp.com",
        "companyServices": "Product Development, Consulting",
        "companyServiceArea": "Global",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "createdAt": "2024-07-14T10:33:13.669Z",
        "updatedAt": "2024-07-14T10:40:21.848Z"
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/leads/companies/<COMPANY_ID>

URL Parameters

Parameter Description
COMPANY_ID The ID of the company to edit

Body Parameters

Parameter Type Required Description
companyName string yes Name of the company
companyEmail string no Email of the company
companyPhone string no Phone of the company
companyAddress object no Address of the company. Object expects { companyCity, companyState, companyAddress, companyCountry, companyPostalCode} in String format
foundedDate date no Founding date of the company
companyWebsite string no Website of the company
companyServices string no Services provided by the company. List of services with comma seperated string
companyServiceArea string no Service area of the company

Delete Company

To delete an existing company, you can use the following HTTP request:

curl -X DELETE "https://api.onesuite.io/v1/leads/companies/<COMPANY_ID>" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/leads/companies/<COMPANY_ID>", {
    method: "DELETE",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success"
}

HTTP Request

DELETE https://api.onesuite.io/v1/leads/companies/<COMPANY_ID>

URL Parameters

Parameter Description
COMPANY_ID The ID of the company to delete

Clients

Get All Clients

curl -X GET "https://api.onesuite.io/v1/clients" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/clients", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "clients": [
        {
            "id": "clylgomqt0001casgvlnnowld",
            "firstName": "John",
            "lastName": "Doe",
            "fullName": "John Doe",
            "email": "[email protected]",
            "status": "customer",
            "customerStatus": "Pending",
            "profileImg": "",
            "personalEmail": "[email protected]",
            "dateOfBirth": "1990-01-01",
            "designation": "CEO",
            "primaryContact": null,
            "secondaryContact": null,
            "primaryPhone": "555-123-4567",
            "secondaryPhone": "555-987-6543",
            "address": {
                "city": "Anytown",
                "state": "CA",
                "address": "123 Main St",
                "country": "USA",
                "postalCode": "12345"
            },
            "fax": "555-112-2334",
            "personalWebsite": "https://johnswebsite.com",
            "keywords": "Key Lead, Important",
            "companyId": "clylgaq980000zhrs3y3e6zcs",
            "companyName": "Doe Enterprises",
            "companyEmail": "[email protected]",
            "companyPhone": "555-000-1111",
            "companyAddress": {
                "companyCity": "Businesstown",
                "companyState": "NY",
                "companyAddress": "456 Corporate Blvd",
                "companyCountry": "USA",
                "companyPostalCode": "67890"
            },
            "foundedDate": "2005-05-15",
            "companyWebsite": "https://doeenterprises.com",
            "companyServices": null,
            "companyServiceArea": "Global",
            "industry": null,
            "leadSource": null,
            "clientSource": null,
            "priority": "high",
            "tags": [],
            "opportunityStage": null,
            "inviteStatus": "default",
            "userToBusinessId": "clylgomqx0003casgq2fznro1",
            "createdAt": "Sun Jul 14 2024",
            "updatedAt": "Sun Jul 14 2024"
        }
    ]
}

To fetch all existing clients, you can use the following HTTP request:

HTTP Request

GET https://api.onesuite.io/v1/clients

Get Specific Client

curl -X GET "https://api.onesuite.io/v1/clients/cly6vm1u9006oxdwpblq4t6rq" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/clients/cly6vm1u9006oxdwpblq4t6rq", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "client": {
        "id": "clylgomqt0001casgvlnnowld",
        "firstName": "John",
        "lastName": "Doe",
        "fullName": "John Doe",
        "email": "[email protected]",
        "status": "customer",
        "profileImg": "",
        "personalEmail": "[email protected]",
        "dateOfBirth": "1990-01-01",
        "designation": "CEO",
        "primaryContact": null,
        "secondaryContact": null,
        "primaryPhone": "555-123-4567",
        "secondaryPhone": "555-987-6543",
        "address": {
            "city": "Anytown",
            "state": "CA",
            "address": "123 Main St",
            "country": "USA",
            "postalCode": "12345"
        },
        "fax": "555-112-2334",
        "personalWebsite": "https://johnswebsite.com",
        "keywords": "Key Lead, Important",
        "probability": 0,
        "expectedRevenue": 0,
        "priority": "high",
        "clientCompany": {
            "id": "clylgaq980000zhrs3y3e6zcs",
            "companyName": "Doe Enterprises",
            "companyEmail": "[email protected]",
            "companyPhone": "555-000-1111",
            "companyAddress": {
                "companyCity": "Businesstown",
                "companyState": "NY",
                "companyAddress": "456 Corporate Blvd",
                "companyCountry": "USA",
                "companyPostalCode": "67890"
            },
            "foundedDate": "2005-05-15",
            "companyWebsite": "https://doeenterprises.com",
            "companyServices": null,
            "companyServiceArea": "Global"
        },
        "industry": null,
        "tags": [],
        "leadSource": null,
        "createdAt": "Sun Jul 14 2024",
        "updatedAt": "Sun Jul 14 2024",
        "companyId": "clylgaq980000zhrs3y3e6zcs",
        "companyEmail": "[email protected]",
        "companyName": "Doe Enterprises"
    }
}

This endpoint retrieves a specific client.

HTTP Request

GET https://api.onesuite.io/v1/clients/<CLIENT_ID>

URL Parameters

Parameter Description
CLIENT_ID The ID of the client to retrieve

Create Client

curl -X POST https://api.onesuite.io/v1/clients \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "firstName": "John",
    "lastName": "Doe",
    "profileImg": "http://surl.li/poztbl",
    "address": {
        "address": "123 Main St",
        "city": "Anytown",
        "state": "CA",
        "postalCode": "12345",
        "country": "USA"
    },
    "email": "[email protected]",
    "personalEmail": "[email protected]",
    "dateOfBirth": "1990-01-01",
    "designation": "CEO",
    "primaryPhone": "555-123-4567",
    "secondaryPhone": "555-987-6543",
    "fax": "555-112-2334",
    "personalWebsite": "https://johnswebsite.com",
    "linkedinUrl": "https://linkedin.com/in/johndoe",
    "notes": "Important client with potential for large contract.",
    "shortNote": "High-priority client.",
    "keywords": "Key Lead, Important",
    "companyName": "Doe Enterprises",
    "companyEmail": "[email protected]",
    "companyPhone": "555-000-1111",
    "companyAddress": {
        "companyAddress": "456 Corporate Blvd",
        "companyCity": "Businesstown",
        "companyState": "NY",
        "companyPostalCode": "67890",
        "companyCountry": "USA"
    },
    "foundedDate": "2005-05-15",
    "companyWebsite": "https://doeenterprises.com",
    "companyServiceArea": "Global",
    "shouldInviteToClientPortal": false
}'

fetch("https://api.onesuite.io/v1/clients", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        firstName: "John",
        lastName: "Doe",
        profileImg: "http://surl.li/poztbl",
        address: {
            address: "123 Main St",
            city: "Anytown",
            state: "CA",
            postalCode: "12345",
            country: "USA",
        },
        email: "[email protected]",
        personalEmail: "[email protected]",
        dateOfBirth: "1990-01-01",
        designation: "CEO",
        primaryPhone: "555-123-4567",
        secondaryPhone: "555-987-6543",
        fax: "555-112-2334",
        personalWebsite: "https://johnswebsite.com",
        linkedinUrl: "https://linkedin.com/in/johndoe",
        notes: "Important client with potential for large contract.",
        shortNote: "High-priority client.",
        keywords: "Key Lead, Important",
        companyName: "Doe Enterprises",
        companyEmail: "[email protected]",
        companyPhone: "555-000-1111",
        companyAddress: {
            companyAddress: "456 Corporate Blvd",
            companyCity: "Businesstown",
            companyState: "NY",
            companyPostalCode: "67890",
            companyCountry: "USA",
        },
        foundedDate: "2005-05-15",
        companyWebsite: "https://doeenterprises.com",
        companyServiceArea: "Global",
        shouldInviteToClientPortal: false,
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "client": {
        "id": "clylgomqt0001casgvlnnowld",
        "firstName": "John",
        "lastName": "Doe",
        "fullName": "John Doe",
        "profileImg": "",
        "email": "[email protected]",
        "personalEmail": "[email protected]",
        "password": null,
        "dateOfBirth": "1990-01-01",
        "designation": "CEO",
        "primaryContact": null,
        "secondaryContact": null,
        "primaryPhone": "555-123-4567",
        "secondaryPhone": "555-987-6543",
        "address": {
            "city": "Anytown",
            "state": "CA",
            "address": "123 Main St",
            "country": "USA",
            "postalCode": "12345"
        },
        "fax": "555-112-2334",
        "personalWebsite": "https://johnswebsite.com",
        "linkedinUrl": null,
        "keywords": "Key Lead, Important",
        "additionalField": null,
        "failedLoginAttempts": 0,
        "passwordChangeAt": null,
        "passwordResetToken": null,
        "status": "customer",
        "customerStatus": "pending",
        "leadSortId": -1,
        "probability": 0,
        "expectedRevenue": 0,
        "opportunityStageId": null,
        "clientReclassifiedAsLead": false,
        "industryId": null,
        "priority": "high",
        "leadSourceId": null,
        "shortNote": null,
        "clinetCompanyId": "clylgaq980000zhrs3y3e6zcs",
        "userToBusinessId": null,
        "lastLoggedInAt": null,
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

This endpoint creates a new lead to your business.

HTTP Request

POST https://api.onesuite.io/v1/clients

Body Parameters

Parameter Type Required Description
firstName string yes Add first name of a client
lastName string no Add last name of a client
email string yes Add email of a client
profileImg string no Add profile image of a client
address object no Add address of a client. object requires { address, city, state, postalCode, country }
personalEmail string no Add personal email of a client
dateOfBirth date no Add DOB of a client
designation string no Add designation of a client
primaryPhone string no Add primary phone of a client
secondaryPhone string no Add secondary phone of a client
fax string no Add fax of a client
personalWebsite string no Add portfolio website of a client
linkedinUrl string no Add linkedin url of a client
shortNote string no Add short note of a client
keywords string no Add keywords of a client. Keywords can be comma seperated. "Key client, Important"
companyName string no Add company of a client. If no company avaialble with given, a company will be created.
companyEmail string no Add company email for given company
companyPhone string no Add company phone for given company
companyAddress object no Add company address for given company. object requires { companyAddress, companyCity, companyState, companyPostalCode, companyCountry }
foundedDate string no Add notes of a client
notes string no Add founded date for given company
companyWebsite string no Add website for given company
companyServiceArea string no Add service area for given company
shouldInviteToClientPortal boolean no If given true, client will be invited to join your business. Default false.

Edit Client

curl -X PATCH https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld?type=primary-data \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "firstName": "Updated John",
    "lastName": "Doe",
    "profileImg": "http://surl.li/poztbl",
    "address": {
        "address": "123 Main St",
        "city": "Anytown",
        "state": "CA",
        "postalCode": "12345",
        "country": "USA"
    },
    "email": "[email protected]",
    "personalEmail": "[email protected]",
    "dateOfBirth": "1990-01-01",
    "designation": "CEO",
    "primaryPhone": "555-123-4567",
    "secondaryPhone": "555-987-6543",
    "fax": "555-112-2334",
    "personalWebsite": "https://johnswebsite.com",
    "linkedinUrl": "https://linkedin.com/in/johndoe",
    "notes": "Important client with potential for large contract.",
    "shortNote": "High-priority client.",
    "keywords": "Key Lead, Important",
    "companyName": "Doe Enterprises",
    "companyEmail": "[email protected]",
    "companyPhone": "555-000-1111",
    "companyAddress": {
        "companyAddress": "456 Corporate Blvd",
        "companyCity": "Businesstown",
        "companyState": "NY",
        "companyPostalCode": "67890",
        "companyCountry": "USA"
    },
    "foundedDate": "2005-05-15",
    "companyWebsite": "https://doeenterprises.com",
    "companyServiceArea": "Global",
}'

fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld?type=primary-data",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            firstName: "Updated John",
            lastName: "Doe",
            profileImg: "http://surl.li/poztbl",
            address: {
                address: "123 Main St",
                city: "Anytown",
                state: "CA",
                postalCode: "12345",
                country: "USA",
            },
            email: "[email protected]",
            personalEmail: "[email protected]",
            dateOfBirth: "1990-01-01",
            designation: "CEO",
            primaryPhone: "555-123-4567",
            secondaryPhone: "555-987-6543",
            fax: "555-112-2334",
            personalWebsite: "https://johnswebsite.com",
            linkedinUrl: "https://linkedin.com/in/johndoe",
            notes: "Important client with potential for large contract.",
            shortNote: "High-priority client.",
            keywords: "Key Lead, Important",
            companyName: "Doe Enterprises",
            companyEmail: "[email protected]",
            companyPhone: "555-000-1111",
            companyAddress: {
                companyAddress: "456 Corporate Blvd",
                companyCity: "Businesstown",
                companyState: "NY",
                companyPostalCode: "67890",
                companyCountry: "USA",
            },
            foundedDate: "2005-05-15",
            companyWebsite: "https://doeenterprises.com",
            companyServiceArea: "Global",
        }),
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "data": {
        "id": "clylgomqt0001casgvlnnowld",
        "firstName": "Updated John",
        "lastName": "Doe",
        "fullName": "Updated John Doe",
        "profileImg": "",
        "email": "[email protected]",
        "personalEmail": "[email protected]",
        "password": null,
        "dateOfBirth": "1990-01-01",
        "designation": "CEO",
        "primaryContact": null,
        "secondaryContact": null,
        "primaryPhone": "555-123-4567",
        "secondaryPhone": "555-987-6543",
        "address": {
            "city": "Anytown",
            "state": "CA",
            "address": "123 Main St",
            "country": "USA",
            "postalCode": "12345"
        },
        "fax": "555-112-2334",
        "personalWebsite": "https://johnswebsite.com",
        "linkedinUrl": "https://linkedin.com/in/johndoe",
        "keywords": "Key Lead, Important",
        "additionalField": null,
        "failedLoginAttempts": 0,
        "passwordChangeAt": null,
        "passwordResetToken": null,
        "status": "customer",
        "customerStatus": "pending",
        "leadSortId": -1,
        "probability": 0,
        "expectedRevenue": 0,
        "opportunityStageId": "clxsofj8l005m13sftt7hdavu",
        "clientReclassifiedAsLead": false,
        "industryId": null,
        "priority": "high",
        "leadSourceId": null,
        "shortNote": "High-priority client.",
        "clinetCompanyId": "clylgaq980000zhrs3y3e6zcs",
        "userToBusinessId": "clylgomqx0003casgq2fznro1",
        "lastLoggedInAt": null,
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:27:04.433Z"
    }
}

This endpoint creates a new client to your business.

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>?type=primary-data

Body Parameters

Parameter Type Required Description
firstName string yes Add first name of a client
lastName string no Add last name of a client
email string yes Add email of a client
profileImg string no Add profile image of a client
address object no Add address of a client. object requires { address, city, state, postalCode, country }
personalEmail string no Add personal email of a client
dateOfBirth date no Add DOB of a client
designation string no Add designation of a client
primaryPhone string no Add primary phone of a client
secondaryPhone string no Add secondary phone of a client
fax string no Add fax of a client
personalWebsite string no Add portfolio website of a client
linkedinUrl string no Add linkedin url of a client
shortNote string no Add short note of a client
keywords string no Add keywords of a client. Keywords can be comma seperated. "Key client, Important"
companyName string no Add company of a client. If no company avaialble with given, a company will be created.
companyEmail string no Add company email for given company
companyPhone string no Add company phone for given company
companyAddress object no Add company address for given company. object requires { companyAddress, companyCity, companyState, companyPostalCode, companyCountry }
foundedDate string no Add notes of a client
notes string no Add founded date for given company
companyWebsite string no Add website for given company
companyServiceArea string no Add service area for given company

Delete Client

curl -X DELETE "https://api.onesuite.io/v1/clients/clyh6jm5w000011qy9u50ojy6" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/clients/clyh6jm5w000011qy9u50ojy6", {
    method: "DELETE",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "message": "Deleted successfully"
}

This endpoint deletes a specific client.

HTTP Request

DELETE https://api.onesuite.io/v1/clients/<CLIENT_ID>

URL Parameters

Projects

Get All Projects

To retrieve all projects, you can send a GET request to the following endpoint:

curl -X GET "https://api.onesuite.io/v1/projects" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/projects", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "projects": [
        {
            "id": "cly1aboiv000ae05yi7hvs6nw",
            "name": "One Suite Development ",
            "description": "<p>One Suite development project<br></p>",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "privacy": "public",
            "creatorUserToBusinessId": "clxsof7jh001r13sf6pjlxytc",
            "leadId": null,
            "clientProfileId": null,
            "priority": "high",
            "status": "working",
            "startDate": "2024-06-10T18:00:00.000Z",
            "dueDate": "2024-06-12T18:00:00.000Z",
            "progress": 0,
            "completedTasks": 0,
            "clientPermission": "edit",
            "createdAt": "2024-06-30T08:24:12.775Z",
            "updatedAt": "2024-07-02T04:59:21.669Z",
            "business": {
                "businessName": "Constance",
                "id": "clxsof7fh000413sfbsb69nci"
            },
            "collaborators": [
                {
                    "id": "cly1ad4by000oe05y33uoq8uw",
                    "projectId": "cly1aboiv000ae05yi7hvs6nw",
                    "role": "viewer",
                    "userToBusiness": {
                        "id": "clxsof7jh001r13sf6pjlxytc",
                        "businessId": "clxsof7fh000413sfbsb69nci",
                        "user": {
                            "id": "clxsoc3ga000013sfno0b8ve6",
                            "firstName": "Farhaan",
                            "fullName": "Farhaan Mahbub",
                            "role": "business_user",
                            "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                        },
                        "userId": "clxsoc3ga000013sfno0b8ve6"
                    },
                    "userToBusinessId": "clxsof7jh001r13sf6pjlxytc"
                }
            ],
            "lead": null,
            "clientProfile": null,
            "categories": [
                {
                    "id": "clxsofj99006a13sfz3s7ub1e",
                    "name": "In-House Project",
                    "businessId": "clxsof7fh000413sfbsb69nci",
                    "createdAt": "2024-06-24T07:49:11.614Z",
                    "updatedAt": "2024-06-24T07:49:11.614Z"
                }
            ],
            "tags": [
                {
                    "id": "clxsofj9d006c13sffj9wh4vd",
                    "name": "SaaS",
                    "businessId": "clxsof7fh000413sfbsb69nci",
                    "createdAt": "2024-06-24T07:49:11.618Z",
                    "updatedAt": "2024-06-24T07:49:11.618Z"
                }
            ],
            "sections": [],
            "projectName": "One Suite Development ",
            "projectStatus": "working",
            "totalTasks": 3,
            "totalSubTasks": 0,
            "completedSubTasks": 0
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/projects

Get Specific Project

To retrieve a specific project, you can send a GET request to the following endpoint:

curl -X GET "https://api.onesuite.io/v1/projects/cly1aboiv000ae05yi7hvs6nw" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/projects/cly1aboiv000ae05yi7hvs6nw", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "project": {
        "id": "cly1aboiv000ae05yi7hvs6nw",
        "name": "One Suite Development ",
        "description": "<p>One Suite development project<br></p>",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "privacy": "public",
        "creatorUserToBusinessId": "clxsof7jh001r13sf6pjlxytc",
        "leadId": null,
        "clientProfileId": null,
        "priority": "high",
        "status": "working",
        "startDate": "2024-06-10T18:00:00.000Z",
        "dueDate": "2024-06-12T18:00:00.000Z",
        "progress": 0,
        "completedTasks": 0,
        "clientPermission": "edit",
        "createdAt": "2024-06-30T08:24:12.775Z",
        "updatedAt": "2024-07-02T04:59:21.669Z",
        "business": {
            "businessName": "Constance",
            "id": "clxsof7fh000413sfbsb69nci"
        },
        "creator": {
            "id": "clxsof7jh001r13sf6pjlxytc",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "user": {
                "id": "clxsoc3ga000013sfno0b8ve6",
                "firstName": "Farhaan",
                "fullName": "Farhaan Mahbub",
                "role": "business_user",
                "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
            },
            "userId": "clxsoc3ga000013sfno0b8ve6"
        },
        "collaborators": [
            {
                "id": "cly1ad4by000oe05y33uoq8uw",
                "projectId": "cly1aboiv000ae05yi7hvs6nw",
                "role": "viewer",
                "userToBusiness": {
                    "id": "clxsof7jh001r13sf6pjlxytc",
                    "businessId": "clxsof7fh000413sfbsb69nci",
                    "user": {
                        "id": "clxsoc3ga000013sfno0b8ve6",
                        "firstName": "Farhaan",
                        "fullName": "Farhaan Mahbub",
                        "role": "business_user",
                        "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                    },
                    "userId": "clxsoc3ga000013sfno0b8ve6"
                },
                "userToBusinessId": "clxsof7jh001r13sf6pjlxytc"
            }
        ],
        "lead": null,
        "clientProfile": null,
        "categories": [
            {
                "id": "clxsofj99006a13sfz3s7ub1e",
                "name": "In-House Project",
                "businessId": "clxsof7fh000413sfbsb69nci",
                "createdAt": "2024-06-24T07:49:11.614Z",
                "updatedAt": "2024-06-24T07:49:11.614Z"
            }
        ],
        "tags": [
            {
                "id": "clxsofj9d006c13sffj9wh4vd",
                "name": "SaaS",
                "businessId": "clxsof7fh000413sfbsb69nci",
                "createdAt": "2024-06-24T07:49:11.618Z",
                "updatedAt": "2024-06-24T07:49:11.618Z"
            }
        ],
        "sections": [
            {
                "id": "cly1abojg000fe05yly5tay4n",
                "name": "Planned",
                "order": 0,
                "projectId": "cly1aboiv000ae05yi7hvs6nw",
                "completedTasks": 0,
                "isFolded": false,
                "backgroundColor": "#faf0e6",
                "createdAt": "2024-06-30T08:24:12.796Z",
                "updatedAt": "2024-06-30T08:28:01.026Z",
                "tasks": [
                    {
                        "id": "cly1ae39g000pe05y2stjvn85",
                        "name": "Email sending",
                        "description": "<p>This is project description</p>",
                        "type": "task",
                        "status": "incomplete",
                        "order": 0,
                        "taskSortId": -1,
                        "projectSectionId": "cly1abojg000fe05yly5tay4n",
                        "taskTemplateId": null,
                        "creatorUserToBusinessId": "clxsof7jh001r13sf6pjlxytc",
                        "startDate": null,
                        "dueDate": "2024-07-20T00:00:00.000Z",
                        "estimatedTime": 40,
                        "actualTime": 38,
                        "priority": "high",
                        "progressStatus": "default",
                        "projectTaskLabelId": "clynywlu300015u3rgnd8427u",
                        "completedSubtasks": 0,
                        "timerIsRunning": false,
                        "timerStartTime": null,
                        "timerElapsedTime": null,
                        "completionTime": null,
                        "completedById": null,
                        "createdAt": "2024-06-30T08:26:05.189Z",
                        "updatedAt": "2024-07-16T05:23:50.428Z",
                        "subTasks": [
                            {
                                "id": "clynyxhqv00045u3rkzkuyeew",
                                "name": "Sub-task for the project",
                                "description": null,
                                "status": "incomplete",
                                "subtaskSortId": 9999999,
                                "taskId": "cly1ae39g000pe05y2stjvn85",
                                "creatorUserToBusinessId": "clxsof7jh001r13sf6pjlxytc",
                                "startDate": null,
                                "dueDate": null,
                                "estimatedTime": 20,
                                "actualTime": 14,
                                "priority": "default",
                                "progressStatus": "default",
                                "projectTaskLabelId": null,
                                "completionTime": null,
                                "completedById": null,
                                "createdAt": "2024-07-16T05:23:57.079Z",
                                "updatedAt": "2024-07-16T05:24:10.037Z",
                                "assignee": [
                                    {
                                        "id": "clxsof7jh001r13sf6pjlxytc",
                                        "businessId": "clxsof7fh000413sfbsb69nci",
                                        "user": {
                                            "id": "clxsoc3ga000013sfno0b8ve6",
                                            "firstName": "Farhaan",
                                            "fullName": "Farhaan Mahbub",
                                            "role": "business_user",
                                            "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                                        },
                                        "userId": "clxsoc3ga000013sfno0b8ve6"
                                    }
                                ],
                                "label": null,
                                "comments": [],
                                "attachments": [],
                                "creator": {
                                    "id": "clxsof7jh001r13sf6pjlxytc",
                                    "status": "active",
                                    "designation": null,
                                    "memberId": "",
                                    "joiningDate": "2024-06-24T07:48:56.429Z",
                                    "userId": "clxsoc3ga000013sfno0b8ve6",
                                    "businessId": "clxsof7fh000413sfbsb69nci",
                                    "inviteStatus": "accepted",
                                    "role": "admin",
                                    "createdAt": "2024-06-24T07:48:56.429Z",
                                    "updatedAt": "2024-06-24T07:48:56.429Z",
                                    "user": {
                                        "id": "clxsoc3ga000013sfno0b8ve6",
                                        "firstName": "Farhaan",
                                        "fullName": "Farhaan Mahbub",
                                        "role": "business_user",
                                        "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                                    }
                                },
                                "completedBy": null
                            }
                        ],
                        "creator": {
                            "id": "clxsof7jh001r13sf6pjlxytc",
                            "status": "active",
                            "designation": null,
                            "memberId": "",
                            "joiningDate": "2024-06-24T07:48:56.429Z",
                            "userId": "clxsoc3ga000013sfno0b8ve6",
                            "businessId": "clxsof7fh000413sfbsb69nci",
                            "inviteStatus": "accepted",
                            "role": "admin",
                            "createdAt": "2024-06-24T07:48:56.429Z",
                            "updatedAt": "2024-06-24T07:48:56.429Z",
                            "user": {
                                "id": "clxsoc3ga000013sfno0b8ve6",
                                "firstName": "Farhaan",
                                "fullName": "Farhaan Mahbub",
                                "role": "business_user",
                                "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                            }
                        },
                        "completedBy": null,
                        "label": {
                            "id": "clynywlu300015u3rgnd8427u",
                            "name": "New Label",
                            "color": "#5f9ea0",
                            "order": -1,
                            "projectId": "cly1aboiv000ae05yi7hvs6nw",
                            "createdById": "clxsof7jh001r13sf6pjlxytc",
                            "createdAt": "2024-07-16T05:23:15.723Z",
                            "updatedAt": "2024-07-16T05:23:15.723Z"
                        },
                        "assignee": [
                            {
                                "id": "clxsof7jh001r13sf6pjlxytc",
                                "businessId": "clxsof7fh000413sfbsb69nci",
                                "user": {
                                    "id": "clxsoc3ga000013sfno0b8ve6",
                                    "firstName": "Farhaan",
                                    "fullName": "Farhaan Mahbub",
                                    "role": "business_user",
                                    "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                                },
                                "userId": "clxsoc3ga000013sfno0b8ve6"
                            }
                        ],
                        "comments": [
                            {
                                "id": "cly7nasbn000385bxwzn9pz9p",
                                "message": "<p>ddd</p>",
                                "userId": "clxsof7jh001r13sf6pjlxytc",
                                "taskId": "cly1ae39g000pe05y2stjvn85",
                                "subTaskId": null,
                                "commentImageId": "7197a60e-b263-4101-8ec4-9c1614063471",
                                "createdAt": "2024-07-04T19:14:03.107Z",
                                "updatedAt": "2024-07-04T19:14:03.107Z",
                                "user": {
                                    "id": "clxsof7jh001r13sf6pjlxytc",
                                    "businessId": "clxsof7fh000413sfbsb69nci",
                                    "user": {
                                        "id": "clxsoc3ga000013sfno0b8ve6",
                                        "firstName": "Farhaan",
                                        "fullName": "Farhaan Mahbub",
                                        "role": "business_user",
                                        "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                                    },
                                    "userId": "clxsoc3ga000013sfno0b8ve6"
                                },
                                "attachments": [],
                                "replies": []
                            }
                        ],
                        "attachments": [
                            {
                                "id": "clynywa9100005u3rnt1gq2pl",
                                "attachment": "https://onesuite-storage.s3.amazonaws.com/onesuite-files/39b5aba29ec2a31d99f4711b3107ba67.jpg",
                                "attachmentType": "image",
                                "attachmentName": "abdf2f5541b083579da941ae8d297a83.jpg",
                                "attachmentSize": "38.81 KB",
                                "attachmentCreatedId": "clxsof7jh001r13sf6pjlxytc",
                                "taskId": "cly1ae39g000pe05y2stjvn85",
                                "subTaskId": null,
                                "createdAt": "2024-07-16T05:23:00.708Z",
                                "updatedAt": "2024-07-16T05:23:00.708Z",
                                "attachmentCreatedBy": {
                                    "id": "clxsof7jh001r13sf6pjlxytc",
                                    "businessId": "clxsof7fh000413sfbsb69nci",
                                    "user": {
                                        "id": "clxsoc3ga000013sfno0b8ve6",
                                        "firstName": "Farhaan",
                                        "fullName": "Farhaan Mahbub",
                                        "role": "business_user",
                                        "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                                    },
                                    "userId": "clxsoc3ga000013sfno0b8ve6"
                                }
                            }
                        ],
                        "totalSubTasks": 1,
                        "completedSubTasks": 0
                    }
                ],
                "totalTasks": 1,
                "totalSubTasks": 1,
                "completedSubTasks": 0,
                "progress": 0
            },
            {
                "id": "cly1abojg000ge05yarvopnv4",
                "name": "To-Do",
                "order": 1,
                "projectId": "cly1aboiv000ae05yi7hvs6nw",
                "completedTasks": 0,
                "isFolded": false,
                "backgroundColor": "#EBECF0",
                "createdAt": "2024-06-30T08:24:12.796Z",
                "updatedAt": "2024-06-30T08:28:01.026Z",
                "tasks": [],
                "totalTasks": 0,
                "totalSubTasks": 0,
                "completedSubTasks": 0,
                "progress": null
            },
            {
                "id": "cly1abojg000he05yrbslati0",
                "name": "In Progress",
                "order": 2,
                "projectId": "cly1aboiv000ae05yi7hvs6nw",
                "completedTasks": 0,
                "isFolded": false,
                "backgroundColor": "#EBECF0",
                "createdAt": "2024-06-30T08:24:12.796Z",
                "updatedAt": "2024-06-30T08:28:01.026Z",
                "tasks": [],
                "totalTasks": 0,
                "totalSubTasks": 0,
                "completedSubTasks": 0,
                "progress": null
            },
            {
                "id": "cly1abojg000ie05yj1v1rno5",
                "name": "Completed",
                "order": 3,
                "projectId": "cly1aboiv000ae05yi7hvs6nw",
                "completedTasks": 0,
                "isFolded": false,
                "backgroundColor": "#EBECF0",
                "createdAt": "2024-06-30T08:24:12.796Z",
                "updatedAt": "2024-06-30T08:28:01.026Z",
                "tasks": [],
                "totalTasks": 0,
                "totalSubTasks": 0,
                "completedSubTasks": 0,
                "progress": null
            }
        ],
        "totalTasks": 1,
        "totalSubTasks": 1,
        "completedSubTasks": 0,
        "totalProgress": 0
    }
}

HTTP Request

GET https://api.onesuite.io/v1/projects/<PROJECT_ID>

URL Parameters

Create Project

curl -X POST https://api.onesuite.io/v1/projects \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "Sample Project",
    "status": {
        "key": "working"
    },
    "client": {
        "key": "clymob8p60002v3ix1luisct2"
    },
    "collaborators": [
        {
            "key": "clxsof7jh001r13sf6pjlxytc"
        }
    ],
    "startDate": "2024-07-17T18:00:00.000Z",
    "dueDate": "2024-09-29T18:00:00.000Z",
    "description": "<p>This is project description</p>",
    "categories": [
        {
            "key": "clxsofj99006a13sfz3s7ub1e",
            "label": "In-House Project"
        }
    ],
    "priority": {
        "key": "medium"
    },
    "tags": [
        {
            "key": "clxsofj9e006g13sfwx8cjea3",
            "label": "Web App"
        },
        {
            "key": "clxsofj9e006f13sfr1g7vp08",
            "label": "Website Redesign"
        }
    ],
    "privacy": "private"
}'

fetch("https://api.onesuite.io/v1/projects", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
    "name": "Sample Project",
    "status": {
        "key": "working"
    },
    "client": {
        "key": "clymob8p60002v3ix1luisct2"
    },
    "collaborators": [
        {
            "key": "clxsof7jh001r13sf6pjlxytc"
        }
    ],
    "startDate": "2024-07-17T18:00:00.000Z",
    "dueDate": "2024-09-29T18:00:00.000Z",
    "description": "<p>This is project description</p>",
    "categories": [
        {
            "key": "clxsofj99006a13sfz3s7ub1e",
            "label": "In-House Project"
        }
    ],
    "priority": {
        "key": "medium"
    },
    "tags": [
        {
            "key": "clxsofj9e006g13sfwx8cjea3",
            "label": "Web App"
        },
        {
            "key": "clxsofj9e006f13sfr1g7vp08",
            "label": "Website Redesign"
        }
    ],
    "privacy": "private"
});

The above command returns JSON structured like this:

{
    "status": "success",
    "data": {
        "id": "clyo0aaag0000h69t4j4ux2eh",
        "name": "Sample Project",
        "description": "<p>This is project description</p>",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "privacy": "private",
        "creatorUserToBusinessId": null,
        "leadId": null,
        "clientProfileId": "clymob8p60002v3ix1luisct2",
        "priority": "medium",
        "status": "working",
        "startDate": "2024-07-17T18:00:00.000Z",
        "dueDate": "2024-09-29T18:00:00.000Z",
        "progress": 0,
        "completedTasks": 0,
        "createdAt": "2024-07-16T06:01:53.560Z",
        "updatedAt": "2024-07-16T06:01:53.560Z"
    }
}

This endpoint creates a new project in your business.

HTTP Request

POST https://api.onesuite.io/v1/projects

Body Parameters

Parameter Type Required Description
name string yes Name of the project
status.key object no Status of the project. Expects an object with a key attribute. Key can be "working" or "submitted" or "completed" or "on_hold" or "paused" or "archived"
client.key object yes Select client for the project. Expects an object with key attribute. key is the id(string) of the client.
collaborators array no Assign team members as collabarators. Expects an array of objects with a key attribute. key is the userToBusiness id (string)
startDate date no Start date of the project
dueDate date no Due date of the project
description string no Description of the project
categories array no Include categories for the project. Expects an array of objects with key & label attributes. key is the existing category id, label is required - if no category available with key, a new category will be created with given label.
priority.key object no Set priority of the project. Expects an object with a key attribute. Key can be "high" or "medium" or "low"
tags array no Include tags for the project. Expects an array of objects with key & label attributes. key is the existing tag id, label is required - if no tag available with key, a new tag will be created with given label.
privacy enum no Set privacy of the project. "public" - All members of your business access or "private" - only you & assigned collaborators can access the project.

Edit Project

curl -X PATCH https://api.onesuite.io/v1/projects \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "Updated Sample Project",
    "status": {
        "key": "completed"
    },
    "client": {
        "key": "clymob8p60002v3ix1luisct2"
    },
    "collaborators": [
        {
            "key": "clxsof7jh001r13sf6pjlxytc"
        }
    ],
    "startDate": "2024-07-17T18:00:00.000Z",
    "dueDate": "2024-09-29T18:00:00.000Z",
    "description": "<p>This is project description</p>",
    "categories": [
        {
            "key": "clxsofj99006a13sfz3s7ub1e",
            "label": "In-House Project"
        }
    ],
    "priority": {
        "key": "medium"
    },
    "tags": [
        {
            "key": "clxsofj9e006g13sfwx8cjea3",
            "label": "Web App"
        },
        {
            "key": "clxsofj9e006f13sfr1g7vp08",
            "label": "Website Redesign"
        }
    ],
    "privacy": "private"
}'

fetch("https://api.onesuite.io/v1/projects", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
    "name": "Updated Sample Project",
    "status": {
        "key": "completed"
    },
    "client": {
        "key": "clymob8p60002v3ix1luisct2"
    },
    "collaborators": [
        {
            "key": "clxsof7jh001r13sf6pjlxytc"
        }
    ],
    "startDate": "2024-07-17T18:00:00.000Z",
    "dueDate": "2024-09-29T18:00:00.000Z",
    "description": "<p>This is project description</p>",
    "categories": [
        {
            "key": "clxsofj99006a13sfz3s7ub1e",
            "label": "In-House Project"
        }
    ],
    "priority": {
        "key": "medium"
    },
    "tags": [
        {
            "key": "clxsofj9e006g13sfwx8cjea3",
            "label": "Web App"
        },
        {
            "key": "clxsofj9e006f13sfr1g7vp08",
            "label": "Website Redesign"
        }
    ],
    "privacy": "private"
});

The above command returns JSON structured like this:

{
    "status": "success",
    "data": {
        "id": "clyo0uh8r0011h69twuc6opos",
        "name": "Updated Sample Project",
        "description": "<p>This is project description</p>",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "privacy": "private",
        "creatorUserToBusinessId": null,
        "leadId": null,
        "clientProfileId": "clymob8p60002v3ix1luisct2",
        "priority": "medium",
        "status": "completed",
        "startDate": "2024-07-17T18:00:00.000Z",
        "dueDate": "2024-09-29T18:00:00.000Z",
        "progress": 0,
        "completedTasks": 0,
        "createdAt": "2024-07-16T06:17:35.691Z",
        "updatedAt": "2024-07-16T06:42:59.001Z"
    }
}

This endpoint updates a project in your business.

HTTP Request

POST https://api.onesuite.io/v1/projects/<PROJECT_ID>

URL Parameters

Body Parameters

Parameter Type Required Description
name string yes Name of the project
status.key object no Status of the project. Expects an object with a key attribute. Key can be "working" or "submitted" or "completed" or "on_hold" or "paused" or "archived"
client.key object yes Select client for the project. Expects an object with key attribute. key is the id(string) of the client.
collaborators array no Assign team members as collabarators. Expects an array of objects with a key attribute. key is the userToBusiness id (string)
startDate date no Start date of the project
dueDate date no Due date of the project
description string no Description of the project
categories array no Include categories for the project. Expects an array of objects with key & label attributes. key is the existing category id, label is required - if no category available with key, a new category will be created with given label.
priority.key object no Set priority of the project. Expects an object with a key attribute. Key can be "high" or "medium" or "low"
tags array no Include tags for the project. Expects an array of objects with key & label attributes. key is the existing tag id, label is required - if no tag available with key, a new tag will be created with given label.
privacy enum no Set privacy of the project. "public" - All members of your business access or "private" - only you & assigned collaborators can access the project.

Delete Project

curl -X DELETE "https://api.onesuite.io/v1/projects/clyo0uh8r0011h69twuc6opos" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/projects/clyo0uh8r0011h69twuc6opos", {
    method: "DELETE",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success"
}

This endpoint deletes a specific project.

HTTP Request

DELETE https://api.onesuite.io/v1/projects/<PROJECT_ID>

URL Parameters

Get Collaborators to Add

curl -X GET "https://api.onesuite.io/v1/projects/collaborators-to-add" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/projects/collaborators-to-add", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "teamMembers": [
        {
            "id": "cm0tea7dr0000obeuz0q5j6qp",
            "userToBusinessId": "cm0teabyp001robeuj3tsg85c",
            "status": "active",
            "role": "Admin",
            "designation": null,
            "memberId": "",
            "departments": [],
            "firstName": "Farhaan",
            "lastName": "Mahbub",
            "fullName": "Farhaan Mahbub",
            "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c",
            "email": "[email protected]",
            "workPhone": null,
            "personalPhone": null,
            "dateOfBirth": null,
            "joiningDate": "2024-09-08T09:52:05.905Z"
        }
    ]
}

This endpoint returns the collaborators to use while creating a project.

HTTP Request

GET https://api.onesuite.io/v1/projects/collaborators-to-add

Get Project Attributes to Add

curl -X GET "https://api.onesuite.io/v1/projects/attributes" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/projects/attributes", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "combinedProjectAttributes": {
        "projectCategories": [
            {
                "id": "cm0teaf7g006aobeuinlthp4l",
                "name": "In-House Project",
                "businessId": "cm0teabv00004obeu7abjr93p",
                "createdAt": "2024-09-08T09:52:10.108Z",
                "updatedAt": "2024-09-08T09:52:10.108Z"
            },
            {
                "id": "cm0teaf7g006bobeu4jlks3kg",
                "name": "Client Project",
                "businessId": "cm0teabv00004obeu7abjr93p",
                "createdAt": "2024-09-08T09:52:10.108Z",
                "updatedAt": "2024-09-08T09:52:10.108Z"
            }
        ],
        "projectTags": [
            {
                "id": "cm0teaf7j006cobeuvmr8dvfq",
                "name": "SaaS",
                "businessId": "cm0teabv00004obeu7abjr93p",
                "createdAt": "2024-09-08T09:52:10.112Z",
                "updatedAt": "2024-09-08T09:52:10.112Z"
            },
            {
                "id": "cm0teaf7k006dobeuw6l69jtc",
                "name": "UX Design",
                "businessId": "cm0teabv00004obeu7abjr93p",
                "createdAt": "2024-09-08T09:52:10.112Z",
                "updatedAt": "2024-09-08T09:52:10.112Z"
            }
        ],
        "projectDepartments": [
            {
                "id": "cm0teaf6i005fobeup2ob6jnx",
                "name": "Engineering",
                "badgeColor": "#3498db",
                "businessId": "cm0teabv00004obeu7abjr93p",
                "createdAt": "2024-09-08T09:52:10.075Z",
                "updatedAt": "2024-09-08T09:52:10.075Z",
                "userToBusiness": []
            },
            {
                "id": "cm0teaf6j005gobeuw1ol9xv8",
                "name": "Design",
                "badgeColor": "#FF1493",
                "businessId": "cm0teabv00004obeu7abjr93p",
                "createdAt": "2024-09-08T09:52:10.075Z",
                "updatedAt": "2024-09-08T09:52:10.075Z",
                "userToBusiness": []
            },
            {
                "id": "cm0teaf6j005hobeu8o5bfxos",
                "name": "Digital Marketing",
                "badgeColor": "#008000",
                "businessId": "cm0teabv00004obeu7abjr93p",
                "createdAt": "2024-09-08T09:52:10.075Z",
                "updatedAt": "2024-09-08T09:52:10.075Z",
                "userToBusiness": []
            }
        ]
    }
}

This endpoint returns the attributes to use while creating a project, such as project categories, project tags, project departments.

HTTP Request

GET https://api.onesuite.io/v1/projects/attributes

Project Sections

Get All Sections

To retrieve all sections of a project, you can use the following HTTP request.

curl -X GET "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "sections": [
        {
            "id": "cly1abojg000fe05yly5tay4n",
            "name": "Planned",
            "order": 0,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#faf0e6",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        },
        {
            "id": "cly1abojg000ge05yarvopnv4",
            "name": "To-Do",
            "order": 1,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#EBECF0",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        },
        {
            "id": "cly1abojg000he05yrbslati0",
            "name": "In Progress",
            "order": 2,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#EBECF0",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        },
        {
            "id": "cly1abojg000ie05yj1v1rno5",
            "name": "Completed",
            "order": 3,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#EBECF0",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections

Get Specific Section

To retrieve a specific section of a project, you can use the following HTTP request:

curl -X GET "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>" \
    -H "Authorization: your-api-key"
fetch(
    "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>",
    {
        method: "GET",
        headers: {
            Authorization: "your-api-key",
        },
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "section": {
        "id": "cly1abojg000fe05yly5tay4n",
        "name": "Planned",
        "order": 0,
        "projectId": "cly1aboiv000ae05yi7hvs6nw",
        "completedTasks": 0,
        "isFolded": false,
        "backgroundColor": "#faf0e6",
        "createdAt": "2024-06-30T08:24:12.796Z",
        "updatedAt": "2024-06-30T08:28:01.026Z"
    }
}

This endpoint retrieves a specific section of a project by its ID.

HTTP Request

GET https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>

Create Section

To create a new section for a project, you can use the following HTTP request:

curl -X POST https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
        "name": "New Section",
        "backgroundColor": "#ebecf0"
}'
fetch("https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "New Section",
        backgroundColor: "#ebecf0",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "sections": [
        {
            "id": "cly1abojg000fe05yly5tay4n",
            "name": "Planned",
            "order": 0,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#faf0e6",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        },
        {
            "id": "cly1abojg000ge05yarvopnv4",
            "name": "To-Do",
            "order": 1,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#EBECF0",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        },
        {
            "id": "cly1abojg000he05yrbslati0",
            "name": "In Progress",
            "order": 2,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#EBECF0",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        },
        {
            "id": "cly1abojg000ie05yj1v1rno5",
            "name": "Completed",
            "order": 3,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#EBECF0",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        },
        {
            "id": "clyo8ylwk000013yziu2luox4",
            "name": "New Section",
            "order": 4,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#ebecf0",
            "createdAt": "2024-07-16T10:04:45.284Z",
            "updatedAt": "2024-07-16T10:04:45.284Z"
        }
    ]
}

HTTP Request

POST https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections

Body Parameters

Parameter Type Required Description
name string yes Name of section
backgroundColor string no Give a hexa color code for your section's background. Example - #ebecf0

Edit Section

To edit an existing section for a project, you can use the following HTTP request:

curl -X PATCH https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<Section_ID> \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
        "name": "Updated Section",
        "backgroundColor": "#ebecf0"
}'
fetch(
    "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<Section_ID>",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            name: "Updated Section",
            backgroundColor: "#ebecf0",
        }),
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "sections": [
        {
            "id": "cly1abojg000fe05yly5tay4n",
            "name": "Planned",
            "order": 0,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#faf0e6",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        },
        {
            "id": "cly1abojg000ge05yarvopnv4",
            "name": "To-Do",
            "order": 1,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#EBECF0",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        },
        {
            "id": "cly1abojg000he05yrbslati0",
            "name": "In Progress",
            "order": 2,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#EBECF0",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        },
        {
            "id": "cly1abojg000ie05yj1v1rno5",
            "name": "Completed",
            "order": 3,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#EBECF0",
            "createdAt": "2024-06-30T08:24:12.796Z",
            "updatedAt": "2024-06-30T08:28:01.026Z"
        },
        {
            "id": "clyo8ylwk000013yziu2luox4",
            "name": "New Section",
            "order": 4,
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "completedTasks": 0,
            "isFolded": false,
            "backgroundColor": "#ebecf0",
            "createdAt": "2024-07-16T10:04:45.284Z",
            "updatedAt": "2024-07-16T10:04:45.284Z"
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<Section_ID>

Body Parameters

Parameter Type Required Description
name string yes Name of section
backgroundColor string no Give a hexa color code for your section's background. Example - #ebecf0

Delete Section

To delete an existing section, you can use the following HTTP request.

curl -X DELETE "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>" \
    -H "Authorization: your-api-key"
fetch(
    "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>",
    {
        method: "DELETE",
        headers: {
            Authorization: "your-api-key",
        },
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "section": {
        "id": "clyo8ylwk000013yziu2luox4",
        "name": "Updated Section",
        "order": 19,
        "projectId": "cly1aboiv000ae05yi7hvs6nw",
        "completedTasks": 0,
        "isFolded": false,
        "backgroundColor": "#ebecf0",
        "createdAt": "2024-07-16T10:04:45.284Z",
        "updatedAt": "2024-07-16T10:33:10.668Z"
    }
}

HTTP Request

DELETE https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>

URL Parameters

Project Tasks

Create Task

To create a new task in a section for a project, you can use the following HTTP request:

curl -X POST https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "task": {
        "name": "New To-Do Task"
    }
}'
fetch(
    "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks",
    {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            task: {
                name: "New To-Do Task",
            },
        }),
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "task": {
        "id": "clyobb0jq0000jdsudps7ejf8",
        "name": "New To-Do Task",
        "description": null,
        "type": "task",
        "status": "incomplete",
        "order": 0,
        "taskSortId": 9999999,
        "projectSectionId": "cly1abojg000fe05yly5tay4n",
        "taskTemplateId": null,
        "creatorUserToBusinessId": null,
        "startDate": null,
        "dueDate": null,
        "estimatedTime": null,
        "actualTime": null,
        "priority": "default",
        "progressStatus": "default",
        "projectTaskLabelId": null,
        "completedSubtasks": 0,
        "timerIsRunning": false,
        "timerStartTime": null,
        "timerElapsedTime": null,
        "completionTime": null,
        "completedById": null,
        "createdAt": "2024-07-16T11:10:23.366Z",
        "updatedAt": "2024-07-16T11:10:23.366Z",
        "label": null,
        "creator": null,
        "completedBy": null,
        "assignee": [],
        "subTasks": [],
        "comments": [],
        "attachments": [],
        "dbTaskId": "clyobb0jq0000jdsudps7ejf8"
    }
}

HTTP Request

POST https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks

Body Parameters

Parameter Type Required Description
task.name string yes Name of task. Expects an object called task and inside the object, name vatiable. Example - task:{name:"New Task"}

Get All Tasks of Section

To get all the tasks of a project section, you can use the following HTTP request:

curl -X GET "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks" \
    -H "Authorization: your-api-key"
fetch(
    "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks",
    {
        method: "GET",
        headers: {
            Authorization: "your-api-key",
        },
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "section": {
        "id": "cm14n8tki0004fgehyy8yj4j6",
        "name": "Planned",
        "order": 0,
        "projectId": "cm14n8tjz0002fgehhyndyc80",
        "completedTasks": 0,
        "isFolded": false,
        "backgroundColor": "#EBECF0",
        "createdAt": "2024-09-16T06:48:19.891Z",
        "updatedAt": "2024-09-16T06:48:19.891Z",
        "tasks": [
            {
                "id": "cm14n9d060008fgehnha9567w",
                "name": "Test Task Edited",
                "description": null,
                "type": "task",
                "status": "incomplete",
                "order": 0,
                "taskSortId": 9999999,
                "projectSectionId": "cm14n8tki0004fgehyy8yj4j6",
                "orderInSection": 9999999,
                "taskTemplateId": null,
                "creatorUserToBusinessId": "cm0teabyp001robeuj3tsg85c",
                "startDate": null,
                "dueDate": null,
                "estimatedTime": null,
                "actualTime": null,
                "priority": "default",
                "progressStatus": "default",
                "projectTaskLabelId": null,
                "completedSubtasks": 0,
                "timerIsRunning": false,
                "timerStartTime": null,
                "timerElapsedTime": null,
                "completionTime": null,
                "completedById": null,
                "createdAt": "2024-09-16T06:48:45.079Z",
                "updatedAt": "2024-09-16T06:49:05.621Z",
                "subTasks": [],
                "creator": {
                    "id": "cm0teabyp001robeuj3tsg85c",
                    "status": "active",
                    "designation": null,
                    "memberId": "",
                    "joiningDate": "2024-09-08T09:52:05.905Z",
                    "userId": "cm0tea7dr0000obeuz0q5j6qp",
                    "businessId": "cm0teabv00004obeu7abjr93p",
                    "inviteStatus": "accepted",
                    "role": "admin",
                    "createdAt": "2024-09-08T09:52:05.905Z",
                    "updatedAt": "2024-09-08T09:52:05.905Z",
                    "user": {
                        "id": "cm0tea7dr0000obeuz0q5j6qp",
                        "firstName": "Farhaan",
                        "fullName": "Farhaan Mahbub",
                        "role": "business_user",
                        "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                    }
                },
                "completedBy": null,
                "label": null,
                "assignee": [],
                "comments": [],
                "attachments": [],
                "totalSubTasks": 0,
                "completedSubTasks": 0,
                "parentTask": null
            },
            {
                "id": "cm14nhydv0000fkllkkzni4nv",
                "name": "Updated task name",
                "description": null,
                "type": "task",
                "status": "incomplete",
                "order": 0,
                "taskSortId": 9999999,
                "projectSectionId": "cm14n8tki0004fgehyy8yj4j6",
                "orderInSection": 9999999,
                "taskTemplateId": null,
                "creatorUserToBusinessId": null,
                "startDate": null,
                "dueDate": null,
                "estimatedTime": null,
                "actualTime": null,
                "priority": "default",
                "progressStatus": "default",
                "projectTaskLabelId": null,
                "completedSubtasks": 0,
                "timerIsRunning": false,
                "timerStartTime": null,
                "timerElapsedTime": null,
                "completionTime": null,
                "completedById": null,
                "createdAt": "2024-09-16T06:55:26.035Z",
                "updatedAt": "2024-09-16T06:58:45.640Z",
                "subTasks": [],
                "creator": null,
                "completedBy": null,
                "label": null,
                "assignee": [],
                "comments": [],
                "attachments": [],
                "totalSubTasks": 0,
                "completedSubTasks": 0,
                "parentTask": null
            }
        ],
        "subtasks": [],
        "totalTasks": 2,
        "totalSubTasks": 0,
        "completedSubTasks": 0,
        "progress": 0
    }
}

HTTP Request

GET https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks

Edit Task or Rename Task

To rename a task in a section for a project, you can use the following HTTP request:

curl -X PATCH "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "Updated New To-Do Task"
}'
fetch(
    "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            name: "Updated New To-Do Task",
        }),
    }
);

The above command returns JSON structured like this:

{
    "status": "success"
}

HTTP Request

POST https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>/status

Update Task Status

To update status of a task (complete/incomplete) in a section for a project, you can use the following HTTP request:

curl -X PATCH "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>/status" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{}'
fetch(
    "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>/status",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({}),
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "task": {
        "id": "cm14nhydv0000fkllkkzni4nv",
        "name": "Updated task name",
        "description": null,
        "type": "task",
        "status": "complete",
        "order": 0,
        "taskSortId": 9999999,
        "projectSectionId": "cm14n8tki0004fgehyy8yj4j6",
        "orderInSection": 9999999,
        "taskTemplateId": null,
        "creatorUserToBusinessId": null,
        "startDate": null,
        "dueDate": null,
        "estimatedTime": null,
        "actualTime": null,
        "priority": "default",
        "progressStatus": "default",
        "projectTaskLabelId": null,
        "completedSubtasks": 0,
        "timerIsRunning": false,
        "timerStartTime": null,
        "timerElapsedTime": null,
        "completionTime": null,
        "completedById": null,
        "createdAt": "2024-09-16T06:55:26.035Z",
        "updatedAt": "2024-09-16T09:18:42.403Z",
        "label": null,
        "creator": null,
        "completedBy": null,
        "assignee": [],
        "subTasks": [],
        "comments": [],
        "attachments": [],
        "dbTaskId": "cm14nhydv0000fkllkkzni4nv"
    }
}

HTTP Request

POST https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>/status

Delete Task

To delete an existing task, you can use the following HTTP request.

curl -X DELETE "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>" \
    -H "Authorization: your-api-key"
fetch(
    "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>",
    {
        method: "DELETE",
        headers: {
            Authorization: "your-api-key",
        },
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "section": {
        "sectionTotalTasks": 1,
        "sectionTotalSubTasks": 1,
        "sectionCompletedTasks": 0,
        "sectionCompletedSubTasks": 0,
        "sectionProgress": 0
    }
}

HTTP Request

DELETE https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>

URL Parameters

Project Subtasks

Create Subtask

To create a new subtask for a task of a project, you can use the following HTTP request:

curl -X POST https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>/sub-tasks \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "subtask": {
        "name": "New To-Do Sub-Task"
    }
}'
fetch(
    "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>/sub-tasks",
    {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            task: {
                name: "New To-Do Sub-Task",
            },
        }),
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "subtask": {
        "id": "clypmb76x0000yk2mqqdfznxt",
        "name": "New To-Do sub-Task",
        "description": null,
        "status": "incomplete",
        "subtaskSortId": 9999999,
        "taskId": "cly1ae39g000pe05y2stjvn85",
        "creatorUserToBusinessId": null,
        "startDate": null,
        "dueDate": null,
        "estimatedTime": null,
        "actualTime": null,
        "priority": "default",
        "progressStatus": "default",
        "projectTaskLabelId": null,
        "completionTime": null,
        "completedById": null,
        "createdAt": "2024-07-17T09:06:13.929Z",
        "updatedAt": "2024-07-17T09:06:13.929Z",
        "label": null,
        "assignee": [],
        "comments": [],
        "attachments": [],
        "creator": null,
        "completedBy": null
    },
    "section": {
        "sectionTotalTasks": 1,
        "sectionTotalSubTasks": 2,
        "sectionCompletedTasks": 0,
        "sectionCompletedSubTasks": 0,
        "sectionProgress": 0
    },
    "project": {
        "totalTasks": 2,
        "totalSubTasks": 2,
        "completedTasks": 0,
        "completedSubTasks": 0,
        "totalProgress": 0
    }
}

HTTP Request

POST https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>/sub-tasks

Body Parameters

Parameter Type Required Description
subtask.name string yes Name of sub-task. Expects an object called subtask and inside the object, name vatiable. Example - subtask:{name:"New Sub Task"}

Delete Task

To delete an existing sub-task, you can use the following HTTP request.

curl -X DELETE "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>/sub-tasks/<SUBTASK_ID>" \
    -H "Authorization: your-api-key"
fetch(
    "https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>/sub-tasks/<SUBTASK_ID>",
    {
        method: "DELETE",
        headers: {
            Authorization: "your-api-key",
        },
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "section": {
        "sectionTotalTasks": 1,
        "sectionTotalSubTasks": 1,
        "sectionCompletedTasks": 0,
        "sectionCompletedSubTasks": 0,
        "sectionProgress": 0
    }
}

HTTP Request

DELETE https://api.onesuite.io/v1/projects/<PROJECT_ID>/sections/<SECTION_ID>/tasks/<TASK_ID>/sub-tasks/<SUBTASK_ID>

URL Parameters

Project Labels

Get All Labels

Get Specific Label

Create Label

Edit Label

Delete Label

Invoices

Get All Invoices

To retrieve all invoices, you can send a GET request to the following endpoint:

curl -X GET "https://api.onesuite.io/v1/invoices" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/invoices", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "invoices": [
        {
            "id": "clymocbtq0005v3ixw3ceg57p",
            "name": "INVOICE",
            "createdDate": "2024-07-15T07:39:47.274Z",
            "invoiceNo": "Invoice #1721029145611",
            "postBoxNo": "PO 456001200",
            "company": "Business Name",
            "street": "Expedita suscipit vo",
            "city": "Suscipit aliquam ill",
            "address": "Aliquid sint velit m",
            "phone": "+1 (563) 558-8899",
            "email": "[email protected]",
            "description": "\nDear John Doe,\n\t\t\nPlease find below a cost-breakdown for the recent work completed. Please make payment at your earliest \nconvenience, and do not hesitate to contact me with any questions.\n \nMany thanks,\nFarhaan Mahbub",
            "note": "\nMany thanks for your custom! I look forward to doing business with you again in due course.\n \nPayment terms: to be received within 60 days.",
            "subTotalPrice": 5000,
            "discountPrice": null,
            "salesTax": 0,
            "totalPrice": 5000,
            "status": "unpaid",
            "paymentDate": null,
            "columnOneName": "Item Description",
            "columnTwoName": "Quantity",
            "columnThreeName": "Unit Price (USD)",
            "columnFourName": "Total (USD)",
            "columnFiveName": "Subtotal",
            "columnSixName": "Sales TAX (0%)",
            "columnSevenName": "Total",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "clientProfileId": "clymob8p60002v3ix1luisct2",
            "clientName": "Att: John Doe",
            "clientCompany": "Doe Enterprises",
            "projectId": "cly1aboiv000ae05yi7hvs6nw",
            "dueDate": "2024-07-21T18:00:00.000Z",
            "currency": "USD",
            "createdAt": "2024-07-15T07:39:47.294Z",
            "updatedAt": "2024-07-15T07:39:47.294Z",
            "invoiceItems": [
                {
                    "id": "clymocbtq0006v3ix3qudkpr4",
                    "serialNo": 0,
                    "description": "Supporting of in-house project (hours worked)",
                    "quantity": 40,
                    "unitPrice": 125,
                    "totalPrice": 5000,
                    "invoiceId": "clymocbtq0005v3ixw3ceg57p",
                    "createdAt": "2024-07-15T07:39:47.294Z",
                    "updatedAt": "2024-07-15T07:39:47.294Z"
                }
            ],
            "invoiceSerialNo": 1
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/invoices

Get Specific Invoice

To retrieve a specific invoice, you can send a GET request to the following endpoint:

curl -X GET "https://api.onesuite.io/v1/invoices/clymocbtq0005v3ixw3ceg57p" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/invoices/clymocbtq0005v3ixw3ceg57p", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "invoice": {
        "id": "clymocbtq0005v3ixw3ceg57p",
        "name": "INVOICE",
        "createdDate": "2024-07-15T07:39:47.274Z",
        "invoiceNo": "Invoice #1721029145611",
        "postBoxNo": "PO 456001200",
        "company": "Business Name",
        "street": "Expedita suscipit vo",
        "city": "Suscipit aliquam ill",
        "address": "Aliquid sint velit m",
        "phone": "+1 (563) 558-8899",
        "email": "[email protected]",
        "description": "\nDear John Doe,\n\t\t\nPlease find below a cost-breakdown for the recent work completed. Please make payment at your earliest \nconvenience, and do not hesitate to contact me with any questions.\n \nMany thanks,\nFarhaan Mahbub",
        "note": "\nMany thanks for your custom! I look forward to doing business with you again in due course.\n \nPayment terms: to be received within 60 days.",
        "invoiceItems": [
            {
                "id": "clymocbtq0006v3ix3qudkpr4",
                "serialNo": 0,
                "description": "Supporting of in-house project (hours worked)",
                "quantity": 40,
                "unitPrice": 125,
                "totalPrice": 5000,
                "invoiceId": "clymocbtq0005v3ixw3ceg57p",
                "createdAt": "2024-07-15T07:39:47.294Z",
                "updatedAt": "2024-07-15T07:39:47.294Z"
            }
        ],
        "subTotalPrice": 5000,
        "discountPrice": null,
        "salesTax": 0,
        "totalPrice": 5000,
        "status": "unpaid",
        "paymentDate": null,
        "columnOneName": "Item Description",
        "columnTwoName": "Quantity",
        "columnThreeName": "Unit Price (USD)",
        "columnFourName": "Total (USD)",
        "columnFiveName": "Subtotal",
        "columnSixName": "Sales TAX (0%)",
        "columnSevenName": "Total",
        "client": {
            "id": "clymob8p60002v3ix1luisct2",
            "firstName": "John",
            "lastName": "Doe",
            "fullName": "John Doe",
            "profileImg": "",
            "email": "[email protected]",
            "personalEmail": "[email protected]",
            "clinetCompanyId": "clylgaq980000zhrs3y3e6zcs",
            "userToBusinessId": "clymob8pj0004v3ixb61q874r"
        },
        "clientName": "Att: John Doe",
        "clientCompany": "Doe Enterprises",
        "project": {
            "id": "cly1aboiv000ae05yi7hvs6nw",
            "name": "One Suite Development",
            "description": "<p>One Suite development project<br></p>",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "privacy": "public"
        },
        "dueDate": "2024-07-21T18:00:00.000Z",
        "currency": "USD",
        "createdAt": "2024-07-15T07:39:47.294Z",
        "updatedAt": "2024-07-15T07:39:47.294Z",
        "clientProfileId": "clymob8p60002v3ix1luisct2"
    }
}

HTTP Request

GET https://api.onesuite.io/v1/invoices/<INVOICE_ID>

URL Parameters

Create Invoice

curl -X POST https://api.onesuite.io/v1/invoices \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "company": "Demo Company",
    "street": "Expedita suscipit vo",
    "city": "Suscipit aliquam ill",
    "address": "Aliquid sint velit m",
    "phone": "+1 (563) 558-8899",
    "email": "[email protected]",
    "name": "INVOICE",
    "createdDate": "2024-07-15T08:50:01.050Z",
    "invoiceNo": "Invoice #1721033367738",
    "postBoxNo": "PO 456001200",
    "client": {
        "key": "clymob8p60002v3ix1luisct2"
    },
    "clientName": "Att: John Doe",
    "clientCompany": "Doe Enterprises",
    "project": {
        "key": "clyfhwcsb0006125wg3m6q34u"
    },
    "description": "\nDear John Doe,\n\t\t\nPlease find below a cost-breakdown for the recent work completed. Please make payment at your earliest \nconvenience, and do not hesitate to contact me with any questions.\n \nMany thanks,\nFarhaan Mahbub",
    "note": "\nMany thanks for your custom! I look forward to doing business with you again in due course.\n \nPayment terms: to be received within 60 days.",
    "columnNames": {
        "description": "Item Description",
        "quantity": "Quantity",
        "unitPrice": "Unit Price (USD)",
        "totalPrice": "Total (USD)"
    },
    "priceColumnNames": {
        "subtotal": "Subtotal",
        "salesTax": "Sales TAX (0%)",
        "total": "Total"
    },
    "invoiceItems": [
        {
            "serialNo": 0,
            "description": "Supporting of in-house project (hours worked)",
            "quantity": 40,
            "unitPrice": 125,
            "totalPrice": 5000
        }
    ],
    "subTotalPrice": 5000,
    "salesTax": 0,
    "totalPrice": 5000,
    "dueDate": "2024-07-30T18:00:00.000Z",
    "currency": "USD"
}'

fetch("https://api.onesuite.io/v1/invoices", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        company: "Demo Company",
        street: "Expedita suscipit vo",
        city: "Suscipit aliquam ill",
        address: "Aliquid sint velit m",
        phone: "+1 (563) 558-8899",
        email: "[email protected]",
        name: "INVOICE",
        createdDate: "2024-07-15T08:50:01.050Z",
        invoiceNo: "Invoice #1721033367738",
        postBoxNo: "PO 456001200",
        client: {
            key: "clymob8p60002v3ix1luisct2",
        },
        clientName: "Att: John Doe",
        clientCompany: "Doe Enterprises",
        project: {
            key: "clyfhwcsb0006125wg3m6q34u",
        },
        description:
            "\nDear John Doe,\n\t\t\nPlease find below a cost-breakdown for the recent work completed. Please make payment at your earliest \nconvenience, and do not hesitate to contact me with any questions.\n \nMany thanks,\nFarhaan Mahbub",
        note: "\nMany thanks for your custom! I look forward to doing business with you again in due course.\n \nPayment terms: to be received within 60 days.",
        columnNames: {
            description: "Item Description",
            quantity: "Quantity",
            unitPrice: "Unit Price (USD)",
            totalPrice: "Total (USD)",
        },
        priceColumnNames: {
            subtotal: "Subtotal",
            salesTax: "Sales TAX (0%)",
            total: "Total",
        },
        invoiceItems: [
            {
                serialNo: 0,
                description: "Supporting of in-house project (hours worked)",
                quantity: 40,
                unitPrice: 125,
                totalPrice: 5000,
            },
        ],
        subTotalPrice: 5000,
        salesTax: 0,
        totalPrice: 5000,
        dueDate: "2024-07-30T18:00:00.000Z",
        currency: "USD",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "data": {
        "invoice": {
            "id": "clymrcbgu0002zmxtoxz3dcbc",
            "name": "INVOICE",
            "createdDate": "2024-07-15T08:50:01.050Z",
            "invoiceNo": "Invoice #1721033367738",
            "postBoxNo": "PO 456001200",
            "company": "Demo Company",
            "street": "Expedita suscipit vo",
            "city": "Suscipit aliquam ill",
            "address": "Aliquid sint velit m",
            "phone": "+1 (563) 558-8899",
            "email": "[email protected]",
            "description": "\nDear John Doe,\n\t\t\nPlease find below a cost-breakdown for the recent work completed. Please make payment at your earliest \nconvenience, and do not hesitate to contact me with any questions.\n \nMany thanks,\nFarhaan Mahbub",
            "note": "\nMany thanks for your custom! I look forward to doing business with you again in due course.\n \nPayment terms: to be received within 60 days.",
            "subTotalPrice": 5000,
            "discountPrice": null,
            "salesTax": 0,
            "totalPrice": 5000,
            "status": "unpaid",
            "paymentDate": null,
            "columnOneName": "Item Description",
            "columnTwoName": "Quantity",
            "columnThreeName": "Unit Price (USD)",
            "columnFourName": "Total (USD)",
            "columnFiveName": "Subtotal",
            "columnSixName": "Sales TAX (0%)",
            "columnSevenName": "Total",
            "businessId": "clxsof7fh000413sfbsb69nci",
            "clientProfileId": "clymob8p60002v3ix1luisct2",
            "clientName": "Att: John Doe",
            "clientCompany": "Doe Enterprises",
            "projectId": "clyfhwcsb0006125wg3m6q34u",
            "dueDate": "2024-07-30T18:00:00.000Z",
            "currency": "USD",
            "createdAt": "2024-07-15T09:03:45.678Z",
            "updatedAt": "2024-07-15T09:03:45.678Z"
        }
    }
}

This endpoint creates a new invoice in your business.

HTTP Request

POST https://api.onesuite.io/v1/invoices

Body Parameters

Parameter Type Required Description
company string yes Your company name
street string no Your company street
city string no Your company city
address string no Your company address
phone string no Your company contact number
email string no Your copany email address
name string no Give invoice a name
createdDate datetime no Invoice create date
client.key string yes The id of the client. Requires an object named client where key attribute is required which is client id.
clientName string yes Name of the client
clientCompany string yes Company name of the client
project.key string no The id of the project. Requires an object named project where key attribute is required which is project id.
description string yes Description of the invoice.
note string no Notes for the invoice
columnNames.description string no You can change the name of the column description. Requires an object named columnNames where description is the variable name.
columnNames.quantity string no You can change the name of the column quantity. Requires an object named columnNames where quantity is the variable name.
columnNames.unitPrice string no You can change the name of the column unitPrice. Requires an object named columnNames where unitPrice is the variable name.
columnNames.totalPrice string no You can change the name of the column totalPrice. Requires an object named columnNames where totalPrice is the variable name.
priceColumnNames.subtotal object no You can change the name of the column subtotal. Requires an object named priceColumnNames where subtotal is the variable name.
priceColumnNames.salesTax string no You can change the name of the column salesTax. Requires an object named priceColumnNames where salesTax is the variable name.
priceColumnNames.total string no You can change the name of the column total. Requires an object named priceColumnNames where total is the variable name.
invoiceItems[{}] array no The items for the invoice. Array expects a list of objects where { serialNo int, description string, quantity int, unitPrice float, totalPrice float } is required.
subTotalPrice float yes Subtotal price of the invoice items
salesTax float yes Sales tax for the invoice (if available)
totalPrice float yes Total price of the invoice items
dueDate datetime yes Due time for the invoice to be paid
currency string yes Short form of the currency for invoice. Example - "USD"

Edit Invoice

curl -X PATCH https://api.onesuite.io/v1/invoices/clymrcbgu0002zmxtoxz3dcbc \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "company": "Updated Company",
    "street": "Expedita suscipit vo",
    "city": "Suscipit aliquam ill",
    "address": "Aliquid sint velit m",
    "phone": "+1 (563) 558-8899",
    "email": "[email protected]",
    "name": "UPDATED INVOICE",
    "createdDate": "2024-07-15T08:50:01.050Z",
    "invoiceNo": "Invoice #1721033367738",
    "postBoxNo": "PO 456001200",
    "client": {
        "key": "clymob8p60002v3ix1luisct2"
    },
    "clientName": "Att: John Doe",
    "clientCompany": "Doe Enterprises",
    "project": {
        "key": "clyfhwcsb0006125wg3m6q34u"
    },
    "description": "\nDear John Doe,\n\t\t\nPlease find below a cost-breakdown for the recent work completed. Please make payment at your earliest \nconvenience, and do not hesitate to contact me with any questions.\n \nMany thanks,\nFarhaan Mahbub",
    "note": "\nMany thanks for your custom! I look forward to doing business with you again in due course.\n \nPayment terms: to be received within 60 days.",
    "columnNames": {
        "description": "Item Description",
        "quantity": "Quantity",
        "unitPrice": "Unit Price (USD)",
        "totalPrice": "Total (USD)"
    },
    "priceColumnNames": {
        "subtotal": "Subtotal",
        "salesTax": "Sales TAX (0%)",
        "total": "Total"
    },
    "invoiceItems": [
        {
            "serialNo": 0,
            "description": "Supporting of in-house project (hours worked)",
            "quantity": 40,
            "unitPrice": 125,
            "totalPrice": 5000
        }
    ],
    "subTotalPrice": 5000,
    "salesTax": 0,
    "totalPrice": 5000,
    "dueDate": "2024-07-30T18:00:00.000Z",
    "currency": "USD"
}'

fetch("https://api.onesuite.io/v1/invoices/clymrcbgu0002zmxtoxz3dcbc", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        company: "UPDATED Company",
        street: "Expedita suscipit vo",
        city: "Suscipit aliquam ill",
        address: "Aliquid sint velit m",
        phone: "+1 (563) 558-8899",
        email: "[email protected]",
        name: "UPDATED INVOICE",
        createdDate: "2024-07-15T08:50:01.050Z",
        invoiceNo: "Invoice #1721033367738",
        postBoxNo: "PO 456001200",
        client: {
            key: "clymob8p60002v3ix1luisct2",
        },
        clientName: "Att: John Doe",
        clientCompany: "Doe Enterprises",
        project: {
            key: "clyfhwcsb0006125wg3m6q34u",
        },
        description:
            "\nDear John Doe,\n\t\t\nPlease find below a cost-breakdown for the recent work completed. Please make payment at your earliest \nconvenience, and do not hesitate to contact me with any questions.\n \nMany thanks,\nFarhaan Mahbub",
        note: "\nMany thanks for your custom! I look forward to doing business with you again in due course.\n \nPayment terms: to be received within 60 days.",
        columnNames: {
            description: "Item Description",
            quantity: "Quantity",
            unitPrice: "Unit Price (USD)",
            totalPrice: "Total (USD)",
        },
        priceColumnNames: {
            subtotal: "Subtotal",
            salesTax: "Sales TAX (0%)",
            total: "Total",
        },
        invoiceItems: [
            {
                serialNo: 0,
                description: "Supporting of in-house project (hours worked)",
                quantity: 40,
                unitPrice: 125,
                totalPrice: 5000,
            },
        ],
        subTotalPrice: 5000,
        salesTax: 0,
        totalPrice: 5000,
        dueDate: "2024-07-30T18:00:00.000Z",
        currency: "USD",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "invoice": {
        "id": "clymrcbgu0002zmxtoxz3dcbc",
        "name": "UPDATED INVOICE",
        "createdDate": "2024-07-15T08:50:01.050Z",
        "invoiceNo": "Invoice #1721033367738",
        "postBoxNo": "PO 456001200",
        "company": "Updated Company",
        "street": "Expedita suscipit vo",
        "city": "Suscipit aliquam ill",
        "address": "Aliquid sint velit m",
        "phone": "+1 (563) 558-8899",
        "email": "[email protected]",
        "description": "\nDear John Doe,\n\t\t\nPlease find below a cost-breakdown for the recent work completed. Please make payment at your earliest \nconvenience, and do not hesitate to contact me with any questions.\n \nMany thanks,\nFarhaan Mahbub",
        "note": "\nMany thanks for your custom! I look forward to doing business with you again in due course.\n \nPayment terms: to be received within 60 days.",
        "subTotalPrice": 5000,
        "discountPrice": null,
        "salesTax": 0,
        "totalPrice": 5000,
        "status": "unpaid",
        "paymentDate": null,
        "columnOneName": "Item Description",
        "columnTwoName": "Quantity",
        "columnThreeName": "Unit Price (USD)",
        "columnFourName": "Total (USD)",
        "columnFiveName": "Subtotal",
        "columnSixName": "Sales TAX (0%)",
        "columnSevenName": "Total",
        "businessId": "clxsof7fh000413sfbsb69nci",
        "clientProfileId": "clymob8p60002v3ix1luisct2",
        "clientName": "Att: John Doe",
        "clientCompany": "Doe Enterprises",
        "projectId": "clyfhwcsb0006125wg3m6q34u",
        "dueDate": "2024-07-30T18:00:00.000Z",
        "currency": "USD",
        "createdAt": "2024-07-15T09:03:45.678Z",
        "updatedAt": "2024-07-15T10:18:37.759Z"
    }
}

This endpoint updates an existing invoice in your business.

HTTP Request

PATCH https://api.onesuite.io/v1/invoices/<INVOICE_ID>

URL Parameters

Body Parameters

Parameter Type Required Description
company string yes Your company name
street string no Your company street
city string no Your company city
address string no Your company address
phone string no Your company contact number
email string no Your copany email address
name string no Give invoice a name
createdDate datetime no Invoice create date
client.key string yes The id of the client. Requires an object named client where key attribute is required which is client id.
clientName string yes Name of the client
clientCompany string yes Company name of the client
project.key string no The id of the project. Requires an object named project where key attribute is required which is project id.
description string yes Description of the invoice.
note string no Notes for the invoice
columnNames.description string no You can change the name of the column description. Requires an object named columnNames where description is the variable name.
columnNames.quantity string no You can change the name of the column quantity. Requires an object named columnNames where quantity is the variable name.
columnNames.unitPrice string no You can change the name of the column unitPrice. Requires an object named columnNames where unitPrice is the variable name.
columnNames.totalPrice string no You can change the name of the column totalPrice. Requires an object named columnNames where totalPrice is the variable name.
priceColumnNames.subtotal object no You can change the name of the column subtotal. Requires an object named priceColumnNames where subtotal is the variable name.
priceColumnNames.salesTax string no You can change the name of the column salesTax. Requires an object named priceColumnNames where salesTax is the variable name.
priceColumnNames.total string no You can change the name of the column total. Requires an object named priceColumnNames where total is the variable name.
invoiceItems[{}] array no The items for the invoice. Array expects a list of objects where { serialNo int, description string, quantity int, unitPrice float, totalPrice float } is required.
subTotalPrice float yes Subtotal price of the invoice items
salesTax float yes Sales tax for the invoice (if available)
totalPrice float yes Total price of the invoice items
dueDate datetime yes Due time for the invoice to be paid
currency string yes Short form of the currency for invoice. Example - "USD"

Delete Invoice

curl -X DELETE "https://api.onesuite.io/v1/invoices/clymrcbgu0002zmxtoxz3dcbc" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/invoices/clymrcbgu0002zmxtoxz3dcbc", {
    method: "DELETE",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success"
}

This endpoint deletes a specific invoice.

HTTP Request

DELETE https://api.onesuite.io/v1/invoices/<INVOICE_ID>

URL Parameters

Change Invoice Status

curl -X PATCH "https://api.onesuite.io/v1/invoices/clymrcbgu0002zmxtoxz3dcbc/payment-status" \
  -H "Authorization: your-api-key"
fetch(
    "https://api.onesuite.io/v1/invoices/clymrcbgu0002zmxtoxz3dcbc/payment-status",
    {
        method: "PATCH",
        headers: {
            Authorization: "your-api-key",
        },
    }
);

The above command returns JSON structured like this:

{
    "status": "success",
    "invoices": [
        {
            "id": "cm14jd8th000612h2mmi5mo4c",
            "name": "UPDATED INVOICE",
            "createdDate": "2024-07-15T08:50:01.050Z",
            "invoiceNo": "Invoice #1721033367738",
            "postBoxNo": "PO 456001200",
            "company": "Updated Company",
            "street": "Expedita suscipit vo",
            "city": "Suscipit aliquam ill",
            "address": "Aliquid sint velit m",
            "phone": "+1 (563) 558-8899",
            "email": "[email protected]",
            "description": "\nDear John Doe,\n\t\t\nPlease find below a cost-breakdown for the recent work completed. Please make payment at your earliest \nconvenience, and do not hesitate to contact me with any questions.\n \nMany thanks,\nFarhaan Mahbub",
            "note": "\nMany thanks for your custom! I look forward to doing business with you again in due course.\n \nPayment terms: to be received within 60 days.",
            "subTotalPrice": 5000,
            "discountPrice": null,
            "salesTax": 0,
            "totalPrice": 5000,
            "status": "paid",
            "paymentDate": null,
            "columnOneName": "Item Description",
            "columnTwoName": "Quantity",
            "columnThreeName": "Unit Price (USD)",
            "columnFourName": "Total (USD)",
            "columnFiveName": "Subtotal",
            "columnSixName": "Sales TAX (0%)",
            "columnSevenName": "Total",
            "businessId": "cm0teabv00004obeu7abjr93p",
            "clientProfileId": "cm14jc9dy000312h2hbwtenmi",
            "clientName": "Att: John Doe",
            "clientCompany": "Doe Enterprises",
            "projectId": null,
            "dueDate": "2024-07-30T18:00:00.000Z",
            "currency": "USD",
            "createdAt": "2024-09-16T04:59:47.813Z",
            "updatedAt": "2024-09-16T05:18:57.865Z",
            "invoiceItems": [
                {
                    "id": "cm14jocay000812h2bwohbwml",
                    "serialNo": 0,
                    "description": "Supporting of in-house project (hours worked)",
                    "quantity": 40,
                    "unitPrice": 125,
                    "totalPrice": 5000,
                    "invoiceId": "cm14jd8th000612h2mmi5mo4c",
                    "createdAt": "2024-09-16T05:08:25.546Z",
                    "updatedAt": "2024-09-16T05:08:25.546Z"
                }
            ],
            "invoiceSerialNo": 1
        }
    ]
}

This endpoint toggles the payment status of a invoice.

Payment status can be either 'paid' or 'unpaid'

HTTP Request

PATCH https://api.onesuite.io/v1/invoices/<INVOICE_ID>/payment-status

URL Parameters

Get Activity Logs of a Invoice

To retrieve activity logs of a specific invoice, you can send a GET request to the following endpoint:

curl -X GET "https://api.onesuite.io/v1/invoices/clymrt19d0004zmxt2o0kl74v/logs" \
    -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/invoices/clymrt19d0004zmxt2o0kl74v/logs", {
    method: "GET",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "invoiceActivityLogs": [
        {
            "id": "clymua7ev0004i63uw6rzxdcv",
            "invoiceId": "clymrt19d0004zmxt2o0kl74v",
            "activityType": "payment status changed to paid",
            "actionTime": "2024-07-15T10:26:05.953Z",
            "invoiceActionById": "clxsof7jh001r13sf6pjlxytc",
            "createdAt": "2024-07-15T10:26:05.959Z",
            "updatedAt": "2024-07-15T10:26:05.959Z",
            "invoice": {
                "name": "INVOICE"
            },
            "invoiceActionBy": {
                "user": {
                    "firstName": "Farhaan",
                    "lastName": "Mahbub",
                    "fullName": "Farhaan Mahbub",
                    "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                }
            }
        },
        {
            "id": "clymu8t320002i63u6hqpa8g0",
            "invoiceId": "clymrt19d0004zmxt2o0kl74v",
            "activityType": "pdf sent to client",
            "actionTime": "2024-07-15T10:25:00.734Z",
            "invoiceActionById": "clxsof7jh001r13sf6pjlxytc",
            "createdAt": "2024-07-15T10:25:00.734Z",
            "updatedAt": "2024-07-15T10:25:00.734Z",
            "invoice": {
                "name": "INVOICE"
            },
            "invoiceActionBy": {
                "user": {
                    "firstName": "Farhaan",
                    "lastName": "Mahbub",
                    "fullName": "Farhaan Mahbub",
                    "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                }
            }
        },
        {
            "id": "clymrtgez000bzmxtumd1178y",
            "invoiceId": "clymrt19d0004zmxt2o0kl74v",
            "activityType": "updated",
            "actionTime": "2024-07-15T09:17:05.234Z",
            "invoiceActionById": "clxsof7jh001r13sf6pjlxytc",
            "createdAt": "2024-07-15T09:17:05.243Z",
            "updatedAt": "2024-07-15T09:17:05.243Z",
            "invoice": {
                "name": "INVOICE"
            },
            "invoiceActionBy": {
                "user": {
                    "firstName": "Farhaan",
                    "lastName": "Mahbub",
                    "fullName": "Farhaan Mahbub",
                    "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                }
            }
        },
        {
            "id": "clymrt19m0009zmxt6emndaaa",
            "invoiceId": "clymrt19d0004zmxt2o0kl74v",
            "activityType": "created",
            "actionTime": "2024-07-15T09:16:45.601Z",
            "invoiceActionById": "clxsof7jh001r13sf6pjlxytc",
            "createdAt": "2024-07-15T09:16:45.610Z",
            "updatedAt": "2024-07-15T09:16:45.610Z",
            "invoice": {
                "name": "INVOICE"
            },
            "invoiceActionBy": {
                "user": {
                    "firstName": "Farhaan",
                    "lastName": "Mahbub",
                    "fullName": "Farhaan Mahbub",
                    "profileImg": "https://lh3.googleusercontent.com/a/ACg8ocJ3ShrSFyqeinU9g5-43wVhnxzk83rRqJUNxxGnRYwjIMRS9Kz7=s96-c"
                }
            }
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/invoices/<INVOICE_ID>/logs

URL Parameters