---
title: "Create client"
method: POST
path: "/v2/organizations/{organization_id}/clients"
tags: ["clients"]
---

# Create client

`POST /v2/organizations/{organization_id}/clients`

## Request

- Base URL: `https://api.hubstaff.com`
- URL: `https://api.hubstaff.com/v2/organizations/{organization_id}/clients`
- Auth: OAuth 2
  - Authorization code: `https://account.hubstaff.com/authorizations/new`
  - Token URL: `https://account.hubstaff.com/access_tokens` scopes: `hubstaff:read`, `hubstaff:write`
- TypeScript: <https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/docs/v2/organizations/:organization_id/clients/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new client.

Returns the created client.

## Path parameters

- `organization_id` integer, required

## Request body

- PostV2OrganizationsOrganizationIdClients: Create client
  - `name` string, required: Client name
  - `emails` string[]: Default emails when sending an invoice
  - `phone` string: Client phone number
  - `address` string: Client address
  - `project_ids` string[]: Project IDs associated with this client
  - `invoice_notes` string: Notes (Shown on invoices)
  - `net_terms` integer: Amount of days the invoice must be paid once created
  - `metadata` object[]: Client metadata. See the update_metadata endpoint
    - `key` string, required: The metadata key
    - `value` string, required: The value for the metadata key
  - `budget` object: Budget configuration
    - `type` 'cost' | 'hours', required: The method for controlling the budget
    - `rate` 'bill_rate' | 'pay_rate': When budget type is cost, specifies which rate to use.
    - `cost` number, float: When budget type is cost. defines the cost limit.
    - `hours` number, float: When budget type is hours. defines the hours limit.
    - `start_date` string, date: The start date for the budget.
    - `recurrence` 'weekly' | 'monthly': If given, makes budget reset on a weekly or monthly basis
    - `recurrence_start` integer: Day of week (0-6, 0=Sunday) for weekly recurrence, or day of month (1-31) for monthly recurrence
    - `include_non_billable` boolean: Whether the budget includes non billable time
    - `stop_timer_when_budget_reached` boolean: Whether to stop timers when budget limit is reached
    - `stop_at` integer, required: The budget percentage at which timers stop automatically
    - `alerts` object
      - `near_limit` integer: The percentage threshold for notifying when approaching the budget.
      - `notify_enabled` boolean: Whether budget notifications are enabled
      - `notify_all_members` boolean: Whether to notify all project members
      - `notify_group` 'all_members' | 'org_management': The group to notify

## Response `200`

A client

- object
  - `client` Client: Client model
    - `id` integer, required: Client ID
    - `organization_id` integer, required: Organization ID
    - `name` string, required: Client Name
    - `emails` string[], required: Emails to default send invoices to
    - `phone` string, required: Phone Number
    - `address` string, required: Address
    - `project_ids` integer[], required: List of projects
    - `inherit_invoice_notes` boolean: True if the organizations invoice notes will be used
    - `invoice_notes` string: Notes (Shown on invoices)
    - `inherit_net_terms` boolean: True if the organizations net terms will be used
    - `net_terms` string: Amount of days the invoice must be paid once created
    - `status` string, required: Client status
    - `created_at` string, date-time, required: When the record was created
    - `updated_at` string, date-time, required: When the record was last updated
    - `budget` Budget
      - `type` string, required: The budget type
      - `rate` string: The budget rate type
      - `cost` number, float: The budget cost limit
      - `hours` number, float: The budget hours limit
      - `start_date` string, date: The budget start date
      - `alerts` object, required
        - `near_limit` integer, required: The budget near limit percentage
        - `notify_enabled` boolean, required: Whether budget notifications are enabled
        - `notify_all_members` boolean, required: Whether to notify all project members
        - `notify_group` string: The group to notify
      - `recurrence` string: The budget recurrence frequency
      - `recurrence_start` integer: Day of week (0-6, 0=Sunday) for weekly recurrence, or day of month (1-31) for monthly recurrence
      - `include_non_billable` boolean, required: Whether the budget includes non-billable time
      - `stop_timer_when_budget_reached` boolean, required: Whether to stop timers when budget is reached
      - `stop_at` integer: The budget percentage at which timers stop
    - `metadata` object, required: Metadata attached to the client

## Other responses

- `400`: Invalid parameters
- `401`: Unauthorized
- `403`: API access is only for organizations on an active plan
- `404`: Could not find record
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api.md) - [All operations](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/revisions/c6b90e4e4bdc?raw)
