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

Client CRUD Operations

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:

{
    "message": "Clients list fetched successfully",
    "clients": [
        {
            "id": "clylgomqt0001casgvlnnowld",
            "type": "company",
            "status": {
                "id": "status_id",
                "name": "Active",
                "slug": "active",
                "bgColor": "#E0E7FF",
                "fgColor": "#3730A3"
            },
            "priority": {
                "id": "priority_id",
                "name": "High",
                "slug": "high",
                "bgColor": "#FED7AA",
                "fgColor": "#9A3412"
            },
            "assignedTo": {
                "id": "user_to_business_id",
                "fullName": "John Doe",
                "email": "[email protected]"
            },
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

This endpoint retrieves all clients for your business with full details including custom fields.

HTTP Request

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

Get Client List (Simple Data)

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Clients list with simple data fetched successfully",
    "clients": [
        {
            "id": "clylgomqt0001casgvlnnowld",
            "type": "company",
            "name": "Doe Enterprises",
            "avatar": "https://example.com/logo.png",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "status": {
                "id": "status_id",
                "name": "Active",
                "slug": "actively_working",
                "bgColor": "#E0E7FF",
                "fgColor": "#3730A3"
            },
            "priority": {
                "id": "priority_id",
                "name": "High",
                "slug": "high",
                "bgColor": "#FED7AA",
                "fgColor": "#9A3412"
            },
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

This endpoint retrieves clients with minimal data for faster loading.

HTTP Request

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

Get Specific Client

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client details fetched successfully",
    "client": {
        "id": "clylgomqt0001casgvlnnowld",
        "type": "company",
        "status": {
            "id": "status_id",
            "name": "Active",
            "slug": "actively_working",
            "bgColor": "#E0E7FF",
            "fgColor": "#3730A3"
        },
        "priority": {
            "id": "priority_id",
            "name": "High",
            "slug": "high",
            "bgColor": "#FED7AA",
            "fgColor": "#9A3412"
        },
        "assignedTo": {
            "id": "user_to_business_id",
            "fullName": "John Doe",
            "email": "[email protected]"
        },
        "invitationStatus": "not-invited",
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

This endpoint retrieves detailed information about a specific client including all custom fields.

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 '{
    "clientType": "company",
    "company": {
        "name": "Doe Enterprises",
        "primaryEmail": "[email protected]",
        "message": "Welcome to the client portal!",
        "people": [
            {
                "name": "John Doe",
                "email": "[email protected]",
                "inviteToPortal": true
            }
        ],
        "pointOfContact": {
            "name": "Jane Doe",
            "email": "[email protected]",
            "inviteToPortal": true
        }
    }
}'
fetch("https://api.onesuite.io/v1/clients", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        clientType: "company",
        company: {
            name: "Doe Enterprises",
            primaryEmail: "[email protected]",
            message: "Welcome to the client portal!",
            people: [
                {
                    name: "John Doe",
                    email: "[email protected]",
                    inviteToPortal: true,
                },
            ],
            pointOfContact: {
                name: "Jane Doe",
                email: "[email protected]",
                inviteToPortal: true,
            },
        },
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client created successfully",
    "client": {
        "id": "cmj0zi59n01kt9oan8xqeaole",
        "type": "company",
        "companyId": "cmj0zi59301kq9oan1z3ipp08",
        "peopleId": null,
        "statusId": "cmiin0sg8005d6xwbmhkyt3eo",
        "status": {
            "id": "cmiin0sg8005d6xwbmhkyt3eo",
            "name": "Actively Working",
            "slug": "actively_working",
            "bgColor": "#E0E7FF",
            "fgColor": "#3730A3",
            "borderColor": "#A5B4FC"
        },
        "priorityId": "cmiin0sgc005p6xwb7rg7gca0",
        "priority": {
            "id": "cmiin0sgc005p6xwb7rg7gca0",
            "name": "Medium",
            "slug": "medium",
            "bgColor": "#FEF3C7",
            "fgColor": "#92400E",
            "borderColor": "#FCD34D"
        },
        "bgColor": "#DBEAFE",
        "fgColor": "#1E40AF",
        "assignedTo": null,
        "invitationStatus": "not-invited",
        "createdAt": "2025-12-11T05:15:07.691Z",
        "updatedAt": "2025-12-11T05:15:07.691Z",
        "name": "Doe Enterprises",
        "logo": null,
        "emails": [
            {
                "id": "cmj0zi59d01kr9oanpohhb7fh",
                "email": "[email protected]",
                "isPrimary": true
            }
        ],
        "phones": [],
        "people": [
            {
                "id": "cmj0zi5bb01kx9oanqqsevvag",
                "name": "John Doe",
                "email": "[email protected]",
                "invitationStatus": "invited"
            }
        ],
        "pointOfContact": {
            "id": "cmj0zi64x01l19oannvm834jw",
            "name": "Jane Doe",
            "emails": [
                {
                    "id": "cmj0zi65701l29oansaugc86h",
                    "email": "[email protected]",
                    "isPrimary": true
                }
            ],
            "invitationStatus": "invited"
        },
        "accountOwner": null,
        "opportunities": []
    }
}

This endpoint creates a new client. You can create either a "company" or "individual" type client.

HTTP Request

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

Body Parameters

Parameter Type Required Description
clientType string yes* Type of client: "company" or "individual" (auto-determined if only one type available)
company object no Company data (required if clientType is "company")
people object no People data (required if clientType is "individual")

Company Object Parameters

Parameter Type Required Description
name string yes Company name
primaryEmail string yes Primary email address for the company
message string no Custom message for client portal invitation
people array no Array of people objects to add to the company
pointOfContact object no Point of contact object

People Array Item Parameters (for company)

Parameter Type Required Description
name string yes Person name
email string yes* Email address (required if inviteToPortal is true)
inviteToPortal boolean no Whether to invite this person to the client portal

Point of Contact Parameters

Parameter Type Required Description
name string yes Point of contact name
email string yes* Email address (required if inviteToPortal is true)
inviteToPortal boolean no Whether to invite to the client portal

People Object Parameters (for individual client)

Parameter Type Required Description
name string yes Person name
primaryEmail string yes Primary email address
message string no Custom message for client portal invitation
inviteToPortal boolean no Whether to invite to the client portal
industryId string no Industry ID
sourceId string no Source ID

Delete Single Client

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client deleted successfully"
}

HTTP Request

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

URL Parameters

Parameter Description
CLIENT_ID The ID of the client to delete

Delete Multiple Clients

curl -X PATCH "https://api.onesuite.io/v1/clients/delete-multiple" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "clientIds": ["client_id_1", "client_id_2", "client_id_3"]
}'
fetch("https://api.onesuite.io/v1/clients/delete-multiple", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        clientIds: ["client_id_1", "client_id_2", "client_id_3"],
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Clients deleted successfully"
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/delete-multiple

Body Parameters

Parameter Type Required Description
clientIds string[] yes Array of client IDs to delete

Basic Information Mutations

Update Client Name

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

The above command returns JSON structured like this:

{
    "message": "Name updated successfully",
    "name": "Updated Company Name",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
name string yes Updated client name

Update Client Address

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/address" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "address1": "123 Main St",
    "address2": "Suite 100",
    "city": "New York",
    "state": "NY",
    "zip": "10001",
    "country": "United States",
    "countryCode": "US",
    "countryDialCode": "+1",
    "countryFlag": "🇺🇸"
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/address", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        address1: "123 Main St",
        address2: "Suite 100",
        city: "New York",
        state: "NY",
        zip: "10001",
        country: "United States",
        countryCode: "US",
        countryDialCode: "+1",
        countryFlag: "🇺🇸",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Address updated successfully",
    "address": {
        "address1": "123 Main St",
        "address2": "Suite 100",
        "city": "New York",
        "state": "NY",
        "zip": "10001",
        "country": "United States",
        "countryCode": "US",
        "countryDialCode": "+1",
        "countryFlag": "🇺🇸"
    },
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
address1 string no Street address line 1
address2 string no Street address line 2
city string no City
state string no State/Province
zip string no ZIP/Postal code
country string no Country name (or object with name, code, etc.)
countryCode string no Country code (e.g., "US")
countryDialCode string no Country dial code (e.g., "+1")
countryFlag string no Country flag emoji

Note: At least one address field must be provided.

Business Information Mutations (Company clients only)

Update Client ARR

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/arr" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "annualRecurringRevenue": 500000,
    "currency": "USD",
    "currencySymbol": "$",
    "currencyName": "US Dollar"
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/arr", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        annualRecurringRevenue: 500000,
        currency: "USD",
        currencySymbol: "$",
        currencyName: "US Dollar",
    }),
});

The above command returns JSON structured like this:

{
    "message": "ARR updated successfully",
    "annualRecurringRevenue": 500000,
    "currency": "USD",
    "currencySymbol": "$",
    "currencyName": "US Dollar",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
annualRecurringRevenue number yes Annual recurring revenue amount
currency string no Currency code (default: "USD")
currencySymbol string no Currency symbol (default: "$")
currencyName string no Currency name (default: "US Dollar")

Update Client Employees

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/employees" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "employees": 150
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/employees",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            employees: 150,
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Employee count updated successfully",
    "employees": 150,
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
employees number yes Number of employees

Update Client Industry

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/industry" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "industryId": "industry_id_here"
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/industry", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        industryId: "industry_id_here",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Industry updated successfully",
    "industry": {
        "id": "industry_id",
        "name": "Technology",
        "slug": "technology"
    },
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
industryId string yes Industry ID

Update Client Source

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/source" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "sourceId": "source_id_here"
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/source", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        sourceId: "source_id_here",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Source updated successfully",
    "source": {
        "id": "source_id",
        "name": "Website",
        "slug": "website"
    },
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
sourceId string yes Source ID

Update Client Social Media

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/social-media" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "linkedinUrl": "https://linkedin.com/company/example",
    "twitterUrl": "https://twitter.com/example",
    "instagramUrl": "https://instagram.com/example",
    "facebookUrl": "https://facebook.com/example",
    "youtubeUrl": "https://youtube.com/example",
    "tiktokUrl": "https://tiktok.com/@example",
    "threadUrl": "https://threads.net/@example",
    "customSocialMediaUrl": "https://example.com/social"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/social-media",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            linkedinUrl: "https://linkedin.com/company/example",
            twitterUrl: "https://twitter.com/example",
            instagramUrl: "https://instagram.com/example",
            facebookUrl: "https://facebook.com/example",
            youtubeUrl: "https://youtube.com/example",
            tiktokUrl: "https://tiktok.com/@example",
            threadUrl: "https://threads.net/@example",
            customSocialMediaUrl: "https://example.com/social",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Social media updated successfully",
    "socialMedia": {
        "linkedinUrl": "https://linkedin.com/company/example",
        "twitterUrl": "https://twitter.com/example",
        "instagramUrl": "https://instagram.com/example",
        "facebookUrl": "https://facebook.com/example",
        "youtubeUrl": "https://youtube.com/example",
        "tiktokUrl": "https://tiktok.com/@example",
        "threadUrl": "https://threads.net/@example",
        "customSocialMediaUrl": "https://example.com/social"
    },
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/social-media

Body Parameters

Parameter Type Required Description
linkedinUrl string no LinkedIn profile URL
twitterUrl string no Twitter profile URL
instagramUrl string no Instagram profile URL
facebookUrl string no Facebook profile URL
youtubeUrl string no YouTube channel URL
tiktokUrl string no TikTok profile URL
threadUrl string no Threads profile URL
customSocialMediaUrl string no Custom social media URL

Contact Information Mutations

Add Client Email

curl -X POST "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/emails" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "email": "[email protected]"
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/emails", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        email: "[email protected]",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Email added successfully",
    "emails": [
        {
            "id": "email_id",
            "email": "[email protected]",
            "isPrimary": false,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ],
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
email string yes Email address

Update Client Email

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/emails/email_id" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "email": "[email protected]"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/emails/email_id",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            email: "[email protected]",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Email updated successfully",
    "emails": [
        {
            "id": "email_id",
            "email": "[email protected]",
            "isPrimary": false,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ],
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/emails/<EMAIL_ID>

Body Parameters

Parameter Type Required Description
email string yes Updated email address

Delete Client Email

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

The above command returns JSON structured like this:

{
    "message": "Email deleted successfully",
    "emails": [],
    "showToast": true
}

HTTP Request

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

URL Parameters

Parameter Description
EMAIL_ID The ID of the email to delete

Set Email as Primary

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

The above command returns JSON structured like this:

{
    "message": "Email set as primary successfully",
    "emails": [
        {
            "id": "email_id",
            "email": "[email protected]",
            "isPrimary": true,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ],
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/emails/<EMAIL_ID>/primary

Add Client Phone

curl -X POST "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/phones" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "phone": "+1-555-123-4567",
    "country": {
        "code": "US",
        "dial_code": "+1",
        "flag": "🇺🇸"
    }
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/phones", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        phone: "+1-555-123-4567",
        country: {
            code: "US",
            dial_code: "+1",
            flag: "🇺🇸",
        },
    }),
});

The above command returns JSON structured like this:

{
    "message": "Phone added successfully",
    "phones": [
        {
            "id": "phone_id",
            "phone": "+1-555-123-4567",
            "isPrimary": false,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ],
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
phone string yes Phone number
country object no Country information

Update Client Phone

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/phones/phone_id" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "phone": "+1-555-987-6543",
    "country": {
        "code": "US",
        "dial_code": "+1",
        "flag": "🇺🇸"
    }
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/phones/phone_id",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            phone: "+1-555-987-6543",
            country: {
                code: "US",
                dial_code: "+1",
                flag: "🇺🇸",
            },
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Phone updated successfully",
    "phones": [
        {
            "id": "phone_id",
            "phone": "+1-555-987-6543",
            "isPrimary": false,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ],
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/phones/<PHONE_ID>

Body Parameters

Parameter Type Required Description
phone string yes Updated phone number
country object no Country information

Delete Client Phone

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

The above command returns JSON structured like this:

{
    "message": "Phone deleted successfully",
    "phones": [],
    "showToast": true
}

HTTP Request

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

Set Phone as Primary

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

The above command returns JSON structured like this:

{
    "message": "Phone set as primary successfully",
    "phones": [
        {
            "id": "phone_id",
            "phone": "+1-555-123-4567",
            "isPrimary": true,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ],
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/phones/<PHONE_ID>/primary

Update Client Job Title (Individual clients only)

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/job-title" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "jobTitle": "Senior Developer"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/job-title",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            jobTitle: "Senior Developer",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Job title updated successfully",
    "jobTitle": "Senior Developer",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/job-title

Body Parameters

Parameter Type Required Description
jobTitle string yes Job title

Relationship Management Mutations

Update Client Account Owner (Company clients only)

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/account-owner" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "accountOwner": "user_id_here"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/account-owner",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            accountOwner: "user_id_here",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Account owner updated successfully",
    "accountOwner": "user_id_here",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/account-owner

Body Parameters

Parameter Type Required Description
accountOwner string yes User ID of account owner

Update Client Assigned To

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/assigned-to" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "assignedToId": "user_to_business_id_here"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/assigned-to",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            assignedToId: "user_to_business_id_here",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Assigned to updated successfully",
    "assignedTo": {
        "id": "user_to_business_id",
        "userId": "user_id",
        "userToBusinessId": "user_to_business_id",
        "profileImg": "https://example.com/profile.jpg",
        "fullName": "John Doe",
        "email": "[email protected]",
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/assigned-to

Body Parameters

Parameter Type Required Description
assignedToId string yes User to Business ID

Disconnect Client Assigned To

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

The above command returns JSON structured like this:

{
    "message": "Assigned to removed successfully",
    "assignedTo": null,
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

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

Update Client Company (Individual clients only)

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/company" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "company": "Company Name Here"
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/company", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        company: "Company Name Here",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Company updated successfully",
    "company": {
        "id": "company_id",
        "name": "Company Name Here"
    },
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
company string yes Company name

Domain Management (Company clients only)

Add Client Domain

curl -X POST "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/domains" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "domain": "example.com",
    "isPrimary": false
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/domains", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        domain: "example.com",
        isPrimary: false,
    }),
});

The above command returns JSON structured like this:

{
    "message": "Domain added successfully",
    "domains": [
        {
            "id": "domain_id",
            "domain": "example.com",
            "isPrimary": false,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ],
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
domain string yes Domain name
isPrimary boolean no Set as primary domain

Edit Client Domain

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/domains/domain_id" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "domain": "updated-example.com"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/domains/domain_id",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            domain: "updated-example.com",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Domain updated successfully",
    "domains": [
        {
            "id": "domain_id",
            "domain": "updated-example.com",
            "isPrimary": false,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ],
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/domains/<DOMAIN_ID>

Body Parameters

Parameter Type Required Description
domain string yes Updated domain name

Delete Client Domain

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

The above command returns JSON structured like this:

{
    "message": "Domain deleted successfully",
    "domains": [],
    "showToast": true
}

HTTP Request

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

Set Domain as Primary

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/domains/domain_id/set-primary" \
-H "Authorization: your-api-key"
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/domains/domain_id/set-primary",
    {
        method: "PATCH",
        headers: {
            Authorization: "your-api-key",
        },
    }
);

The above command returns JSON structured like this:

{
    "message": "Domain set as primary successfully",
    "domains": [
        {
            "id": "domain_id",
            "domain": "example.com",
            "isPrimary": true,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ],
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/domains/<DOMAIN_ID>/set-primary

People Management (Company clients only)

Add Client People

curl -X POST "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/people" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "people": {
        "name": "John Doe",
        "email": "[email protected]"
    }
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/people", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        people: {
            name: "John Doe",
            email: "[email protected]",
        },
    }),
});

The above command returns JSON structured like this:

{
    "message": "People added successfully",
    "people": {
        "id": "people_id",
        "name": "John Doe",
        "email": "[email protected]"
    },
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
people object yes People object

People Object Parameters

Parameter Type Required Description
name string yes Person name
email string no Email address

Connect Client People

curl -X POST "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/people/connect" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "peopleId": "people_id_here"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/people/connect",
    {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            peopleId: "people_id_here",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "People connected successfully",
    "people": {
        "id": "people_id",
        "name": "John Doe"
    },
    "showToast": true
}

HTTP Request

POST https://api.onesuite.io/v1/clients/<CLIENT_ID>/people/connect

Body Parameters

Parameter Type Required Description
peopleId string yes People ID to connect

Disconnect Client People

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

The above command returns JSON structured like this:

{
    "message": "People disconnected successfully",
    "showToast": true
}

HTTP Request

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

Client Status Management

Get All Client Statuses

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client statuses fetched successfully",
    "statuses": [
        {
            "id": "status_id",
            "name": "Active",
            "slug": "actively_working",
            "bgColor": "#E0E7FF",
            "fgColor": "#3730A3",
            "borderColor": "#A5B4FC"
        }
    ]
}

HTTP Request

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

Create Client Status

curl -X POST "https://api.onesuite.io/v1/statuses" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "Active",
    "bgColor": "#E0E7FF",
    "fgColor": "#3730A3",
    "borderColor": "#A5B4FC"
}'
fetch("https://api.onesuite.io/v1/statuses", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "Active",
        bgColor: "#E0E7FF",
        fgColor: "#3730A3",
        borderColor: "#A5B4FC",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client status created successfully",
    "statusData": {
        "id": "status_id",
        "name": "Active",
        "slug": "active",
        "bgColor": "#E0E7FF",
        "fgColor": "#3730A3",
        "borderColor": "#A5B4FC"
    },
    "statuses": [
        {
            "id": "status_id",
            "name": "Active",
            "slug": "active",
            "bgColor": "#E0E7FF",
            "fgColor": "#3730A3",
            "borderColor": "#A5B4FC"
        }
    ]
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
name string yes Status name
bgColor string no Background color (auto-generated if not provided)
fgColor string no Foreground color (auto-generated if not provided)
borderColor string no Border color (auto-generated if not provided)

Update Client Status

curl -X PATCH "https://api.onesuite.io/v1/statuses/status_id" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "Updated Status",
    "bgColor": "#E0E7FF",
    "fgColor": "#3730A3",
    "borderColor": "#A5B4FC"
}'
fetch("https://api.onesuite.io/v1/statuses/status_id", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "Updated Status",
        bgColor: "#E0E7FF",
        fgColor: "#3730A3",
        borderColor: "#A5B4FC",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client status updated successfully",
    "statusData": {
        "id": "status_id",
        "name": "Updated Status",
        "slug": "updated_status",
        "bgColor": "#E0E7FF",
        "fgColor": "#3730A3",
        "borderColor": "#A5B4FC"
    },
    "statuses": [
        {
            "id": "status_id",
            "name": "Updated Status",
            "slug": "updated_status",
            "bgColor": "#E0E7FF",
            "fgColor": "#3730A3",
            "borderColor": "#A5B4FC"
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/statuses/<STATUS_ID>

Body Parameters

Parameter Type Required Description
name string no Updated status name
bgColor string no Background color
fgColor string no Foreground color
borderColor string no Border color

Delete Client Status

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client status deleted successfully",
    "statuses": []
}

HTTP Request

DELETE https://api.onesuite.io/v1/statuses/<STATUS_ID>

Set Default Client Status

curl -X PATCH "https://api.onesuite.io/v1/statuses/status_id/set-default" \
-H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/statuses/status_id/set-default", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Default status set successfully",
    "statusData": {
        "id": "status_id",
        "name": "Active"
    },
    "statuses": [
        {
            "id": "status_id",
            "name": "Active"
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/statuses/<STATUS_ID>/set-default

Update Client's Status Assignment

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/status" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "statusId": "status_id_here"
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/status", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        statusId: "status_id_here",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client status updated successfully",
    "client": {
        "id": "client_id",
        "statusId": "status_id",
        "status": {
            "id": "status_id",
            "name": "Active"
        }
    }
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
statusId string yes Status ID

Client Priority Management

Get All Client Priorities

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client priorities fetched successfully",
    "priorities": [
        {
            "id": "priority_id",
            "name": "High",
            "slug": "high",
            "bgColor": "#FED7AA",
            "fgColor": "#9A3412",
            "borderColor": "#FDBA74"
        }
    ]
}

HTTP Request

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

Create Client Priority

curl -X POST "https://api.onesuite.io/v1/priorities" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "High",
    "bgColor": "#FED7AA",
    "fgColor": "#9A3412",
    "borderColor": "#FDBA74"
}'
fetch("https://api.onesuite.io/v1/priorities", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "High",
        bgColor: "#FED7AA",
        fgColor: "#9A3412",
        borderColor: "#FDBA74",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client priority created successfully",
    "priorityData": {
        "id": "priority_id",
        "name": "High",
        "slug": "high",
        "bgColor": "#FED7AA",
        "fgColor": "#9A3412",
        "borderColor": "#FDBA74"
    },
    "priorities": [
        {
            "id": "priority_id",
            "name": "High",
            "slug": "high",
            "bgColor": "#FED7AA",
            "fgColor": "#9A3412",
            "borderColor": "#FDBA74"
        }
    ]
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
name string yes Priority name
bgColor string no Background color (auto-generated if not provided)
fgColor string no Foreground color (auto-generated if not provided)
borderColor string no Border color (auto-generated if not provided)

Update Client Priority

curl -X PATCH "https://api.onesuite.io/v1/priorities/priority_id" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "Updated Priority",
    "bgColor": "#FED7AA",
    "fgColor": "#9A3412",
    "borderColor": "#FDBA74"
}'
fetch("https://api.onesuite.io/v1/priorities/priority_id", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        name: "Updated Priority",
        bgColor: "#FED7AA",
        fgColor: "#9A3412",
        borderColor: "#FDBA74",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client priority updated successfully",
    "priorityData": {
        "id": "priority_id",
        "name": "Updated Priority",
        "slug": "updated_priority",
        "bgColor": "#FED7AA",
        "fgColor": "#9A3412",
        "borderColor": "#FDBA74"
    },
    "priorities": [
        {
            "id": "priority_id",
            "name": "Updated Priority",
            "slug": "updated_priority",
            "bgColor": "#FED7AA",
            "fgColor": "#9A3412",
            "borderColor": "#FDBA74"
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/priorities/<PRIORITY_ID>

Body Parameters

Parameter Type Required Description
name string no Updated priority name
bgColor string no Background color
fgColor string no Foreground color
borderColor string no Border color

Delete Client Priority

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client priority deleted successfully",
    "priorities": []
}

HTTP Request

DELETE https://api.onesuite.io/v1/priorities/<PRIORITY_ID>

Set Default Client Priority

curl -X PATCH "https://api.onesuite.io/v1/priorities/priority_id/set-default" \
-H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/priorities/priority_id/set-default", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Default priority set successfully",
    "priorityData": {
        "id": "priority_id",
        "name": "High"
    },
    "priorities": [
        {
            "id": "priority_id",
            "name": "High"
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/priorities/<PRIORITY_ID>/set-default

Update Client's Priority Assignment

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/priority" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "priorityId": "priority_id_here"
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/priority", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        priorityId: "priority_id_here",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Client priority updated successfully",
    "client": {
        "id": "client_id",
        "priorityId": "priority_id",
        "priority": {
            "id": "priority_id",
            "name": "High"
        }
    }
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
priorityId string yes Priority ID

Task Management

Get Client Tasks

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

The above command returns JSON structured like this:

{
    "message": "success",
    "tasks": [
        {
            "id": "task_id",
            "title": "Follow up with client",
            "description": "",
            "status": "to_do",
            "dueDate": null,
            "createdBy": {
                "id": "user_to_business_id",
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "John Doe",
                    "email": "[email protected]"
                }
            },
            "assignedTo": [],
            "files": []
        }
    ]
}

HTTP Request

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

Create Client Task

curl -X POST "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "title": "Follow up with client"
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        title: "Follow up with client",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Task created successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "",
        "status": "no_status",
        "dueDate": null,
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    },
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
title string yes Task title

Update Task Description

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/description" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "description": "Updated task description"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/description",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            description: "Updated task description",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Task updated successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "Updated task description",
        "status": "to_do",
        "dueDate": null,
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/task/<TASK_ID>/description

Body Parameters

Parameter Type Required Description
description string no Task description

Update Task Title

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/title" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "title": "Updated task title"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/title",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            title: "Updated task title",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Task title updated successfully",
    "task": {
        "id": "task_id",
        "title": "Updated task title",
        "description": "",
        "status": "to_do",
        "dueDate": null,
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/task/<TASK_ID>/title

Body Parameters

Parameter Type Required Description
title string yes Task title

Update Task Status

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/status" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "status": "in_progress"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/status",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            status: "in_progress",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Task status updated successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "",
        "status": "in_progress",
        "dueDate": null,
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/task/<TASK_ID>/status

Body Parameters

Parameter Type Required Description
status string yes Task status. Valid values: "no_status", "to_do", "in_progress", "done"

Update Task Due Date

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/due-date" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "dueDate": "2024-12-31T23:59:59.000Z"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/due-date",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            dueDate: "2024-12-31T23:59:59.000Z",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Task due date updated successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "",
        "status": "to_do",
        "dueDate": "2024-12-31T23:59:59.000Z",
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/task/<TASK_ID>/due-date

Body Parameters

Parameter Type Required Description
dueDate string no Due date in ISO 8601 format

Assign Task to User

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/assign" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "userToBusinessId": "user_to_business_id_here"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/assign",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            userToBusinessId: "user_to_business_id_here",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Task assigned successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "",
        "status": "to_do",
        "dueDate": null,
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [
            {
                "id": "user_to_business_id_here",
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "Jane Doe",
                    "email": "[email protected]"
                }
            }
        ],
        "files": []
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/task/<TASK_ID>/assign

Body Parameters

Parameter Type Required Description
userToBusinessId string yes User to Business ID

Remove Task Assignee

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

The above command returns JSON structured like this:

{
    "message": "Task assignee removed successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "",
        "status": "to_do",
        "dueDate": null,
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    },
    "showToast": true
}

HTTP Request

DELETE https://api.onesuite.io/v1/clients/<CLIENT_ID>/task/<TASK_ID>/assign/<USER_TO_BUSINESS_ID>

Delete Task

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

The above command returns JSON structured like this:

{
    "message": "Task deleted successfully",
    "showToast": true
}

HTTP Request

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

Delete Task File

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

The above command returns JSON structured like this:

{
    "message": "File deleted successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "",
        "status": "to_do",
        "dueDate": null,
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    }
}

HTTP Request

DELETE https://api.onesuite.io/v1/clients/<CLIENT_ID>/task/<TASK_ID>/file/<FILE_ID>

Rename Task File

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/file/file_id/rename" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "renamed_file.pdf"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/file/file_id/rename",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            name: "renamed_file.pdf",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "File renamed successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "",
        "status": "to_do",
        "dueDate": null,
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [
            {
                "id": "file_id",
                "fileName": "renamed_file.pdf",
                "url": "https://example.com/file.pdf",
                "fileType": "pdf",
                "fileSize": 1024000
            }
        ]
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/task/<TASK_ID>/file/<FILE_ID>/rename

Body Parameters

Parameter Type Required Description
name string yes New file name

Download Task File

curl -X GET "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/file/file_id/download" \
-H "Authorization: your-api-key" \
--output file.pdf
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/task/task_id/file/file_id/download",
    {
        method: "GET",
        headers: {
            Authorization: "your-api-key",
        },
    }
)
    .then((response) => response.blob())
    .then((blob) => {
        const url = window.URL.createObjectURL(blob);
        const a = document.createElement("a");
        a.href = url;
        a.download = "file.pdf";
        a.click();
    });

HTTP Request

GET https://api.onesuite.io/v1/clients/<CLIENT_ID>/task/<TASK_ID>/file/<FILE_ID>/download

Returns the file as a binary stream with appropriate content-type headers.

Note Management

Get Client Notes

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

The above command returns JSON structured like this:

{
    "message": "success",
    "notes": [
        {
            "id": "note_id",
            "title": "Client meeting notes",
            "description": "",
            "createdBy": {
                "id": "user_to_business_id",
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "John Doe",
                    "email": "[email protected]"
                }
            },
            "files": []
        }
    ]
}

HTTP Request

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

Create Client Note

curl -X POST "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/note" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "title": "Client meeting notes"
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/note", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        title: "Client meeting notes",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Note created successfully",
    "note": {
        "id": "note_id",
        "title": "Client meeting notes",
        "description": "",
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "files": []
    },
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
title string yes Note title

Update Note Title

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/note/note_id/title" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "title": "Updated note title"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/note/note_id/title",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            title: "Updated note title",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Note updated successfully",
    "note": {
        "id": "note_id",
        "title": "Updated note title",
        "description": "",
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "files": []
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/note/<NOTE_ID>/title

Body Parameters

Parameter Type Required Description
title string yes Note title

Update Note Description

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/note/note_id/description" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "description": "Updated note description"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/note/note_id/description",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            description: "Updated note description",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Note updated successfully",
    "note": {
        "id": "note_id",
        "title": "Client meeting notes",
        "description": "Updated note description",
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "files": []
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/note/<NOTE_ID>/description

Body Parameters

Parameter Type Required Description
description string no Note description

Delete Note

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

The above command returns JSON structured like this:

{
    "message": "Note deleted successfully",
    "showToast": true
}

HTTP Request

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

Delete Note File

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

The above command returns JSON structured like this:

{
    "message": "File deleted successfully",
    "note": {
        "id": "note_id",
        "title": "Client meeting notes",
        "description": "",
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "files": []
    }
}

HTTP Request

DELETE https://api.onesuite.io/v1/clients/<CLIENT_ID>/note/<NOTE_ID>/file/<FILE_ID>

Rename Note File

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/note/note_id/file/file_id/rename" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "renamed_file.pdf"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/note/note_id/file/file_id/rename",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            name: "renamed_file.pdf",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "File renamed successfully",
    "note": {
        "id": "note_id",
        "title": "Client meeting notes",
        "description": "",
        "createdBy": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "files": [
            {
                "id": "file_id",
                "fileName": "renamed_file.pdf",
                "url": "https://example.com/file.pdf",
                "fileType": "pdf",
                "fileSize": 1024000
            }
        ]
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/note/<NOTE_ID>/file/<FILE_ID>/rename

Body Parameters

Parameter Type Required Description
name string yes New file name

Download Note File

curl -X GET "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/note/note_id/file/file_id/download" \
-H "Authorization: your-api-key" \
--output file.pdf
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/note/note_id/file/file_id/download",
    {
        method: "GET",
        headers: {
            Authorization: "your-api-key",
        },
    }
)
    .then((response) => response.blob())
    .then((blob) => {
        const url = window.URL.createObjectURL(blob);
        const a = document.createElement("a");
        a.href = url;
        a.download = "file.pdf";
        a.click();
    });

HTTP Request

GET https://api.onesuite.io/v1/clients/<CLIENT_ID>/note/<NOTE_ID>/file/<FILE_ID>/download

Returns the file as a binary stream with appropriate content-type headers.

File Management

Get Client Files

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

The above command returns JSON structured like this:

{
    "message": "success",
    "files": [
        {
            "id": "file_id",
            "fileName": "document.pdf",
            "url": "https://example.com/document.pdf",
            "fileType": "pdf",
            "fileSize": 1024000,
            "createdBy": {
                "id": "user_to_business_id",
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "John Doe",
                    "email": "[email protected]"
                }
            },
            "crmNote": null,
            "crmTask": null,
            "company": null,
            "people": null
        }
    ]
}

HTTP Request

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

Delete Client File

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

The above command returns JSON structured like this:

{
    "message": "File deleted successfully",
    "showToast": true
}

HTTP Request

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

Rename Client File

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/file/file_id/rename" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "name": "renamed_file.pdf"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/file/file_id/rename",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            name: "renamed_file.pdf",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "File renamed successfully",
    "file": {
        "id": "file_id",
        "fileName": "renamed_file.pdf",
        "url": "https://example.com/file.pdf",
        "fileType": "pdf",
        "fileSize": 1024000
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/file/<FILE_ID>/rename

Body Parameters

Parameter Type Required Description
name string yes New file name

Download Client File

curl -X GET "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/file/file_id/download" \
-H "Authorization: your-api-key" \
--output file.pdf
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/file/file_id/download",
    {
        method: "GET",
        headers: {
            Authorization: "your-api-key",
        },
    }
)
    .then((response) => response.blob())
    .then((blob) => {
        const url = window.URL.createObjectURL(blob);
        const a = document.createElement("a");
        a.href = url;
        a.download = "file.pdf";
        a.click();
    });

HTTP Request

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

Returns the file as a binary stream with appropriate content-type headers.

Activity Logs

Get Client Activity Logs

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

The above command returns JSON structured like this:

{
    "message": "success",
    "activityLogs": {
        "December 2024": [
            {
                "id": "log_id",
                "actionType": "updated",
                "actionItem": "Name",
                "actionData": "Updated Company Name",
                "createdAt": "2024-12-11T05:15:07.691Z"
            }
        ],
        "November 2024": [
            {
                "id": "log_id",
                "actionType": "created",
                "actionItem": "Client",
                "actionData": "Doe Enterprises",
                "createdAt": "2024-11-01T10:00:00.000Z"
            }
        ]
    }
}

HTTP Request

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

Get Client Projects

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

The above command returns JSON structured like this:

{
    "message": "Projects fetched successfully",
    "projects": [
        {
            "id": "project_id",
            "name": "Website Redesign",
            "progress": 75,
            "completedTasks": 15,
            "totalTasks": 20,
            "completedSubTasks": 5,
            "totalSubTasks": 8,
            "sections": []
        }
    ]
}

HTTP Request

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

Create Client Project

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Project created successfully",
    "project": {
        "id": "project_id",
        "name": "Website Redesign",
        "privacy": "public",
        "isOverviewEnable": true,
        "isListEnable": true,
        "isBoardEnable": true,
        "isFilesEnable": true,
        "bgColor": "#DBEAFE",
        "fgColor": "#1E40AF"
    }
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
name string yes Project name

Get Client Invoices

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

The above command returns JSON structured like this:

{
    "message": "Invoices fetched successfully",
    "invoices": [
        {
            "id": "invoice_id",
            "serialNumber": 1,
            "invoiceNumber": "INV-001",
            "status": "paid",
            "totalAmount": 5000.0,
            "invoiceItems": [],
            "salesTaxes": [],
            "project": {
                "id": "project_id",
                "name": "Website Redesign"
            }
        }
    ]
}

HTTP Request

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

Get Client Documents

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

The above command returns JSON structured like this:

{
    "message": "Documents fetched successfully",
    "documents": [
        {
            "id": "document_id",
            "serialNumber": 1,
            "title": "Contract Agreement",
            "documentType": {
                "id": "type_id",
                "name": "Contract"
            },
            "createdBy": {
                "id": "user_to_business_id",
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "John Doe",
                    "email": "[email protected]"
                }
            },
            "project": {
                "id": "project_id",
                "name": "Website Redesign"
            },
            "documentRecipients": [],
            "signatures": []
        }
    ]
}

HTTP Request

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

Additional Mutations

Update Client Custom Fields

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/custom-fields" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "customFields": [
        {
            "fieldId": "field_id",
            "value": "Custom value"
        }
    ]
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/custom-fields",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            customFields: [
                {
                    fieldId: "field_id",
                    value: "Custom value",
                },
            ],
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Custom fields updated successfully",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/custom-fields

Body Parameters

Parameter Type Required Description
customFields array yes Array of custom field objects

Custom Field Object Parameters

Parameter Type Required Description
fieldId string yes Custom field ID
value string yes Field value

Update Client ICP (Company clients only)

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/icp" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "icp": true
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/icp", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        icp: true,
    }),
});

