---
title: "Create a client"
method: POST
path: "/v1/clients"
tags: ["Clients"]
---

# Create a client

`POST /v1/clients`

## Request

- Base URL: `https://api.frihet.io`
- URL: `https://api.frihet.io/v1/clients`
- Auth: API key in header `X-API-Key`

Add a new client to your database.

If `taxId` is provided and another client in your workspace already has the
same taxId (normalized: case-insensitive, ignoring separators like dots and
hyphens), the request is rejected with `409 CLIENT_TAXID_EXISTS` and the
existing client's id is returned in `existingClientId`.

## Request body

- ClientCreate
  - `name` string, required: Client name (person or company)
  - `email` string, email: Contact email
  - `phone` string: Phone number
  - `taxId` string: Tax identification number (NIF/CIF/VAT)
  - `address` Address: Structured address. Canonical fields are `province` and `zip`. The aliases `state` and `postalCode` are also accepted for backward compatibility.
    - `street` string
    - `city` string
    - `province` string: Province or state (canonical field)
    - `zip` string: Postal/ZIP code (canonical field)
    - `country` string
    - `state` string: Alias for `province` (backward compatibility)
    - `postalCode` string: Alias for `zip` (backward compatibility)
  - `integrationSource` 'hubspot' | 'pipedrive' | 'intercom' | 'mailchimp': Source integration when the client is imported from an external CRM or marketing tool.
  - `nextAction` ClientNextAction
    - `title` string, required: Current next step for this client.
    - `dueDate` string, date: Optional due date for the next action.
    - `status` 'open' | 'done', required: Whether the next action is still open or already completed.
    - `source` 'manual' | 'api' | 'integration' | 'system': Origin of the next action.
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `completedAt` string, date-time

## Response `201`

Client created

- Client
  - `id` string: Unique identifier
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `name` string, required: Client name (person or company)
  - `email` string, email: Contact email
  - `phone` string: Phone number
  - `taxId` string: Tax identification number (NIF/CIF/VAT)
  - `address` Address: Structured address. Canonical fields are `province` and `zip`. The aliases `state` and `postalCode` are also accepted for backward compatibility.
    - `street` string
    - `city` string
    - `province` string: Province or state (canonical field)
    - `zip` string: Postal/ZIP code (canonical field)
    - `country` string
    - `state` string: Alias for `province` (backward compatibility)
    - `postalCode` string: Alias for `zip` (backward compatibility)
  - `integrationSource` 'hubspot' | 'pipedrive' | 'intercom' | 'mailchimp': Source integration when the client is imported from an external CRM or marketing tool.
  - `nextAction` ClientNextAction
    - `title` string, required: Current next step for this client.
    - `dueDate` string, date: Optional due date for the next action.
    - `status` 'open' | 'done', required: Whether the next action is still open or already completed.
    - `source` 'manual' | 'api' | 'integration' | 'system': Origin of the next action.
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `completedAt` string, date-time

## Other responses

- `400`: Bad request - invalid parameters or request body
- `401`: Authentication required or invalid API key
- `409`: A client with this taxId already exists in your workspace.
- `429`: Rate limit exceeded (100 requests per minute)
- `500`: Internal server error

---

[API](https://skmtc.dev/frihet/apis/frihet-api.md) · [All operations](https://skmtc.dev/frihet/apis/frihet-api/llms.txt) · [OpenAPI document](https://skmtc.dev/frihet/apis/frihet-api/revisions/3dd37f6a72d1?raw)
