v1

latestOpenAPI 3.0.3Proprietaryraw.githubusercontent.com2026-03-067260437.0 KB
Clients

Create client

Create a new client with fiscal information for Mexican tax compliance.

Duplicate Prevention (Upsert): Use the search parameter to find existing clients before creating:

  • If a match is found and search.update is false (default): Returns the existing client without modifications.
  • If a match is found and search.update is true: Updates the existing client with the provided data and returns it.
  • If no match is found: Creates a new client.

This is useful for integrations that may send the same client multiple times.

gigstack Connect: Create clients for other teams using the team parameter.

post/clients

Query parameters

teamstring

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

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

Example: ?team=team_xyz789

Request body

namestring required
companystring nullable
phonestring nullable
emailstring email nullable required
bccstring[]
metadataobject nullable
legal_namestring nullable
tax_idstring nullable
usestring nullable
tax_systemstring nullable

Example request

{
  "address": {
    "country": "MEX",
    "street": "Av. Insurgentes Sur",
    "zip": "03100",
    "city": "Ciudad de México",
    "state": "CDMX",
    "exterior": "123",
    "interior": "4B",
    "municipality": "Benito Juárez",
    "neighborhood": "Del Valle"
  },
  "name": "Juan Pérez García",
  "company": "Empresa SA de CV",
  "phone": "+52 55 1234 5678",
  "email": "juan.perez@ejemplo.com",
  "bcc": [
    "admin@empresa.com"
  ],
  "metadata": {
    "custom_field": "value"
  },
  "legal_name": "Juan Pérez García",
  "tax_id": "PEGJ800101ABC",
  "use": "P01",
  "tax_system": "601",
  "defaults": {
    "issue_invoiceable_receipts": true
  },
  "search": {
    "on_key": "tax_id",
    "on_value": "PEGJ800101ABC"
  }
}

Response

Existing client found (when using search parameter)

messagestring

Example response

{
  "message": "Existing client found",
  "data": {
    "id": "client_1234567890",
    "address": {
      "country": "MEX",
      "street": "Av. Insurgentes Sur",
      "zip": "03100",
      "city": "Ciudad de México",
      "state": "CDMX",
      "exterior": "123",
      "interior": "4B",
      "municipality": "Benito Juárez",
      "neighborhood": "Del Valle"
    },
    "name": "Juan Pérez García",
    "company": "Empresa SA de CV",
    "phone": "+52 55 1234 5678",
    "email": "juan.perez@ejemplo.com",
    "bcc": [
      "admin@empresa.com"
    ],
    "metadata": {
      "custom_field": "value"
    },
    "is_valid": true,
    "from": "api",
    "legal_name": "Juan Pérez García",
    "livemode": true,
    "owner": "user_1234567890",
    "tax_id": "PEGJ800101ABC",
    "use": "P01",
    "tax_system": "601",
    "team": "team_1234567890",
    "created_at": 1677651234,
    "efos": {
      "is_valid": true
    },
    "defaults": {
      "issue_invoiceable_receipts": true
    }
  }
}