The above command returns JSON structured like this:

{
    "message": "ICP updated successfully",
    "icp": true,
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
icp boolean yes Ideal Customer Profile status

Update Client Opportunities (Company clients only)

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/opportunities" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "opportunities": ["Opportunity 1", "Opportunity 2"]
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/opportunities",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            opportunities: ["Opportunity 1", "Opportunity 2"],
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Opportunities updated successfully",
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
opportunities string[] yes Array of opportunity names

Update Client People (Company clients only)

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/people" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "people": ["John Doe", "Jane Doe"]
}'
fetch("https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/people", {
    method: "PATCH",
    headers: {
        "Content-Type": "application/json",
        Authorization: "your-api-key",
    },
    body: JSON.stringify({
        people: ["John Doe", "Jane Doe"],
    }),
});

The above command returns JSON structured like this:

{
    "message": "People updated successfully",
    "showToast": true
}

HTTP Request

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

Body Parameters

Parameter Type Required Description
people string[] yes Array of people names

Update Client Point of Contact (Company clients only)

curl -X PATCH "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/point-of-contact" \
-H "Content-Type: application/json" \
-H "Authorization: your-api-key" \
-d '{
    "pointOfContactId": "people_id_here"
}'
fetch(
    "https://api.onesuite.io/v1/clients/clylgomqt0001casgvlnnowld/point-of-contact",
    {
        method: "PATCH",
        headers: {
            "Content-Type": "application/json",
            Authorization: "your-api-key",
        },
        body: JSON.stringify({
            pointOfContactId: "people_id_here",
        }),
    }
);

