Create a client company
curl --request POST \ --url https://example.com/api/v1/clients \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "address": "example", "companyName": "example", "currency": "example", "name": "example", "paymentTerms": { "kind": "NET_DAYS", "value": 1 }, "phone": "example", "prefix": "example", "statusId": "example", "tagIds": [], "taxId": "example" }'Creates a client company. Requires the clients.create or settings.manage permission, as New company does. Client company names are unique; a taken name returns 409 with error.fieldErrors.name. name is the internal working label the team files the client under; companyName is the legal name printed on invoices, estimates and the portal, and falls back to name when unset. taxId and phone are the client company’s own fiscal identity and contact number; companyName, taxId and phone are all trimmed and stored as null when blank. prefix is the company’s order code prefix: 2 to 10 letters or digits, stored uppercase, unique within the workspace; new order codes for the company will start with it, and blank or omitted takes a free prefix suggested from the name (GET /clients/prefix-suggestion previews it); the response carries the prefix. A malformed prefix returns 422 and one another company carries returns 409, both with error.fieldErrors.prefix. tagIds attaches tags at creation time. paymentTerms gives the company its own payment terms (net days, or a day of the month); null or omitted follows the workspace’s. When 1Password is connected, the company’s vault is created in the background.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
The company’s own payment terms; null or omitted follows the workspace’s. Applies to invoices issued from then on: renewals, sales and new invoices. Invoices already issued keep their due dates. Days are counted in the workspace timezone.
object
NET_DAYS: due value days after the issue day (0-365). DAY_OF_MONTH: due on the next day value (1-31) strictly after the issue day; a month without that day uses its last.
The client company’s phone number. Trimmed; an empty string is stored as null.
The company’s order code prefix: 2 to 10 letters or digits, stored uppercase and unique within the workspace. New order codes for the company will start with it. Blank, null or omitted takes a free prefix suggested from the name; the response carries it.
Defaults to the workspace’s “Client” system status when omitted. Lead, Contact and Spam describe people and are refused (422).
Tags to attach on creation. A fresh client has no prior tags to preserve.
The client company’s tax identifier. Trimmed; an empty string is stored as null.
Responses
Section titled “Responses”The created client company.
object
A billable client.
object
Addresses every invoice email and payment reminder of the company goes to besides the contact the invoice is addressed to, up to 5. Empty only matters for an invoice with no reachable contact, which then goes to the company’s Billing contact, else its primary, else its oldest active portal contact.
The client’s legal name, printed on invoices, estimates and the portal. name stays the internal working label the team files the client under and is never shown on a client-facing document. Null falls back to name – see clientLegalName.
Direct Access grants – a MANAGER-level grant is the client’s responsible. Present on single-client reads; omitted from list responses.
A workspace member with Direct Access to a client. A MANAGER-level grant is the client’s responsible, receiving its projects’ alerts and the daily hours report.
object
MANAGER is the resource’s responsible: it receives the resource’s alerts and hours report, in addition to Direct Access like any MEMBER.
Every email domain of the company, its first one first, then the extras in the order they were added. Present on single-client reads; omitted from list responses, and absent on a server older than this field.
The payment-reminder schedule every invoice of the company follows in place of the workspace’s. Null means the company follows the workspace schedule.
object
Days after an invoice’s due date, counted in the workspace timezone, before the first reminder.
Most reminders one invoice receives when they repeat. Stored as 1 while repeatEveryDays is 0.
Days between reminders while the invoice stays unpaid. 0 sends a single reminder.
While true, none of the company’s invoices, present or future, get payment reminders.
The terms the company’s new invoices are due by. Null means the workspace’s payment terms (net days, see GET /invoice-settings).
object
NET_DAYS: due value days after the issue day (0-365). DAY_OF_MONTH: due on the next day value (1-31) strictly after the issue day; a month without that day uses its last.
The company’s order code prefix: 2 to 10 letters or digits, uppercase, unique within the workspace. New order codes for the company start with it, like ACME-HOURS-6. Null until someone sets it.
Roles reaching the whole client, then roles limited to one of its projects (projectId set). Present on single-client reads; omitted from list responses.
A role assigned to a client, granting inherited access to its orders and projects, or to one of its projects.
object
The company project the role is limited to; null when it reaches the whole company.
The client’s status in the workspace catalog – see GET /clients/statuses. Null means unassigned.
A workspace tag attached to a client.
object
The client company’s tax identifier (VAT, EIN, RFC…). Null when unknown.
Present on single-client reads; omitted from list responses.
A team assigned to a client, granting inherited access to its orders.
object
Whether the company’s Billing contacts get the weekly hours balance email every Monday. Absent on a server older than this field.
Example
{ "data": { "directAccess": [ { "level": "MANAGER" } ], "paymentTerms": { "kind": "NET_DAYS" } }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Forbidden.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}One or more tags not found.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}A client company with this name already exists (error.fieldErrors.name), or another company carries the prefix (error.fieldErrors.prefix).
Error envelope with field-level messages.
object
object
Stable machine-readable error code.
Message per offending field; a list item is keyed <field>.<index>.<key>.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Invalid input, with field-level messages.
Error envelope with field-level messages.
object
object
Stable machine-readable error code.
Message per offending field; a list item is keyed <field>.<index>.<key>.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC