---
title: "Atualizar cliente"
method: PATCH
path: "/v1/customers/{id}"
tags: ["Clientes"]
---

# Atualizar cliente

`PATCH /v1/customers/{id}`

## Request

- Base URL: `https://api-payment.safefypay.com.br`
- URL: `https://api-payment.safefypay.com.br/v1/customers/{id}`
- Auth: HTTP bearer

Atualiza os dados de um cliente existente. Apenas os campos enviados serao atualizados.

## Path parameters

- `id` string, uuid, required

## Request body

- UpdateCustomerRequest
  - `name` string, nullable: Nome do cliente
  - `email` string, nullable: E-mail do cliente
  - `document` string, nullable: CPF ou CNPJ
  - `documentType` 'CPF' | 'CNPJ', nullable: Tipo do documento
  - `phone` string, nullable: Telefone com codigo do pais. Aceita com ou sem '+' no envio e e salvo apenas com digitos.
  - `status` 'Active' | 'Inactive', nullable: Status do cliente
  - `metadata` string, nullable: Metadados em JSON

## Response `200`

Cliente atualizado

- UpdateCustomerResponse
  - `data` CustomerData, nullable
    - `id` string, uuid: ID unico do cliente
    - `externalId` string, nullable: ID externo informado
    - `name` string: Nome do cliente
    - `email` string: E-mail do cliente
    - `document` string, nullable: CPF/CNPJ formatado
    - `documentType` 'CPF' | 'CNPJ', nullable: Tipo do documento
    - `phone` string, nullable: Telefone com codigo do pais, salvo apenas com digitos
    - `status` 'Active' | 'Inactive': Status do cliente
    - `metadata` string, nullable: Metadados
    - `address` CustomerAddress, nullable
      - `street` string, nullable
      - `number` string, nullable
      - `complement` string, nullable
      - `neighborhood` string, nullable
      - `city` string, nullable
      - `state` string, nullable
      - `postalCode` string, nullable
      - `country` string, nullable
    - `createdAt` string, date-time: Data de criacao
  - `message` string, nullable
  - `error` ApiErrorResponse, nullable
    - `message` string: Mensagem de erro
    - `code` string: Codigo do erro

## Other responses

- `400`: Dados invalidos
- `401`: Nao autorizado
- `404`: Cliente nao encontrado

## Changes

- **2026-01-18** `b1ec8dd7262c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/safefy-pay/apis/safefy-pix-gateway/changes/v1/customers/:id/patch.md)

---

[API](https://skmtc.dev/safefy-pay/apis/safefy-pix-gateway.md) - [All operations](https://skmtc.dev/safefy-pay/apis/safefy-pix-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/safefy-pay/apis/safefy-pix-gateway/revisions/57157be53ccc?raw)