The above command returns JSON structured like this:

{
    "message": "Point of contact updated successfully",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/clients/<CLIENT_ID>/point-of-contact

Body Parameters

Parameter Type Required Description
pointOfContactId string yes People ID for point of contact

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

Errors

The OneSuite API uses standard HTTP status codes and returns detailed error messages to help you understand what went wrong.

Error Response Format

All error responses follow this structure:

{
    "status": "error",
    "message": "Human-readable error message",
    "code": "ERROR_CODE",
    "details": {}
}

HTTP Status Codes

Status Code Meaning Description
400 Bad Request Invalid request parameters or malformed data
401 Unauthorized Missing or invalid API key
403 Forbidden Insufficient permissions for this resource
404 Not Found The requested resource could not be found
405 Method Not Allowed HTTP method not allowed for this endpoint
409 Conflict Resource conflict (e.g., duplicate entry)
422 Unprocessable Entity Validation error - request is well-formed but contains semantic errors
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server error - please try again later
503 Service Unavailable Service temporarily unavailable for maintenance

Error Examples

400 Bad Request

{
    "status": "error",
    "message": "Invalid request parameters",
    "code": "VALIDATION_ERROR",
    "details": {
        "field": "email",
        "reason": "Invalid email format"
    }
}

401 Unauthorized

{
    "status": "error",
    "message": "Invalid or missing API key",
    "code": "UNAUTHORIZED"
}

403 Forbidden

{
    "status": "error",
    "message": "You do not have permission to access this resource",
    "code": "FORBIDDEN"
}

404 Not Found

{
    "status": "error",
    "message": "Client not found",
    "code": "NOT_FOUND"
}

422 Unprocessable Entity

{
    "status": "error",
    "message": "Validation failed",
    "code": "VALIDATION_ERROR",
    "details": {
        "errors": [
            {
                "field": "name",
                "message": "Name is required"
            },
            {
                "field": "email",
                "message": "Invalid email format"
            }
        ]
    }
}

429 Too Many Requests

{
    "status": "error",
    "message": "Rate limit exceeded. Please try again later.",
    "code": "RATE_LIMIT_EXCEEDED",
    "details": {
        "retryAfter": 60
    }
}

Error Handling Best Practices

  1. Always check the status code in the HTTP response
  2. Read the error message - it provides context about what went wrong
  3. Check the error code - use it for programmatic error handling
  4. Review the details object - it may contain specific field-level errors
  5. Handle rate limits - respect the retryAfter value if provided
  6. Log errors - include the full error response in your logs for debugging

Rate Limiting

OneSuite API implements rate limiting to ensure fair usage. When you exceed the rate limit, you'll receive a 429 Too Many Requests response.

Rate limit information is included in response headers:

Rate Limit Example Response Headers

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1702281600