Skip to main content
PUT
/
organizations
/
{organizationId}
/
customers
/
{customerId}
Update a customer
curl --request PUT \
  --url http://sandbox.mintlify.com/organizations/{organizationId}/customers/{customerId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "legalName": "Dunder Mifflin",
  "taxId": "ABC101010111",
  "taxSystem": "601",
  "email": "email@example.com",
  "phone": "6474010101",
  "defaultInvoiceUse": "G01",
  "addressStreet": "<string>",
  "addressExterior": "<string>",
  "addressInterior": "<string>",
  "addressNeighborhood": "<string>",
  "addressCity": "<string>",
  "addressMunicipality": "<string>",
  "addressZip": "<string>",
  "addressState": "<string>",
  "addressCountry": "<string>"
}
'
{
  "id": "590ce6c56d04f840aa8438af",
  "organizationId": "org-uuid",
  "legalName": "Dunder Mifflin",
  "taxId": "ABC101010111",
  "taxSystem": "601",
  "email": "email@example.com",
  "defaultInvoiceUse": "G01",
  "address": {
    "street": "Blvd. Atardecer",
    "exterior": "142",
    "neighborhood": "Centro",
    "city": "Huatabampo",
    "municipality": "Huatabampo",
    "zip": "86500",
    "state": "Sonora",
    "country": "MEX",
    "interior": "4"
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "phone": "6474010101"
}
Updates a customer’s information. All fields are optional — only send what you want to change.

Authentication

Requires a valid Bearer token. The authenticated user must be a member of the organization.

Path Parameters

ParameterTypeRequiredDescription
organizationIdstring (UUID)YesOrganization ID
customerIdstringYesCustomer ID

Request Body

All fields are optional.
FieldTypeDescription
legalNamestringLegal name (Razón Social)
taxIdstringRFC del receptor
taxSystemstringSAT tax system code
emailstringCustomer email
phonestringPhone number
defaultInvoiceUsestringDefault CFDI use code
addressStreetstringStreet name
addressExteriorstringExterior number
addressInteriorstringInterior number
addressNeighborhoodstringNeighborhood (Colonia)
addressCitystringCity
addressMunicipalitystringMunicipality
addressZipstring5-digit ZIP code
addressStatestringState
addressCountrystringCountry code

Example Request

curl -X PUT http://localhost:3001/api/organizations/550e8400-e29b-41d4-a716-446655440000/customers/590ce6c56d04f840aa8438af \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "new-billing@dundermifflin.com",
    "phone": "6474019999"
  }'

Example Response

{
  "id": "590ce6c56d04f840aa8438af",
  "organizationId": "550e8400-e29b-41d4-a716-446655440000",
  "legalName": "Dunder Mifflin",
  "taxId": "DUM901231AB3",
  "taxSystem": "601",
  "email": "new-billing@dundermifflin.com",
  "phone": "6474019999",
  "defaultInvoiceUse": "G01",
  "address": {
    "street": "Blvd. Atardecer",
    "exterior": "142",
    "interior": null,
    "neighborhood": "Centro",
    "city": "Huatabampo",
    "municipality": "Huatabampo",
    "zip": "86500",
    "state": "Sonora",
    "country": "MEX"
  },
  "createdAt": "2025-01-26T10:00:00Z",
  "updatedAt": "2025-01-26T10:05:00Z"
}

Common Errors

400 Bad Request

Invalid field value (e.g. wrong RFC format or ZIP code).

401 Unauthorized

Authentication required.

403 Forbidden

User is not a member of this organization.

404 Not Found

Customer not found.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required
customerId
string
required

Body

application/json

Customer legal name

Example:

"Dunder Mifflin"

taxId
string

Mexican RFC

Example:

"ABC101010111"

taxSystem
string

SAT tax system code

Example:

"601"

email
string

Customer email

Example:

"email@example.com"

phone
string

Customer phone

Example:

"6474010101"

defaultInvoiceUse
string

Default CFDI use code

Example:

"G01"

addressStreet
string

Street name

addressExterior
string

Exterior number

addressInterior
string

Interior number

addressNeighborhood
string

Neighborhood

addressCity
string

City

addressMunicipality
string

Municipality

addressZip
string

ZIP code

addressState
string

State

addressCountry
string

Country code

Response

200 - application/json
id
string
required
Example:

"590ce6c56d04f840aa8438af"

organizationId
string
required
Example:

"org-uuid"

Example:

"Dunder Mifflin"

taxId
string
required
Example:

"ABC101010111"

taxSystem
string
required
Example:

"601"

email
string
required
Example:

"email@example.com"

defaultInvoiceUse
string
required
Example:

"G01"

address
object
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
phone
object
Example:

"6474010101"