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

CRM Companies

Company CRUD Operations

Create Company

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

The above command returns JSON structured like this:

{
    "message": "Company created successfully",
    "company": {
        "id": "company_id",
        "name": "Acme Corporation",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513",
        "createdBy": {
            "user": {
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User"
            }
        },
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

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

Request Body Parameters

Parameter Type Required Description
name string Yes Company name
opportunityId string No Optional opportunity ID to connect

Get All Companies

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

The above command returns JSON structured like this:

{
    "message": "Companies list fetched successfully",
    "companiesList": [
        {
            "id": "company_id",
            "name": "Acme Corporation",
            "logo": "https://example.com/logo.jpg",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "emails": [
                {
                    "id": "email_id",
                    "email": "[email protected]",
                    "isPrimary": true
                }
            ],
            "phones": [
                {
                    "id": "phone_id",
                    "phone": "1234567890",
                    "dialCode": "+1",
                    "isPrimary": true
                }
            ],
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

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

Get Company List (Simple Data)

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

The above command returns JSON structured like this:

{
    "message": "Companies list fetched successfully",
    "companiesList": [
        {
            "id": "company_id",
            "name": "Acme Corporation",
            "logo": "https://example.com/logo.jpg",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "email": "[email protected]",
            "isClient": false
        }
    ]
}

HTTP Request

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

Get Company ID List

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

The above command returns JSON structured like this:

{
    "message": "Company IDs fetched successfully",
    "companyIds": ["company_id_1", "company_id_2"]
}

HTTP Request

GET https://api.onesuite.io/v1/companies/id-list

Get Single Company

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

The above command returns JSON structured like this:

{
    "message": "success",
    "company": {
        "id": "company_id",
        "name": "Acme Corporation",
        "logo": "https://example.com/logo.jpg",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513",
        "address1": "123 Main St",
        "address2": "Suite 100",
        "city": "New York",
        "state": "NY",
        "zip": "10001",
        "country": "United States",
        "annualRecurringRevenue": 1000000,
        "employees": 50,
        "icp": true,
        "linkedinUrl": "https://linkedin.com/company/acme",
        "twitterUrl": "https://twitter.com/acme",
        "emails": [
            {
                "id": "email_id",
                "email": "[email protected]",
                "isPrimary": true
            }
        ],
        "phones": [
            {
                "id": "phone_id",
                "phone": "1234567890",
                "dialCode": "+1",
                "country": "United States",
                "isPrimary": true
            }
        ],
        "domains": [
            {
                "id": "domain_id",
                "domain": "acme.com",
                "isPrimary": true
            }
        ],
        "industry": {
            "id": "industry_id",
            "name": "Technology",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513"
        },
        "source": {
            "id": "source_id",
            "name": "Website",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513"
        },
        "accountOwner": {
            "id": "user_to_business_id",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "pointOfContact": {
            "id": "people_id",
            "name": "Jane Smith",
            "avatar": "https://example.com/avatar.jpg",
            "emails": [
                {
                    "id": "email_id",
                    "email": "[email protected]",
                    "isPrimary": true
                }
            ],
            "phones": [
                {
                    "id": "phone_id",
                    "phone": "1234567890",
                    "dialCode": "+1",
                    "isPrimary": true
                }
            ]
        },
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

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

Delete Multiple Companies

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

The above command returns JSON structured like this:

{
    "message": "Companies deleted successfully"
}

HTTP Request

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

Request Body Parameters

Parameter Type Required Description
companyIds array[string] Yes Array of company IDs to delete

Delete Single Company

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

The above command returns JSON structured like this:

{
    "message": "Company deleted successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id

Company Basic Information Mutations

Update Company Name

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

The above command returns JSON structured like this:

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

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/name

Request Body Parameters

Parameter Type Required Description
name string Yes New company name

Update Company Address

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

The above command returns JSON structured like this:

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

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/address

Request 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

Update Company ARR

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

The above command returns JSON structured like this:

{
    "message": "ARR updated successfully",
    "annualRecurringRevenue": 1000000,
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/arr

Request Body Parameters

Parameter Type Required Description
annualRecurringRevenue number Yes Annual recurring revenue amount

Update Company Employees

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

The above command returns JSON structured like this:

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

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/employees

Request Body Parameters

Parameter Type Required Description
employees number Yes Number of employees

Update Company ICP

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

The above command returns JSON structured like this:

{
    "message": "ICP updated successfully",
    "icp": true,
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/icp

Request Body Parameters

Parameter Type Required Description
icp boolean Yes Ideal Customer Profile status

Update Company Social Media

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

The above command returns JSON structured like this:

{
    "message": "Social media updated successfully",
    "linkedinUrl": "https://linkedin.com/company/acme",
    "twitterUrl": "https://twitter.com/acme",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/social-media

Request Body Parameters

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

Update Company LinkedIn

curl -X PATCH "https://api.onesuite.io/v1/companies/:company_id/linkedin" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "linkedinUrl": "https://linkedin.com/company/acme"
  }'
fetch("https://api.onesuite.io/v1/companies/:company_id/linkedin", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        linkedinUrl: "https://linkedin.com/company/acme",
    }),
});

The above command returns JSON structured like this:

{
    "message": "LinkedIn URL updated successfully",
    "linkedinUrl": "https://linkedin.com/company/acme",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/linkedin

Request Body Parameters

Parameter Type Required Description
linkedinUrl string Yes LinkedIn URL

Update Company Twitter

curl -X PATCH "https://api.onesuite.io/v1/companies/:company_id/twitter" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "twitterUrl": "https://twitter.com/acme"
  }'
fetch("https://api.onesuite.io/v1/companies/:company_id/twitter", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        twitterUrl: "https://twitter.com/acme",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Twitter URL updated successfully",
    "twitterUrl": "https://twitter.com/acme",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/twitter

Request Body Parameters

Parameter Type Required Description
twitterUrl string Yes Twitter URL

Company Domain Management

Add Company Domain

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

The above command returns JSON structured like this:

{
    "message": "Domain added successfully",
    "domains": [
        {
            "id": "domain_id",
            "domain": "acme.com",
            "isPrimary": true
        }
    ]
}

HTTP Request

POST https://api.onesuite.io/v1/companies/:company_id/domain

Request Body Parameters

Parameter Type Required Description
domain string Yes Domain name

Edit Company Domain

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

The above command returns JSON structured like this:

{
    "message": "Domain updated successfully",
    "domains": [
        {
            "id": "domain_id",
            "domain": "newacme.com",
            "isPrimary": true
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/domain/:domain_id

Request Body Parameters

Parameter Type Required Description
domain string Yes Updated domain name

Delete Company Domain

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

The above command returns JSON structured like this:

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

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id/domain/:domain_id

Set Company Domain as Primary

curl -X PATCH "https://api.onesuite.io/v1/companies/:company_id/domain/:domain_id/domain-status" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/companies/:company_id/domain/:domain_id/domain-status", {
    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": "acme.com",
            "isPrimary": true
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/domain/:domain_id/domain-status

Company Business Information Mutations

Update Company Industry

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

The above command returns JSON structured like this:

{
    "message": "Industry updated successfully",
    "industry": {
        "id": "industry_id",
        "name": "Technology",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513"
    },
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/industry

Request Body Parameters

Parameter Type Required Description
industry object Yes Industry object with id

Update Company Source

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

The above command returns JSON structured like this:

{
    "message": "Source updated successfully",
    "source": {
        "id": "source_id",
        "name": "Website",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513"
    },
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/source

Request Body Parameters

Parameter Type Required Description
source object Yes Source object with id

Company Relationship Management

Update Company Account Owner

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

The above command returns JSON structured like this:

{
    "message": "Updated successfully",
    "accountOwner": {
        "id": "user_to_business_id",
        "userId": "user_id",
        "profileImg": "https://example.com/profile.jpg",
        "fullName": "John Doe",
        "email": "[email protected]",
        "bgColor": "#DBEAFE",
        "fgColor": "#2563EB",
        "userToBusinessId": "user_to_business_id",
        "name": "John Doe",
        "avatar": "https://example.com/profile.jpg"
    },
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/account-owner/connect

Request Body Parameters

Parameter Type Required Description
userToBusinessId string Yes User to business ID

Disconnect Company Account Owner

curl -X PATCH "https://api.onesuite.io/v1/companies/:company_id/account-owner/disconnect" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/companies/:company_id/account-owner/disconnect", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "message": "Updated successfully",
    "accountOwner": null,
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/account-owner/disconnect

Connect Company Opportunity

curl -X POST "https://api.onesuite.io/v1/companies/:company_id/opportunity" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "opportunityId": "opportunity_id"
  }'
fetch("https://api.onesuite.io/v1/companies/:company_id/opportunity", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        opportunityId: "opportunity_id",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Opportunity connected successfully",
    "opportunity": {
        "id": "opportunity_id",
        "name": "Q1 Deal",
        "amount": 50000,
        "currency": "USD"
    },
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

POST https://api.onesuite.io/v1/companies/:company_id/opportunity

Request Body Parameters

Parameter Type Required Description
opportunityId string Yes Opportunity ID to connect

Disconnect Company Opportunity

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

The above command returns JSON structured like this:

{
    "message": "Opportunity disconnected successfully",
    "opportunity": null,
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id/opportunity/:opportunity_id

Connect Company People

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

The above command returns JSON structured like this:

{
    "message": "People connected successfully",
    "people": {
        "id": "people_id",
        "name": "Jane Smith",
        "avatar": "https://example.com/avatar.jpg"
    },
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

POST https://api.onesuite.io/v1/companies/:company_id/people

Request Body Parameters

Parameter Type Required Description
peopleId string Yes People ID to connect

Get Company People

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

The above command returns JSON structured like this:

{
    "message": "Company people retrieved successfully",
    "people": [
        {
            "id": "people_id",
            "name": "Jane Smith",
            "avatar": "https://example.com/avatar.jpg",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "emails": [
                {
                    "email": "[email protected]",
                    "isPrimary": true
                }
            ],
            "phones": [
                {
                    "phone": "1234567890",
                    "isPrimary": true
                }
            ],
            "invitationStatus": "not-invited",
            "isPointOfContact": false,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ],
    "totalCount": 1
}

HTTP Request

GET https://api.onesuite.io/v1/companies/:company_id/people

Disconnect Company People

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

The above command returns JSON structured like this:

{
    "message": "People disconnected successfully",
    "people": null,
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id/people/:people_id

Company Point of Contact

Get Company Point of Contact

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

The above command returns JSON structured like this:

{
    "success": true,
    "pointOfContact": {
        "id": "people_id",
        "name": "Jane Smith",
        "avatar": "https://example.com/avatar.jpg",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513",
        "emails": [
            {
                "id": "email_id",
                "email": "[email protected]",
                "isPrimary": true
            }
        ],
        "phones": [
            {
                "id": "phone_id",
                "phone": "1234567890",
                "dialCode": "+1",
                "country": "United States",
                "isPrimary": true
            }
        ],
        "invitationStatus": "not-invited",
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

GET https://api.onesuite.io/v1/companies/:company_id/point-of-contact

Connect Company Point of Contact

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

The above command returns JSON structured like this:

{
    "success": true,
    "pointOfContact": {
        "id": "people_id",
        "name": "Jane Smith",
        "avatar": "https://example.com/avatar.jpg",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513",
        "emails": [
            {
                "id": "email_id",
                "email": "[email protected]",
                "isPrimary": true
            }
        ],
        "phones": [
            {
                "id": "phone_id",
                "phone": "1234567890",
                "dialCode": "+1",
                "country": "United States",
                "isPrimary": true
            }
        ],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

POST https://api.onesuite.io/v1/companies/:company_id/point-of-contact/connect

Request Body Parameters

Parameter Type Required Description
pointOfContactId string Yes People ID to set as point of contact

Disconnect Company Point of Contact

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

The above command returns JSON structured like this:

{
    "success": true,
    "pointOfContact": null
}

HTTP Request

POST https://api.onesuite.io/v1/companies/:company_id/point-of-contact/disconnect

Request Body Parameters

Parameter Type Required Description
pointOfContactId string Yes People ID to disconnect

Company Email Management

Add Company Email

curl -X POST "https://api.onesuite.io/v1/companies/:company_id/email" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]"
  }'
fetch("https://api.onesuite.io/v1/companies/:company_id/email", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    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": true
        }
    ]
}

HTTP Request

POST https://api.onesuite.io/v1/companies/:company_id/email

Request Body Parameters

Parameter Type Required Description
email string Yes Email address

Update Company Email

curl -X PATCH "https://api.onesuite.io/v1/companies/:company_id/email/:email_id" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]"
  }'
fetch("https://api.onesuite.io/v1/companies/:company_id/email/:email_id", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    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": true
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/email/:email_id

Request Body Parameters

Parameter Type Required Description
email string Yes Updated email address

Delete Company Email

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

The above command returns JSON structured like this:

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

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id/email/:email_id

Set Company Email as Primary

curl -X PATCH "https://api.onesuite.io/v1/companies/:company_id/email/:email_id/primary" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/companies/:company_id/email/: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
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/email/:email_id/primary

Company Phone Management

Add Company Phone

curl -X POST "https://api.onesuite.io/v1/companies/:company_id/phone" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "1234567890",
    "country": {
      "name": "United States",
      "dial_code": "+1"
    }
  }'
fetch("https://api.onesuite.io/v1/companies/:company_id/phone", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        phone: "1234567890",
        country: {
            name: "United States",
            dial_code: "+1",
        },
    }),
});

The above command returns JSON structured like this:

{
    "message": "Phone added successfully",
    "phones": [
        {
            "id": "phone_id",
            "phone": "1234567890",
            "dialCode": "+1",
            "country": "United States",
            "isPrimary": true
        }
    ]
}

HTTP Request

POST https://api.onesuite.io/v1/companies/:company_id/phone

Request Body Parameters

Parameter Type Required Description
phone string Yes Phone number
country object No Country object with name and dial_code

Update Company Phone

curl -X PATCH "https://api.onesuite.io/v1/companies/:company_id/phone/:phone_id" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "9876543210",
    "country": {
      "name": "United States",
      "dial_code": "+1"
    }
  }'
fetch("https://api.onesuite.io/v1/companies/:company_id/phone/:phone_id", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        phone: "9876543210",
        country: {
            name: "United States",
            dial_code: "+1",
        },
    }),
});

The above command returns JSON structured like this:

{
    "message": "Phone updated successfully",
    "phones": [
        {
            "id": "phone_id",
            "phone": "9876543210",
            "dialCode": "+1",
            "country": "United States",
            "isPrimary": true
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/phone/:phone_id

Request Body Parameters

Parameter Type Required Description
phone string Yes Updated phone number
country object No Country object with name and dial_code

Delete Company Phone

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

The above command returns JSON structured like this:

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

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id/phone/:phone_id

Set Company Phone as Primary

curl -X PATCH "https://api.onesuite.io/v1/companies/:company_id/phone/:phone_id/primary" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/companies/:company_id/phone/: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": "1234567890",
            "dialCode": "+1",
            "country": "United States",
            "isPrimary": true
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/phone/:phone_id/primary

Company Task Management

Get Company Tasks

curl -X GET "https://api.onesuite.io/v1/companies/:company_id/task" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/companies/:company_id/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 call",
            "description": "Schedule a follow-up call",
            "status": "to_do",
            "dueDate": "2024-07-20T00:00:00.000Z",
            "createdBy": {
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "John Doe",
                    "email": "[email protected]"
                }
            },
            "assignedTo": [
                {
                    "id": "user_to_business_id",
                    "user": {
                        "id": "user_id",
                        "profileImg": "https://example.com/profile.jpg",
                        "fullName": "Jane Smith",
                        "email": "[email protected]"
                    }
                }
            ],
            "files": [],
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/companies/:company_id/task

Create Company Task

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

The above command returns JSON structured like this:

{
    "message": "Task created successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up call",
        "description": null,
        "status": "no_status",
        "dueDate": null,
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

POST https://api.onesuite.io/v1/companies/:company_id/task

Request Body Parameters

Parameter Type Required Description
title string Yes Task title

Delete Company Task

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

The above command returns JSON structured like this:

{
    "message": "Task deleted successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id/task/:task_id

Update Company Task Description

curl -X PATCH "https://api.onesuite.io/v1/companies/:company_id/task/:task_id/description" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Schedule a follow-up call with the client"
  }'
fetch("https://api.onesuite.io/v1/companies/:company_id/task/:task_id/description", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        description: "Schedule a follow-up call with the client",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Task description updated successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up call",
        "description": "Schedule a follow-up call with the client",
        "status": "to_do",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/task/:task_id/description

Request Body Parameters

Parameter Type Required Description
description string Yes Task description

Update Company Task Title

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

The above command returns JSON structured like this:

{
    "message": "Title updated successfully",
    "task": {
        "id": "task_id",
        "title": "Updated Task Title",
        "description": "Schedule a follow-up call with the client",
        "status": "to_do",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/task/:task_id/title

Request Body Parameters

Parameter Type Required Description
title string Yes Updated task title

Update Company Task Status

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

The above command returns JSON structured like this:

{
    "message": "Status updated successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up call",
        "description": "Schedule a follow-up call with the client",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/task/:task_id/status

Request Body Parameters

Parameter Type Required Description
status string Yes Task status: "no_status", "to_do", "in_progress", or "done"

Update Company Task Due Date

curl -X PATCH "https://api.onesuite.io/v1/companies/:company_id/task/:task_id/due-date" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "dueDate": "2024-07-20T00:00:00.000Z"
  }'
fetch("https://api.onesuite.io/v1/companies/:company_id/task/:task_id/due-date", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        dueDate: "2024-07-20T00:00:00.000Z",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Due date updated successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up call",
        "description": "Schedule a follow-up call with the client",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/task/:task_id/due-date

Request Body Parameters

Parameter Type Required Description
dueDate string Yes Due date in ISO 8601 format. Use empty string "" to clear the due date.

Assign Company Task to User

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

The above command returns JSON structured like this:

{
    "message": "Task assigned to user successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up call",
        "description": "Schedule a follow-up call with the client",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [
            {
                "id": "user_to_business_id",
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "Jane Smith",
                    "email": "[email protected]"
                }
            }
        ],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/task/:task_id/assign

Request Body Parameters

Parameter Type Required Description
userToBusinessId string Yes User to business ID to assign the task to

Remove Company Task Assignee

curl -X DELETE "https://api.onesuite.io/v1/companies/:company_id/task/:task_id/assign/:userToBusinessId" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/companies/:company_id/task/:task_id/assign/:userToBusinessId", {
    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 call",
        "description": "Schedule a follow-up call with the client",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id/task/:task_id/assign/:userToBusinessId

Delete Company Task File

curl -X DELETE "https://api.onesuite.io/v1/companies/:company_id/task/:task_id/file/:file_id" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/companies/:company_id/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 call",
        "files": []
    }
}

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id/task/:task_id/file/:file_id

Rename Company Task File

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

The above command returns JSON structured like this:

{
    "message": "File name updated successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up call",
        "files": [
            {
                "id": "file_id",
                "fileName": "new_file_name.pdf",
                "url": "https://example.com/file.pdf",
                "fileType": "pdf",
                "fileSize": 1024
            }
        ]
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/task/:task_id/file/:file_id

Request Body Parameters

Parameter Type Required Description
name string Yes New file name

Company Note Management

Get Company Notes

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

The above command returns JSON structured like this:

{
    "message": "Notes fetched successfully",
    "notes": [
        {
            "id": "note_id",
            "title": "Meeting notes",
            "description": "Discussed project requirements",
            "createdBy": {
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "John Doe",
                    "email": "[email protected]"
                }
            },
            "files": [],
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/companies/:company_id/note

Create Company Note

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

The above command returns JSON structured like this:

{
    "message": "Note created successfully",
    "note": {
        "id": "note_id",
        "title": "Meeting notes",
        "description": null,
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

POST https://api.onesuite.io/v1/companies/:company_id/note

Request Body Parameters

Parameter Type Required Description
title string Yes Note title

Delete Company Note

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

The above command returns JSON structured like this:

{
    "message": "Note deleted successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id/note/:note_id

Update Company Note Title

curl -X PATCH "https://api.onesuite.io/v1/companies/:company_id/note/:note_id/title" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Note Title"
  }'
fetch("https://api.onesuite.io/v1/companies/:company_id/note/:note_id/title", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    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": "Discussed project requirements",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/note/:note_id/title

Request Body Parameters

Parameter Type Required Description
title string Yes Updated note title

Update Company Note Description

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

The above command returns JSON structured like this:

{
    "message": "Note updated successfully",
    "note": {
        "id": "note_id",
        "title": "Meeting notes",
        "description": "Updated description with more details",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/note/:note_id/description

Request Body Parameters

Parameter Type Required Description
description string Yes Updated note description

Delete Company Note File

curl -X DELETE "https://api.onesuite.io/v1/companies/:company_id/note/:note_id/file/:file_id" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/companies/:company_id/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": "Meeting notes",
        "files": []
    }
}

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id/note/:note_id/file/:file_id

Rename Company Note File

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

The above command returns JSON structured like this:

{
    "message": "File renamed successfully",
    "note": {
        "id": "note_id",
        "title": "Meeting notes",
        "files": [
            {
                "id": "file_id",
                "fileName": "new_file_name.pdf",
                "url": "https://example.com/file.pdf",
                "fileType": "pdf",
                "fileSize": 1024
            }
        ]
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/note/:note_id/file/:file_id

Request Body Parameters

Parameter Type Required Description
name string Yes New file name

Company File Management

Get Company Files

curl -X GET "https://api.onesuite.io/v1/companies/:company_id/file" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/companies/:company_id/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": 1024,
            "createdBy": {
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "John Doe",
                    "email": "[email protected]"
                }
            },
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/companies/:company_id/file

Delete Company File

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

The above command returns JSON structured like this:

{
    "message": "File deleted successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/companies/:company_id/file/:file_id

Rename Company File

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

The above command returns JSON structured like this:

{
    "message": "File renamed successfully",
    "file": {
        "id": "file_id",
        "fileName": "new_file_name.pdf",
        "url": "https://example.com/file.pdf",
        "fileType": "pdf",
        "fileSize": 1024
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/companies/:company_id/file/:file_id

Request Body Parameters

Parameter Type Required Description
name string Yes New file name

Download Company File

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

The above command returns the file as a download stream with appropriate Content-Type and Content-Disposition headers.

HTTP Request

GET https://api.onesuite.io/v1/companies/:company_id/file/:file_id/download

Company Activity Logs

Get Company Activity Logs

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

The above command returns JSON structured like this:

{
    "message": "success",
    "activityLogs": {
        "July 2024": [
            {
                "id": "log_id",
                "actionType": "created",
                "actionItem": "Company",
                "actionData": "Acme Corporation",
                "createdBy": {
                    "user": {
                        "id": "user_id",
                        "profileImg": "https://example.com/profile.jpg",
                        "fullName": "John Doe",
                        "email": "[email protected]"
                    }
                },
                "createdAt": "2024-07-14T11:17:38.213Z"
            }
        ]
    }
}

HTTP Request

GET https://api.onesuite.io/v1/companies/:company_id/timeline

Company Convert to Client

Convert Company to Client

curl -X POST "https://api.onesuite.io/v1/companies/:company_id/convert-to-client" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "invitePeopleIds": ["people_id_1", "people_id_2"],
    "message": "Welcome to our client portal!"
  }'
fetch("https://api.onesuite.io/v1/companies/:company_id/convert-to-client", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        invitePeopleIds: ["people_id_1", "people_id_2"],
        message: "Welcome to our client portal!",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Company converted to client successfully",
    "client": {
        "id": "client_id",
        "type": "company",
        "name": "Acme Corporation",
        "companyId": "company_id"
    },
    "invitationResults": [
        {
            "peopleId": "people_id_1",
            "email": "[email protected]",
            "invitationStatus": "success",
            "invitationUrl": "https://app.onesuite.io/invite/...",
            "invitationId": "invitation_id"
        }
    ]
}

HTTP Request

POST https://api.onesuite.io/v1/companies/:company_id/convert-to-client

Request Body Parameters

Parameter Type Required Description
invitePeopleIds array[string] No Array of people IDs to invite to client portal
message string No Custom invitation message

CRM People

People CRUD Operations

Create People

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

The above command returns JSON structured like this:

{
    "message": "People created successfully",
    "people": {
        "id": "clylgomqt0001casgvlnnowld",
        "name": "John Doe",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513",
        "avatar": null,
        "createdBy": {
            "user": {
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User"
            }
        },
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

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

Request Body Parameters

Parameter Type Required Description
name string Yes Full name of the person

Get All People

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

The above command returns JSON structured like this:

{
    "message": "People list fetched successfully",
    "peopleList": [
        {
            "id": "clylgomqt0001casgvlnnowld",
            "name": "John Doe",
            "avatar": "https://example.com/avatar.jpg",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "jobTitle": "Sales Manager",
            "emails": [
                {
                    "id": "email_id",
                    "email": "[email protected]",
                    "isPrimary": true
                }
            ],
            "phones": [
                {
                    "id": "phone_id",
                    "phone": "1234567890",
                    "dialCode": "+1",
                    "isPrimary": true
                }
            ],
            "company": {
                "id": "company_id",
                "name": "Acme Corp"
            },
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

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

Get People List (Simple Data)

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

The above command returns JSON structured like this:

{
    "message": "People list fetched successfully",
    "peopleList": [
        {
            "id": "clylgomqt0001casgvlnnowld",
            "name": "John Doe",
            "avatar": "https://example.com/avatar.jpg",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "email": "[email protected]",
            "companyId": "company_id",
            "invitationStatus": "not-invited"
        }
    ]
}

HTTP Request

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

Get Single People

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

The above command returns JSON structured like this:

{
    "message": "success",
    "people": {
        "id": "clylgomqt0001casgvlnnowld",
        "name": "John Doe",
        "avatar": "https://example.com/avatar.jpg",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513",
        "jobTitle": "Sales Manager",
        "address1": "123 Main St",
        "address2": "Suite 100",
        "city": "New York",
        "state": "NY",
        "zip": "10001",
        "country": "United States",
        "linkedinUrl": "https://linkedin.com/in/johndoe",
        "twitterUrl": "https://twitter.com/johndoe",
        "emails": [
            {
                "id": "email_id",
                "email": "[email protected]",
                "isPrimary": true,
                "createdAt": "2024-07-14T11:17:38.213Z"
            }
        ],
        "phones": [
            {
                "id": "phone_id",
                "phone": "1234567890",
                "dialCode": "+1",
                "country": "United States",
                "isPrimary": true,
                "createdAt": "2024-07-14T11:17:38.213Z"
            }
        ],
        "company": {
            "id": "company_id",
            "name": "Acme Corp"
        },
        "opportunities": [],
        "invitationStatus": "not-invited",
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

GET https://api.onesuite.io/v1/people/:people_id

Delete Single People

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

The above command returns JSON structured like this:

{
    "message": "People deleted successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id

Delete Multiple People

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

The above command returns JSON structured like this:

{
    "message": "People deleted successfully"
}

HTTP Request

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

Request Body Parameters

Parameter Type Required Description
peopleIds array[string] Yes Array of people IDs to delete

People Basic Information Mutations

Update People Name

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

The above command returns JSON structured like this:

{
    "message": "People name updated successfully",
    "name": "Jane Doe",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/name

Request Body Parameters

Parameter Type Required Description
name string Yes Updated full name of the person

Update People Address

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

The above command returns JSON structured like this:

{
    "message": "Updated successfully",
    "address": {
        "address1": "123 Main St",
        "address2": "Suite 100",
        "city": "New York",
        "state": "NY",
        "zip": "10001",
        "country": "United States"
    },
    "updatedAt": "2024-07-14T11:17:38.213Z"
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/address

Request Body Parameters

Parameter Type Required Description
address1 string No Street address line 1
address2 string No Street address line 2
city string No City name
state string No State or province
zip string No Postal/ZIP code
country object No Country object with name, code, dial_code, and flag

Update People Designation

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

The above command returns JSON structured like this:

{
    "message": "People designation updated successfully",
    "jobTitle": "Sales Manager",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/designation

Request Body Parameters

Parameter Type Required Description
designation string Yes Job title or designation

Update People Social Media

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

The above command returns JSON structured like this:

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

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/social-media

Request Body Parameters

Parameter Type Required Description
linkedinUrl string No LinkedIn profile URL
twitterUrl string No Twitter/X 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

Update People LinkedIn

curl -X PATCH "https://api.onesuite.io/v1/people/:people_id/linkedin" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "linkedinUrl": "https://linkedin.com/in/johndoe"
  }'
fetch("https://api.onesuite.io/v1/people/:people_id/linkedin", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        linkedinUrl: "https://linkedin.com/in/johndoe",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Updated successfully",
    "linkedinUrl": "https://linkedin.com/in/johndoe",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/linkedin

Request Body Parameters

Parameter Type Required Description
linkedinUrl string No LinkedIn profile URL (must include linkedin.com)

Update People Twitter

curl -X PATCH "https://api.onesuite.io/v1/people/:people_id/twitter" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "twitterUrl": "https://twitter.com/johndoe"
  }'
fetch("https://api.onesuite.io/v1/people/:people_id/twitter", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        twitterUrl: "https://twitter.com/johndoe",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Updated successfully",
    "twitterUrl": "https://twitter.com/johndoe",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/twitter

Request Body Parameters

Parameter Type Required Description
twitterUrl string No Twitter/X profile URL (must include twitter.com or x.com)

People Contact Information - Emails

Add People Email

curl -X POST "https://api.onesuite.io/v1/people/:people_id/emails" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]"
  }'
fetch("https://api.onesuite.io/v1/people/:people_id/emails", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    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": true,
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

POST https://api.onesuite.io/v1/people/:people_id/emails

Request Body Parameters

Parameter Type Required Description
email string Yes Valid email address

Update People Email

curl -X PATCH "https://api.onesuite.io/v1/people/:people_id/emails/:email_id" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]"
  }'
fetch("https://api.onesuite.io/v1/people/:people_id/emails/:email_id", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    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": true,
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/emails/:email_id

Request Body Parameters

Parameter Type Required Description
email string Yes Updated valid email address

Delete People Email

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

The above command returns JSON structured like this:

{
    "message": "Email deleted successfully",
    "emails": [
        {
            "id": "email_id_2",
            "email": "[email protected]",
            "isPrimary": true,
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/emails/:email_id

Set People Email as Primary

curl -X PATCH "https://api.onesuite.io/v1/people/:people_id/emails/:email_id/primary" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/people/:people_id/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"
        },
        {
            "id": "email_id_2",
            "email": "[email protected]",
            "isPrimary": false,
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/emails/:email_id/primary

People Contact Information - Phones

Add People Phone

curl -X POST "https://api.onesuite.io/v1/people/:people_id/phones" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "1234567890",
    "country": {
      "name": "United States",
      "dial_code": "+1"
    }
  }'
fetch("https://api.onesuite.io/v1/people/:people_id/phones", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        phone: "1234567890",
        country: {
            name: "United States",
            dial_code: "+1",
        },
    }),
});

The above command returns JSON structured like this:

{
    "message": "Phone added successfully",
    "phones": [
        {
            "id": "phone_id",
            "phone": "1234567890",
            "dialCode": "+1",
            "country": "United States",
            "isPrimary": true,
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

POST https://api.onesuite.io/v1/people/:people_id/phones

Request Body Parameters

Parameter Type Required Description
phone string Yes Phone number
country object No Country object with name and dial_code

Update People Phone

curl -X PATCH "https://api.onesuite.io/v1/people/:people_id/phones/:phone_id" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "9876543210",
    "country": {
      "name": "United States",
      "dial_code": "+1"
    }
  }'
fetch("https://api.onesuite.io/v1/people/:people_id/phones/:phone_id", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        phone: "9876543210",
        country: {
            name: "United States",
            dial_code: "+1",
        },
    }),
});

The above command returns JSON structured like this:

{
    "message": "Phone updated successfully",
    "phones": [
        {
            "id": "phone_id",
            "phone": "9876543210",
            "dialCode": "+1",
            "country": "United States",
            "isPrimary": true,
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/phones/:phone_id

Request Body Parameters

Parameter Type Required Description
phone string Yes Updated phone number
country object No Country object with name and dial_code

Delete People Phone

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

The above command returns JSON structured like this:

{
    "message": "Phone deleted successfully",
    "phones": [
        {
            "id": "phone_id_2",
            "phone": "5555555555",
            "dialCode": "+1",
            "country": "United States",
            "isPrimary": true,
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/phones/:phone_id

Set People Phone as Primary

curl -X PATCH "https://api.onesuite.io/v1/people/:people_id/phones/:phone_id/primary" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/people/:people_id/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": "1234567890",
            "dialCode": "+1",
            "country": "United States",
            "isPrimary": true,
            "createdAt": "2024-07-14T11:17:38.213Z"
        },
        {
            "id": "phone_id_2",
            "phone": "5555555555",
            "dialCode": "+1",
            "country": "United States",
            "isPrimary": false,
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/phones/:phone_id/primary

People Relationship Management

Connect People to Opportunity

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

The above command returns JSON structured like this:

{
    "message": "Updated successfully",
    "opportunities": [
        {
            "id": "opportunity_id",
            "name": "Q4 Sales Opportunity",
            "stage": {
                "id": "stage_id",
                "name": "Qualified"
            },
            "pointOfContact": {
                "id": "people_id",
                "name": "John Doe"
            }
        }
    ],
    "showToast": true,
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z"
}

HTTP Request

POST https://api.onesuite.io/v1/people/:people_id/opportunity

Request Body Parameters

Parameter Type Required Description
opportunityId string Yes ID of the opportunity to connect

Disconnect People from Opportunity

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

The above command returns JSON structured like this:

{
    "message": "Updated successfully",
    "opportunities": [],
    "showToast": true,
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z"
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/opportunity/:opportunity_id

Connect People to Company

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

The above command returns JSON structured like this:

{
    "message": "Company connected successfully",
    "company": {
        "id": "company_id",
        "name": "Acme Corp",
        "domains": [],
        "industry": {
            "id": "industry_id",
            "name": "Technology"
        }
    },
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

POST https://api.onesuite.io/v1/people/:people_id/company

Request Body Parameters

Parameter Type Required Description
companyId string Yes ID of the company to connect

Disconnect People from Company

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

The above command returns JSON structured like this:

{
    "message": "Company disconnected successfully",
    "company": null,
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/company/:company_id

People Task Management

Get People Tasks

curl -X GET "https://api.onesuite.io/v1/people/:people_id/task" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/people/:people_id/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": "Call to discuss project requirements",
            "status": "to_do",
            "dueDate": "2024-07-20T00:00:00.000Z",
            "createdBy": {
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "Admin User",
                    "email": "[email protected]"
                }
            },
            "assignedTo": [],
            "files": []
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/people/:people_id/task

Create People Task

curl -X POST "https://api.onesuite.io/v1/people/:people_id/task" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Follow up with client"
  }'
fetch("https://api.onesuite.io/v1/people/:people_id/task", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    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": null,
        "status": "no_status",
        "dueDate": null,
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    }
}

HTTP Request

POST https://api.onesuite.io/v1/people/:people_id/task

Request Body Parameters

Parameter Type Required Description
title string Yes Task title (minimum 1 character)

Delete People Task

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

The above command returns JSON structured like this:

{
    "message": "Task deleted successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/task/:task_id

Update People Task Description

curl -X PATCH "https://api.onesuite.io/v1/people/:people_id/task/:task_id/description" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Call to discuss project requirements"
  }'
fetch("https://api.onesuite.io/v1/people/:people_id/task/:task_id/description", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        description: "Call to discuss project requirements",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Task description updated successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "Call to discuss project requirements",
        "status": "to_do",
        "dueDate": null,
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/task/:task_id/description

Request Body Parameters

Parameter Type Required Description
description string No Task description

Update People Task Title

curl -X PATCH "https://api.onesuite.io/v1/people/:people_id/task/:task_id/title" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated task title"
  }'
fetch("https://api.onesuite.io/v1/people/:people_id/task/:task_id/title", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    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": "Call to discuss project requirements",
        "status": "to_do",
        "dueDate": null,
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/task/:task_id/title

Request Body Parameters

Parameter Type Required Description
title string Yes Updated task title (minimum 1 character)

Update People Task Status

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

The above command returns JSON structured like this:

{
    "message": "Status updated successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "Call to discuss project requirements",
        "status": "in_progress",
        "dueDate": null,
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/task/:task_id/status

Request Body Parameters

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

Update People Task Due Date

curl -X PATCH "https://api.onesuite.io/v1/people/:people_id/task/:task_id/due-date" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "dueDate": "2024-07-20T00:00:00.000Z"
  }'
fetch("https://api.onesuite.io/v1/people/:people_id/task/:task_id/due-date", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        dueDate: "2024-07-20T00:00:00.000Z",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Due date updated successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "Call to discuss project requirements",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/task/:task_id/due-date

Request Body Parameters

Parameter Type Required Description
dueDate string Yes Due date in ISO 8601 format. Use empty string "" to remove due date.

Assign People Task to User

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

The above command returns JSON structured like this:

{
    "message": "Task assigned to user successfully",
    "task": {
        "id": "task_id",
        "title": "Follow up with client",
        "description": "Call to discuss project requirements",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User",
                "email": "[email protected]"
            }
        },
        "assignedTo": [
            {
                "id": "user_to_business_id",
                "user": {
                    "id": "user_id_2",
                    "profileImg": "https://example.com/profile2.jpg",
                    "fullName": "Jane Smith",
                    "email": "[email protected]"
                }
            }
        ],
        "files": []
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/task/:task_id/assign

Request Body Parameters

Parameter Type Required Description
userToBusinessId string Yes ID of the user to business relationship

Remove People Task Assignee

curl -X DELETE "https://api.onesuite.io/v1/people/:people_id/task/:task_id/assign/:userToBusinessId" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/people/:people_id/task/:task_id/assign/:userToBusinessId", {
    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": "Call to discuss project requirements",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": []
    },
    "showToast": true
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/task/:task_id/assign/:userToBusinessId

Delete People Task File

curl -X DELETE "https://api.onesuite.io/v1/people/:people_id/task/:task_id/file/:file_id" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/people/:people_id/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"
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/task/:task_id/file/:file_id

Rename People Task File

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

The above command returns JSON structured like this:

{
    "message": "File renamed successfully",
    "file": {
        "id": "file_id",
        "fileName": "updated_file_name.pdf",
        "fileUrl": "https://example.com/file.pdf"
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/task/:task_id/file/:file_id

Request Body Parameters

Parameter Type Required Description
fileName string Yes New file name

People Note Management

Get People Notes

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

The above command returns JSON structured like this:

{
    "message": "success",
    "notes": [
        {
            "id": "note_id",
            "title": "Meeting Notes",
            "description": "Discussed project requirements",
            "createdBy": {
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "Admin User",
                    "email": "[email protected]"
                }
            },
            "files": [],
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/people/:people_id/note

Create People Note

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

The above command returns JSON structured like this:

{
    "message": "Note created successfully",
    "note": {
        "id": "note_id",
        "title": "Meeting Notes",
        "description": null,
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User",
                "email": "[email protected]"
            }
        },
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

POST https://api.onesuite.io/v1/people/:people_id/note

Request Body Parameters

Parameter Type Required Description
title string Yes Note title (minimum 1 character)

Delete People Note

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

The above command returns JSON structured like this:

{
    "message": "Note deleted successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/note/:note_id

Update People Note Title

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

The above command returns JSON structured like this:

{
    "message": "Note title updated successfully",
    "note": {
        "id": "note_id",
        "title": "Updated Note Title",
        "description": "Discussed project requirements",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User",
                "email": "[email protected]"
            }
        },
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/note/:note_id/title

Request Body Parameters

Parameter Type Required Description
title string Yes Updated note title (minimum 1 character)

Update People Note Description

curl -X PATCH "https://api.onesuite.io/v1/people/:people_id/note/:note_id/description" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Discussed project requirements in detail"
  }'
fetch("https://api.onesuite.io/v1/people/:people_id/note/:note_id/description", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        description: "Discussed project requirements in detail",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Note description updated successfully",
    "note": {
        "id": "note_id",
        "title": "Meeting Notes",
        "description": "Discussed project requirements in detail",
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User",
                "email": "[email protected]"
            }
        },
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/note/:note_id/description

Request Body Parameters

Parameter Type Required Description
description string No Note description

Delete People Note File

curl -X DELETE "https://api.onesuite.io/v1/people/:people_id/note/:note_id/file/:file_id" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/people/:people_id/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"
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/note/:note_id/file/:file_id

Rename People Note File

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

The above command returns JSON structured like this:

{
    "message": "File renamed successfully",
    "file": {
        "id": "file_id",
        "fileName": "updated_file_name.pdf",
        "fileUrl": "https://example.com/file.pdf"
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/note/:note_id/file/:file_id

Request Body Parameters

Parameter Type Required Description
fileName string Yes New file name

People File Management

Get People Files

curl -X GET "https://api.onesuite.io/v1/people/:people_id/file" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/people/:people_id/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",
            "fileUrl": "https://example.com/document.pdf",
            "fileSize": 1024000,
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/people/:people_id/file

Delete People File

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

The above command returns JSON structured like this:

{
    "message": "File deleted successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/file/:file_id

Rename People File

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

The above command returns JSON structured like this:

{
    "message": "File renamed successfully",
    "file": {
        "id": "file_id",
        "fileName": "updated_file_name.pdf",
        "fileUrl": "https://example.com/file.pdf"
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/people/:people_id/file/:file_id

Request Body Parameters

Parameter Type Required Description
fileName string Yes New file name

Download People File

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

The above command returns a file download response.

HTTP Request

GET https://api.onesuite.io/v1/people/:people_id/file/:file_id/download

People Activity Logs

Get People Activity Logs

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

The above command returns JSON structured like this:

{
    "message": "success",
    "activityLogs": [
        {
            "id": "log_id",
            "actionType": "created",
            "actionItem": "People",
            "actionData": "John Doe",
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User",
                "email": "[email protected]"
            },
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/people/:people_id/activity-logs

People Invitation Management

Invite Individual People

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

The above command returns JSON structured like this:

{
    "message": "Invitation sent successfully",
    "invitationId": "invitation_id"
}

HTTP Request

POST https://api.onesuite.io/v1/people/:people_id/invite

Request Body Parameters

Parameter Type Required Description
email string Yes Email address to send invitation to

Resend Invitation

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

The above command returns JSON structured like this:

{
    "message": "Invitation resent successfully"
}

HTTP Request

POST https://api.onesuite.io/v1/people/:people_id/resend-invitation

Cancel Invitation

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

The above command returns JSON structured like this:

{
    "message": "Invitation cancelled successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/cancel-invitation

Revoke Business Access from People

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

The above command returns JSON structured like this:

{
    "message": "Access revoked successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/people/:people_id/revoke-access

People Convert to Client

Convert People to Client

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

The above command returns JSON structured like this:

{
    "message": "People converted to client successfully",
    "client": {
        "id": "client_id",
        "type": "individual",
        "name": "John Doe"
    }
}

HTTP Request

POST https://api.onesuite.io/v1/people/:people_id/convert-to-client

CRM Opportunities

Opportunity CRUD Operations

Create Opportunity

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

The above command returns JSON structured like this:

{
    "message": "Opportunity created successfully",
    "opportunity": {
        "id": "opportunity_id",
        "name": "Q1 Enterprise Deal",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513",
        "amount": 0,
        "currency": "USD",
        "stage": {
            "id": "stage_id",
            "name": "Qualification",
            "sortId": 1
        },
        "createdBy": {
            "user": {
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "Admin User"
            }
        },
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

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

Request Body Parameters

Parameter Type Required Description
name string Yes Opportunity name
bgColor string No Background color
fgColor string No Foreground color

Get All Opportunities

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

HTTP Request

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

Get Opportunity List (Simple Data)

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

HTTP Request

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

Get Opportunity Stages

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

The above command returns JSON structured like this:

{
    "message": "Opportunity stages fetched successfully",
    "opportunityStages": [
        {
            "id": "stage_id",
            "name": "Qualification",
            "sortId": 1,
            "isDefault": true
        },
        {
            "id": "stage_id_2",
            "name": "Proposal",
            "sortId": 2,
            "isDefault": false
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/opportunities/stage

Get Single Opportunity

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

HTTP Request

GET https://api.onesuite.io/v1/opportunities/:opportunity_id

Delete Multiple Opportunities

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

The above command returns JSON structured like this:

{
    "message": "Opportunities deleted successfully",
    "deletedCount": 2,
    "notFoundCount": 0
}

HTTP Request

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

Request Body Parameters

Parameter Type Required Description
opportunityIds array[string] Yes Array of opportunity IDs to delete

Delete Single Opportunity

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

The above command returns JSON structured like this:

{
    "message": "Opportunity deleted successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/opportunities/:opportunity_id

Opportunity Basic Information Mutations

Update Opportunity Name

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

The above command returns JSON structured like this:

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

HTTP Request

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/name

Request Body Parameters

Parameter Type Required Description
name string Yes New opportunity name

Update Opportunity Amount

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

The above command returns JSON structured like this:

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

HTTP Request

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/amount

Request Body Parameters

Parameter Type Required Description
amount number Yes Opportunity amount
currency string No Currency code (e.g., "USD")
currencySymbol string No Currency symbol (e.g., "$")
currencyName string No Currency name (e.g., "US Dollar")

Update Opportunity Close Date

curl -X PATCH "https://api.onesuite.io/v1/opportunities/:opportunity_id/close-date" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "closeDate": "2024-12-31T00:00:00.000Z"
  }'
fetch("https://api.onesuite.io/v1/opportunities/:opportunity_id/close-date", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        closeDate: "2024-12-31T00:00:00.000Z",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Close date updated successfully",
    "closeDate": "2024-12-31T00:00:00.000Z",
    "updatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/close-date

Request Body Parameters

Parameter Type Required Description
closeDate string Yes Close date in ISO 8601 format. Use empty string "" to clear the close date.

Update Opportunity Stage

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

The above command returns JSON structured like this:

{
    "message": "Opportunity stage updated successfully",
    "stage": {
        "id": "stage_id",
        "name": "Proposal",
        "sortId": 2
    },
    "showToast": true,
    "updatedAt": "2024-07-14T11:17:38.213Z"
}

HTTP Request

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/stage

Request Body Parameters

Parameter Type Required Description
stage object Yes Stage object with id

Opportunity Relationship Management

Connect Opportunity Company

curl -X POST "https://api.onesuite.io/v1/opportunities/:opportunity_id/company" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "companyId": "company_id"
  }'
fetch("https://api.onesuite.io/v1/opportunities/:opportunity_id/company", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        companyId: "company_id",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Company connected successfully",
    "company": {
        "id": "company_id",
        "name": "Acme Corporation"
    },
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

POST https://api.onesuite.io/v1/opportunities/:opportunity_id/company

Request Body Parameters

Parameter Type Required Description
companyId string Yes Company ID to connect

Disconnect Opportunity Company

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

The above command returns JSON structured like this:

{
    "message": "Company disconnected successfully",
    "company": null,
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

DELETE https://api.onesuite.io/v1/opportunities/:opportunity_id/company/:company_id

Connect Opportunity Point of Contact

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

The above command returns JSON structured like this:

{
    "message": "Point of contact connected successfully",
    "pointOfContact": {
        "id": "people_id",
        "name": "Jane Smith",
        "avatar": "https://example.com/avatar.jpg",
        "email": "[email protected]",
        "phone": "1234567890"
    },
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

POST https://api.onesuite.io/v1/opportunities/:opportunity_id/point-of-contact

Request Body Parameters

Parameter Type Required Description
pointOfContactId string Yes People ID to set as point of contact

Disconnect Opportunity Point of Contact

curl -X DELETE "https://api.onesuite.io/v1/opportunities/:opportunity_id/point-of-contact/:point_of_contact_id" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/opportunities/:opportunity_id/point-of-contact/:point_of_contact_id", {
    method: "DELETE",
    headers: {
        Authorization: "your-api-key",
    },
});

The above command returns JSON structured like this:

{
    "message": "Point of contact disconnected successfully",
    "pointOfContact": null,
    "lastUpdatedAt": "2024-07-14T11:17:38.213Z",
    "showToast": true
}

HTTP Request

DELETE https://api.onesuite.io/v1/opportunities/:opportunity_id/point-of-contact/:point_of_contact_id

Opportunity Task Management

The opportunity task management endpoints follow the same pattern as company tasks. See Company Task Management section for detailed documentation.

Get Opportunity Tasks

GET https://api.onesuite.io/v1/opportunities/:opportunity_id/task

Create Opportunity Task

POST https://api.onesuite.io/v1/opportunities/:opportunity_id/task

Request Body Parameters

Parameter Type Required Description
title string Yes Task title

Delete Opportunity Task

DELETE https://api.onesuite.io/v1/opportunities/:opportunity_id/task/:task_id

Update Opportunity Task Description

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/task/:task_id/description

Update Opportunity Task Title

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/task/:task_id/title

Update Opportunity Task Status

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/task/:task_id/status

Update Opportunity Task Due Date

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/task/:task_id/due-date

Assign Opportunity Task to User

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/task/:task_id/assign

Remove Opportunity Task Assignee

DELETE https://api.onesuite.io/v1/opportunities/:opportunity_id/task/:task_id/assign/:userToBusinessId

Delete Opportunity Task File

DELETE https://api.onesuite.io/v1/opportunities/:opportunity_id/task/:task_id/file/:file_id

Rename Opportunity Task File

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/task/:task_id/file/:file_id

Opportunity Note Management

The opportunity note management endpoints follow the same pattern as company notes. See Company Note Management section for detailed documentation.

Get Opportunity Notes

GET https://api.onesuite.io/v1/opportunities/:opportunity_id/note

Create Opportunity Note

POST https://api.onesuite.io/v1/opportunities/:opportunity_id/note

Request Body Parameters

Parameter Type Required Description
title string Yes Note title

Delete Opportunity Note

DELETE https://api.onesuite.io/v1/opportunities/:opportunity_id/note/:note_id

Update Opportunity Note Title

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/note/:note_id/title

Update Opportunity Note Description

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/note/:note_id/description

Delete Opportunity Note File

DELETE https://api.onesuite.io/v1/opportunities/:opportunity_id/note/:note_id/file/:file_id

Rename Opportunity Note File

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/note/:note_id/file/:file_id

Opportunity File Management

Get Opportunity Files

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

The above command returns JSON structured like this:

{
    "message": "success",
    "files": [
        {
            "id": "file_id",
            "fileName": "proposal.pdf",
            "url": "https://example.com/proposal.pdf",
            "fileType": "pdf",
            "fileSize": 2048,
            "createdBy": {
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "John Doe",
                    "email": "[email protected]"
                }
            },
            "crmNote": {
                "id": "note_id",
                "title": "Meeting notes"
            },
            "crmTask": {
                "id": "task_id",
                "title": "Follow up"
            },
            "createdAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/opportunities/:opportunity_id/file

Delete Opportunity File

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

The above command returns JSON structured like this:

{
    "message": "File deleted successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/opportunities/:opportunity_id/file/:file_id

Rename Opportunity File

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

The above command returns JSON structured like this:

{
    "message": "File renamed successfully",
    "file": {
        "id": "file_id",
        "fileName": "new_file_name.pdf",
        "url": "https://example.com/file.pdf",
        "fileType": "pdf",
        "fileSize": 2048
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/opportunities/:opportunity_id/file/:file_id

Request Body Parameters

Parameter Type Required Description
name string Yes New file name

Download Opportunity File

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

The above command returns the file as a download stream with appropriate Content-Type and Content-Disposition headers.

HTTP Request

GET https://api.onesuite.io/v1/opportunities/:opportunity_id/file/:file_id/download

Opportunity Activity Logs

Get Opportunity Activity Logs

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

The above command returns JSON structured like this:

{
    "message": "success",
    "activityLogs": {
        "July 2024": [
            {
                "id": "log_id",
                "actionType": "created",
                "actionItem": "Opportunity",
                "actionData": "Q1 Enterprise Deal",
                "createdBy": {
                    "user": {
                        "id": "user_id",
                        "profileImg": "https://example.com/profile.jpg",
                        "fullName": "John Doe",
                        "email": "[email protected]"
                    }
                },
                "createdAt": "2024-07-14T11:17:38.213Z"
            }
        ]
    }
}

HTTP Request

GET https://api.onesuite.io/v1/opportunities/:opportunity_id/activity-log

Opportunity Convert to Client

Convert Opportunity to Client

curl -X POST "https://api.onesuite.io/v1/opportunities/:opportunity_id/convert-to-client" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "companyId": "company_id",
    "invitePeopleIds": ["people_id_1", "people_id_2"],
    "message": "Welcome to our client portal!"
  }'
fetch("https://api.onesuite.io/v1/opportunities/:opportunity_id/convert-to-client", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        companyId: "company_id",
        invitePeopleIds: ["people_id_1", "people_id_2"],
        message: "Welcome to our client portal!",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Opportunity converted to client successfully",
    "client": {
        "id": "client_id",
        "type": "company",
        "name": "Acme Corporation",
        "companyId": "company_id"
    }
}

HTTP Request

POST https://api.onesuite.io/v1/opportunities/:opportunity_id/convert-to-client

Request Body Parameters

Parameter Type Required Description
companyId string No Company ID (if different from opportunity's connected company)
invitePeopleIds array[string] No Array of people IDs to invite to client portal
message string No Custom invitation message

CRM Sources

Source CRUD Operations

Get All Sources

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

The above command returns JSON structured like this:

{
    "status": "success",
    "sources": [
        {
            "id": "source_id",
            "name": "Website",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "borderColor": "#FFA500",
            "isDefault": true,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        },
        {
            "id": "source_id_2",
            "name": "Referral",
            "bgColor": "#E1F5FE",
            "fgColor": "#01579B",
            "borderColor": "#039BE5",
            "isDefault": false,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

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

Create Source

curl -X POST "https://api.onesuite.io/v1/sources" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Social Media",
    "bgColor": "#FFDDC1",
    "fgColor": "#8B4513",
    "borderColor": "#FFA500"
  }'
fetch("https://api.onesuite.io/v1/sources", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        name: "Social Media",
        bgColor: "#FFDDC1",
        fgColor: "#8B4513",
        borderColor: "#FFA500",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "source": {
        "id": "source_id",
        "name": "Social Media",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513",
        "borderColor": "#FFA500",
        "isDefault": false,
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "sources": [
        {
            "id": "source_id",
            "name": "Social Media",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "borderColor": "#FFA500",
            "isDefault": false
        }
    ]
}

HTTP Request

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

Request Body Parameters

Parameter Type Required Description
name string Yes Source name
bgColor string No Background color
fgColor string No Foreground color
borderColor string No Border color

Update Source

curl -X PATCH "https://api.onesuite.io/v1/sources/:source_id" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Source Name",
    "bgColor": "#E1F5FE",
    "fgColor": "#01579B",
    "borderColor": "#039BE5"
  }'
fetch("https://api.onesuite.io/v1/sources/:source_id", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        name: "Updated Source Name",
        bgColor: "#E1F5FE",
        fgColor: "#01579B",
        borderColor: "#039BE5",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Source updated successfully",
    "source": {
        "id": "source_id",
        "name": "Updated Source Name",
        "bgColor": "#E1F5FE",
        "fgColor": "#01579B",
        "borderColor": "#039BE5",
        "isDefault": false,
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "sources": [
        {
            "id": "source_id",
            "name": "Updated Source Name",
            "bgColor": "#E1F5FE",
            "fgColor": "#01579B",
            "borderColor": "#039BE5",
            "isDefault": false
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/sources/:source_id

Request Body Parameters

Parameter Type Required Description
name string No Updated source name
bgColor string No Updated background color
fgColor string No Updated foreground color
borderColor string No Updated border color

Delete Source

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Source deleted successfully",
    "sources": [
        {
            "id": "source_id_2",
            "name": "Referral",
            "bgColor": "#E1F5FE",
            "fgColor": "#01579B",
            "isDefault": false
        }
    ]
}

HTTP Request

DELETE https://api.onesuite.io/v1/sources/:source_id

Set Source as Default

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Source set as default successfully",
    "source": {
        "id": "source_id",
        "name": "Website",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513",
        "isDefault": true,
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "sources": [
        {
            "id": "source_id",
            "name": "Website",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "isDefault": true
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/sources/:source_id/set-default

CRM Industries

Industry CRUD Operations

Get All Industries

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

The above command returns JSON structured like this:

{
    "status": "success",
    "industries": [
        {
            "id": "industry_id",
            "name": "Technology",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "borderColor": "#FFA500",
            "isDefault": true,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        },
        {
            "id": "industry_id_2",
            "name": "Healthcare",
            "bgColor": "#E1F5FE",
            "fgColor": "#01579B",
            "borderColor": "#039BE5",
            "isDefault": false,
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

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

Create Industry

curl -X POST "https://api.onesuite.io/v1/industries" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Finance",
    "bgColor": "#FFDDC1",
    "fgColor": "#8B4513",
    "borderColor": "#FFA500"
  }'
fetch("https://api.onesuite.io/v1/industries", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        name: "Finance",
        bgColor: "#FFDDC1",
        fgColor: "#8B4513",
        borderColor: "#FFA500",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "industry": {
        "id": "industry_id",
        "name": "Finance",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513",
        "borderColor": "#FFA500",
        "isDefault": false,
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "industries": [
        {
            "id": "industry_id",
            "name": "Finance",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "borderColor": "#FFA500",
            "isDefault": false
        }
    ]
}

HTTP Request

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

Request Body Parameters

Parameter Type Required Description
name string Yes Industry name
bgColor string No Background color
fgColor string No Foreground color
borderColor string No Border color

Update Industry

curl -X PATCH "https://api.onesuite.io/v1/industries/:industry_id" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Industry Name",
    "bgColor": "#E1F5FE",
    "fgColor": "#01579B",
    "borderColor": "#039BE5"
  }'
fetch("https://api.onesuite.io/v1/industries/:industry_id", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        name: "Updated Industry Name",
        bgColor: "#E1F5FE",
        fgColor: "#01579B",
        borderColor: "#039BE5",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Industry updated successfully",
    "industry": {
        "id": "industry_id",
        "name": "Updated Industry Name",
        "bgColor": "#E1F5FE",
        "fgColor": "#01579B",
        "borderColor": "#039BE5",
        "isDefault": false,
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "industries": [
        {
            "id": "industry_id",
            "name": "Updated Industry Name",
            "bgColor": "#E1F5FE",
            "fgColor": "#01579B",
            "borderColor": "#039BE5",
            "isDefault": false
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/industries/:industry_id

Request Body Parameters

Parameter Type Required Description
name string No Updated industry name
bgColor string No Updated background color
fgColor string No Updated foreground color
borderColor string No Updated border color

Delete Industry

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Industry deleted successfully",
    "industries": [
        {
            "id": "industry_id_2",
            "name": "Healthcare",
            "bgColor": "#E1F5FE",
            "fgColor": "#01579B",
            "isDefault": false
        }
    ]
}

HTTP Request

DELETE https://api.onesuite.io/v1/industries/:industry_id

Set Industry as Default

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

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Industry set as default successfully",
    "industry": {
        "id": "industry_id",
        "name": "Technology",
        "bgColor": "#FFDDC1",
        "fgColor": "#8B4513",
        "isDefault": true,
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "industries": [
        {
            "id": "industry_id",
            "name": "Technology",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "isDefault": true
        }
    ]
}

HTTP Request

PATCH https://api.onesuite.io/v1/industries/:industry_id/set-default

CRM Unified Tasks

Unified Task CRUD Operations

Create Unified Task

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

The above command returns JSON structured like this:

{
    "status": "Task created successfully",
    "task": {
        "id": "task_id",
        "name": "Follow up with client",
        "description": null,
        "status": "no_status",
        "dueDate": null,
        "relation": null,
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

POST https://api.onesuite.io/v1/unified-tasks

Request Body Parameters

Parameter Type Required Description
title string Yes Task title

Get All Unified Tasks

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

The above command returns JSON structured like this:

{
    "status": "success",
    "tasks": [
        {
            "id": "task_id",
            "name": "Follow up with client",
            "description": "Schedule a follow-up call",
            "status": "to_do",
            "dueDate": "2024-07-20T00:00:00.000Z",
            "relation": {
                "type": "company",
                "id": "company_id",
                "name": "Acme Corporation",
                "logo": "https://example.com/logo.jpg",
                "bgColor": "#FFDDC1",
                "fgColor": "#8B4513"
            },
            "createdBy": {
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "John Doe",
                    "email": "[email protected]"
                }
            },
            "assignedTo": [
                {
                    "id": "user_to_business_id",
                    "user": {
                        "id": "user_id",
                        "profileImg": "https://example.com/profile.jpg",
                        "fullName": "Jane Smith",
                        "email": "[email protected]"
                    }
                }
            ],
            "files": [],
            "createdAt": "2024-07-14T11:17:38.213Z",
            "updatedAt": "2024-07-14T11:17:38.213Z"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/unified-tasks

Delete Multiple Unified Tasks

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

The above command returns JSON structured like this:

{
    "message": "Tasks deleted successfully.",
    "deletedCount": 2,
    "notFoundCount": 0
}

HTTP Request

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

Request Body Parameters

Parameter Type Required Description
taskIds array[string] Yes Array of task IDs to delete

Delete Single Unified Task

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

The above command returns JSON structured like this:

{
    "message": "Task deleted successfully"
}

HTTP Request

DELETE https://api.onesuite.io/v1/unified-tasks/:task_id

Unified Task Mutations

Update Unified Task Title

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

The above command returns JSON structured like this:

{
    "message": "Title updated successfully",
    "task": {
        "id": "task_id",
        "name": "Updated Task Title",
        "description": "Schedule a follow-up call",
        "status": "to_do",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "relation": {
            "type": "company",
            "id": "company_id",
            "name": "Acme Corporation"
        },
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/unified-tasks/:task_id/title

Request Body Parameters

Parameter Type Required Description
title string Yes Updated task title

Update Unified Task Description

curl -X PATCH "https://api.onesuite.io/v1/unified-tasks/:task_id/description" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Schedule a follow-up call with the client to discuss project details"
  }'
fetch("https://api.onesuite.io/v1/unified-tasks/:task_id/description", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        description: "Schedule a follow-up call with the client to discuss project details",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Task description updated successfully",
    "task": {
        "id": "task_id",
        "name": "Follow up with client",
        "description": "Schedule a follow-up call with the client to discuss project details",
        "status": "to_do",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "relation": {
            "type": "company",
            "id": "company_id",
            "name": "Acme Corporation"
        },
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/unified-tasks/:task_id/description

Request Body Parameters

Parameter Type Required Description
description string Yes Updated task description

Update Unified Task Status

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

The above command returns JSON structured like this:

{
    "message": "Status updated successfully",
    "task": {
        "id": "task_id",
        "name": "Follow up with client",
        "description": "Schedule a follow-up call",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "relation": {
            "type": "company",
            "id": "company_id",
            "name": "Acme Corporation"
        },
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/unified-tasks/:task_id/status

Request Body Parameters

Parameter Type Required Description
status string Yes Task status: "no_status", "to_do", "in_progress", or "done"

Update Unified Task Due Date

curl -X PATCH "https://api.onesuite.io/v1/unified-tasks/:task_id/due-date" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "dueDate": "2024-07-20T00:00:00.000Z"
  }'
fetch("https://api.onesuite.io/v1/unified-tasks/:task_id/due-date", {
    method: "PATCH",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        dueDate: "2024-07-20T00:00:00.000Z",
    }),
});

The above command returns JSON structured like this:

{
    "message": "Due date updated successfully",
    "task": {
        "id": "task_id",
        "name": "Follow up with client",
        "description": "Schedule a follow-up call",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "relation": {
            "type": "company",
            "id": "company_id",
            "name": "Acme Corporation"
        },
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/unified-tasks/:task_id/due-date

Request Body Parameters

Parameter Type Required Description
dueDate string Yes Due date in ISO 8601 format. Use empty string "" to clear the due date.

Assign Unified Task to User

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

The above command returns JSON structured like this:

{
    "message": "Task assigned to user successfully",
    "task": {
        "id": "task_id",
        "name": "Follow up with client",
        "description": "Schedule a follow-up call",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "relation": {
            "type": "company",
            "id": "company_id",
            "name": "Acme Corporation"
        },
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [
            {
                "id": "user_to_business_id",
                "user": {
                    "id": "user_id",
                    "profileImg": "https://example.com/profile.jpg",
                    "fullName": "Jane Smith",
                    "email": "[email protected]"
                }
            }
        ],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

PATCH https://api.onesuite.io/v1/unified-tasks/:task_id/assign

Request Body Parameters

Parameter Type Required Description
userToBusinessId string Yes User to business ID to assign the task to

Remove Unified Task Assignee

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

The above command returns JSON structured like this:

{
    "message": "Task assignee removed successfully",
    "task": {
        "id": "task_id",
        "name": "Follow up with client",
        "description": "Schedule a follow-up call",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "relation": {
            "type": "company",
            "id": "company_id",
            "name": "Acme Corporation"
        },
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    },
    "showToast": true
}

HTTP Request

DELETE https://api.onesuite.io/v1/unified-tasks/:task_id/assign/:userToBusinessId

Delete Unified Task File

curl -X DELETE "https://api.onesuite.io/v1/unified-tasks/:task_id/files/:file_id" \
  -H "Authorization: your-api-key"
fetch("https://api.onesuite.io/v1/unified-tasks/:task_id/files/: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",
        "name": "Follow up with client",
        "files": []
    }
}

HTTP Request

DELETE https://api.onesuite.io/v1/unified-tasks/:task_id/files/:file_id

Rename Unified Task File

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

The above command returns JSON structured like this:

{
    "message": "File name updated successfully",
    "task": {
        "id": "task_id",
        "name": "Follow up with client",
        "files": [
            {
                "id": "file_id",
                "fileName": "new_file_name.pdf",
                "url": "https://example.com/file.pdf",
                "fileType": "pdf",
                "fileSize": 1024
            }
        ]
    }
}

HTTP Request

PATCH https://api.onesuite.io/v1/unified-tasks/:task_id/files/:file_id/rename

Request Body Parameters

Parameter Type Required Description
name string Yes New file name

Unified Task Relations

Add Unified Task Relation

curl -X POST "https://api.onesuite.io/v1/unified-tasks/:task_id/relation" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "relationId": "company_id",
    "relationType": "company"
  }'
fetch("https://api.onesuite.io/v1/unified-tasks/:task_id/relation", {
    method: "POST",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        relationId: "company_id",
        relationType: "company",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Task relation added successfully",
    "data": {
        "id": "task_id",
        "name": "Follow up with client",
        "description": "Schedule a follow-up call",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "relation": {
            "type": "company",
            "id": "company_id",
            "name": "Acme Corporation",
            "logo": "https://example.com/logo.jpg",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513"
        },
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

POST https://api.onesuite.io/v1/unified-tasks/:task_id/relation

Request Body Parameters

Parameter Type Required Description
relationId string Yes ID of the relation (people, company, or opportunity)
relationType string Yes Type of relation: "people", "company", or "opportunity"

Remove Unified Task Relation

curl -X DELETE "https://api.onesuite.io/v1/unified-tasks/:task_id/relation" \
  -H "Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "relationId": "company_id",
    "relationType": "company"
  }'
fetch("https://api.onesuite.io/v1/unified-tasks/:task_id/relation", {
    method: "DELETE",
    headers: {
        Authorization: "your-api-key",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        relationId: "company_id",
        relationType: "company",
    }),
});

The above command returns JSON structured like this:

{
    "status": "success",
    "message": "Task relation removed successfully",
    "data": {
        "id": "task_id",
        "name": "Follow up with client",
        "description": "Schedule a follow-up call",
        "status": "in_progress",
        "dueDate": "2024-07-20T00:00:00.000Z",
        "relation": null,
        "createdBy": {
            "user": {
                "id": "user_id",
                "profileImg": "https://example.com/profile.jpg",
                "fullName": "John Doe",
                "email": "[email protected]"
            }
        },
        "assignedTo": [],
        "files": [],
        "createdAt": "2024-07-14T11:17:38.213Z",
        "updatedAt": "2024-07-14T11:17:38.213Z"
    }
}

HTTP Request

DELETE https://api.onesuite.io/v1/unified-tasks/:task_id/relation

Request Body Parameters

Parameter Type Required Description
relationId string Yes ID of the relation to remove
relationType string Yes Type of relation: "people", "company", or "opportunity"

CRM Relations

Get All CRM Relations

Get All Relations

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

The above command returns JSON structured like this:

{
    "status": "success",
    "relations": [
        {
            "id": "people_id",
            "name": "John Doe",
            "avatar": "https://example.com/avatar.jpg",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "type": "people"
        },
        {
            "id": "company_id",
            "name": "Acme Corporation",
            "logo": "https://example.com/logo.jpg",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "type": "company"
        },
        {
            "id": "opportunity_id",
            "name": "Q1 Enterprise Deal",
            "bgColor": "#FFDDC1",
            "fgColor": "#8B4513",
            "type": "opportunity"
        }
    ]
}

HTTP Request

GET https://api.onesuite.io/v1/crm/relations

Response Structure

The response contains an array of relations, where each relation object has:

Parameter Type Description
id string Unique identifier of the relation
name string Name of the relation
type string Type of relation: "people", "company", or "opportunity"
avatar string Avatar URL (for people)
logo string Logo URL (for companies)
bgColor string Background color
fgColor string Foreground color

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