Skip to main content
PUT
Update client

Authorizations

Authorization
string
header
required

Authentication Method: HTTP Bearer token.

The runtime requires the literal Bearer prefix — a bare token in the Authorization header is rejected with 401 unauthorized.

Header Format: Authorization: Bearer YOUR_API_KEY

Your API key is a JWT. Live keys operate on live data (livemode: true); test keys operate on isolated test data (livemode: false).

Get your key at: app.gigstack.pro/settings?tab=api

Errors: credential failures are answered by the authentication layer with a raw { "message": … } body, not the standardized envelope — 401 for a missing, malformed or expired token, 403 for a revoked key or a plan without API access. See the Unauthorized and AuthForbidden responses.

Path Parameters

id
string
required

Query Parameters

team
string

gigstack Connect: Target team ID for multi-team access.

Requires gigstack Connect enabled on your team and shared billing account.

Also requires the multipleIssuerAccounts feature on your plan. Requests targeting a team other than the one your API key belongs to return 403 without it.

Only API keys can use it: an OAuth access token sent with another team's id is rejected with 403 Team mismatch with OAuth token.

Optional — omit it entirely unless you are acting on another team. It deliberately carries no example value so generated snippets do not emit ?team=undefined; when the parameter is absent, the team is derived from your API key.

Example: ?team=team_xyz789

Body

application/json

Update body for PUT /v2/clients/{id}. An omitted name is preserved from the existing client before validation. Send only the profile fields you intend to change; creation uses the separate ClientInput schema.

Unknown top-level keys are rejected (400 validation_failed / unexpected_key); metadata is the one object that accepts arbitrary keys. team, livemode and owner are reserved and injected by the auth middleware.

The document_type, organization_type, tribute_code, fiscal_responsibilities, dv and municipality_code fields are the Colombian DIAN identification set. They are accepted for every team regardless of country; each also accepts the empty string, which means "not set" and is dropped before the client is stored.

search
object | null

Search for an existing client before creating. If a match is found, the existing client is returned (or updated if update: true). This enables upsert-like behavior to avoid duplicate clients.

address
object | null
name
string
Example:

"Juan Pérez García"

company
string | null
Example:

"Empresa SA de CV"

phone
string | null
Example:

"+52 55 1234 5678"

email
string<email> | null
Example:

"juan.perez@ejemplo.com"

bcc
string[]
Example:
metadata
object
Example:
Example:

"Juan Pérez García"

tax_id
string | null
Example:

"PEGJ800101ABC"

use
string | null
Example:

"G03"

tax_system
string | null
Example:

"601"

defaults
object
document_type
enum<string> | null

Colombia (DIAN). Identification document code. 11 registro civil, 12 tarjeta de identidad, 13 cédula de ciudadanía, 21 tarjeta de extranjería, 22 cédula de extranjería, 31 NIT, 41 pasaporte, 42 documento de identificación extranjero, 47 PEP, 48 PPT, 50 NIT de otro país, 91 NUIP. The empty string means "not set" and is dropped before the client is stored.

Available options:
,
11,
12,
13,
21,
22,
31,
41,
42,
47,
48,
50,
91,
null
Example:

"31"

organization_type

Colombia (DIAN). 1 = persona jurídica, 2 = persona natural. Accepted as either a number (1, 2) or a string ("1", "2"). The empty string means "not set".

Available options:
,
1,
2,
null
Example:

"2"

tribute_code
enum<string> | null

Colombia (DIAN). 01 = responsable de IVA, ZZ = no aplica. The empty string means "not set".

Available options:
,
01,
ZZ,
null
Example:

"01"

fiscal_responsibilities
enum<string>[] | null

Colombia (DIAN). Responsabilidades fiscales del cliente (lista 53). O-13 gran contribuyente, O-15 autorretenedor, O-23 agente de retención de IVA, O-47 régimen simple de tributación, R-99-PN no responsable. Omit the field (or send an empty array) to leave it unset — the client is then reported as R-99-PN, which is also the value that applies when the array carries only that code. R-99-PN excludes every O-* code: if both are sent, only the O-* ones are reported.

Available options:
O-13,
O-15,
O-23,
O-47,
R-99-PN
Example:
dv
string | null

Colombia (DIAN). NIT verification digit — a single digit, or the empty string for "not set".

Pattern: ^[0-9]?$
Example:

"7"

municipality_code
string | null

Colombia (DIAN). DANE municipality code — exactly five digits, or the empty string for "not set". Only meaningful for clients domiciled in Colombia.

Pattern: ^([0-9]{5})?$
Example:

"05001"

check_pending_receipts
boolean
default:true

Only applies to PUT /clients/{id}. When true (default) and the updated client passes fiscal validation, all of the client's pending receipts are automatically invoiced using the new client data. Set to false to skip this behavior.

Example:

true

Response

Client updated successfully

message
string
Example:

"Client updated successfully"

data
object