---
title: "Create Client"
method: POST
path: "/clients.json"
tags: ["Clients"]
---

# Create Client

`POST /clients.json`

Creates a new client.

## Query parameters

- `api_key` string, required

## Request body

- ClientRequest
  - `client` object, required
    - `name` string, required
    - `code` string, required — Maximum length is the database default, not an enforced business rule.
    - `email` string
    - `language` 'en' | 'pt' | 'es'
    - `address` string — No enforced character limit (text column).
    - `city` string — Maximum length is the database default, not an enforced business rule.
    - `postal_code` string — Maximum length is the database default, not an enforced business rule.
    - `country` string — Maximum length is the database default, not an enforced business rule.
    - `fiscal_id` string — Maximum length is the database default, not an enforced business rule.
    - `website` string
    - `phone` string
    - `fax` string
    - `preferred_contact` object — The preferred contact details.
      - `name` string — Contact-level name has no length validation, unlike the client-level `name` (max 100); the limit shown is the database default.
      - `email` string — Contact-level email allows one character more than the client-level `email` (max 254).
      - `phone` string — Contact-level phone has no length validation, unlike the client-level `phone` (max 20); the limit shown is the database default.
    - `observations` string — No enforced character limit (text column).
    - `send_options` '1' | '2' | '3'

## Response `201`

SUCCESS

- ClientsGetResponse
  - `client` object
    - `id` integer
    - `name` string
    - `code` string, nullable — Maximum length is the database default, not an enforced business rule.
    - `language` string, nullable — Maximum length is the database default, not an enforced business rule.
    - `email` string, nullable
    - `address` string, nullable — No enforced character limit (text column).
    - `city` string, nullable — Maximum length is the database default, not an enforced business rule.
    - `postal_code` string, nullable — Maximum length is the database default, not an enforced business rule.
    - `fiscal_id` string, nullable — Maximum length is the database default, not an enforced business rule.
    - `website` string, nullable
    - `country` string, nullable — Maximum length is the database default, not an enforced business rule.
    - `phone` string, nullable
    - `fax` string, nullable
    - `preferred_contact` object — May be an empty object when no preferred contact is set.
      - `name` string, nullable — Contact-level name has no length validation, unlike the client-level `name` (max 100); the limit shown is the database default.
      - `email` string, nullable — Contact-level email allows one character more than the client-level `email` (max 254).
      - `phone` string, nullable — Contact-level phone has no length validation, unlike the client-level `phone` (max 20); the limit shown is the database default.
      - `mobile` string, nullable — Digits only (4-14). Validated against /\A\d{4,14}\z/.
    - `observations` string, nullable — No enforced character limit (text column).
    - `open_account_link` string
    - `send_options` integer, nullable
    - `payment_days` integer, nullable
    - `tax_exemption_code` string, nullable — Maximum length is the database default, not an enforced business rule.

## Other responses

- `401` — ACCESS DENIED
- `422` — UNPROCESSABLE ENTITY

---

[API](https://skmtc.dev/invoicexpress/apis/invoicexpress-api.md) · [All operations](https://skmtc.dev/invoicexpress/apis/invoicexpress-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/invoicexpress/invoicexpress-api/revisions/5b82d4eb0d9f/schema)
