Customers

Update a customer

PUT
/v1/customers/{customerId}

Authorization

selectkey<token>

API key para requisições autenticadas. Envie sua chave no cabeçalho selectkey (sandbox sk_test_…, produção sk_live_…).

In: header

Path Parameters

customerId*string

Public identifier (cus_…)

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/customers/string" \  -H "Content-Type: application/json" \  -d '{    "firstName": "João",    "lastName": "Silva",    "email": "[email protected]",    "document": {      "type": "cpf",      "number": "string"    },    "telephone": {      "countryCode": "id_0a1b2c3d4e5f60718293",      "areaCode": "id_0a1b2c3d4e5f60718293",      "number": "id_0a1b2c3d4e5f60718293",      "line": "id_0a1b2c3d4e5f60718293"    },    "externalReference": "string",    "gender": "male",    "birthdate": "id_0a1b2c3d4e5f60718293",    "additionalEmails": [      "[email protected]"    ],    "metadata": {}  }'
{
  "id": "cus_0a1b2c3d4e5f60718293",
  "firstName": "João",
  "lastName": "Silva",
  "email": "[email protected]",
  "document": {
    "type": "cpf",
    "number": "string"
  },
  "telephone": {
    "countryCode": "string",
    "areaCode": "string",
    "number": "string",
    "line": "string"
  },
  "birthdate": "string",
  "gender": "string",
  "available": true,
  "delinquent": true,
  "externalReference": "string",
  "additionalEmails": [
    "string"
  ],
  "metadata": {},
  "createdAt": "string",
  "updatedAt": "string",
  "merchant": {
    "name": "Acme Ltda",
    "merchantId": "string",
    "isSubAccount": true
  },
  "_links": {}
}
{
  "error": {
    "status": "Bad Request",
    "statusCode": 400,
    "category": "validation",
    "code": "invalidParameters",
    "message": "Validation errors occurred.",
    "resource": "server"
  }
}
{
  "error": {
    "status": "Unauthorized",
    "statusCode": 401,
    "category": "authentication",
    "code": "unauthorized",
    "message": "Authentication is required to access this resource.",
    "resource": "server"
  }
}
{
  "error": {
    "status": "Forbidden",
    "statusCode": 403,
    "category": "authorization",
    "code": "forbidden",
    "message": "You do not have permission to perform this action.",
    "resource": "server"
  }
}
{
  "error": {
    "status": "Internal Server Error",
    "statusCode": 500,
    "category": "server",
    "code": "notFound",
    "message": "An unexpected error occurred.",
    "resource": "server"
  }
}
{
  "error": {
    "status": "Internal Server Error",
    "statusCode": 500,
    "category": "server",
    "code": "serverError",
    "message": "An unexpected error occurred. Please try again later.",
    "resource": "server",
    "details": "If the problem persists, contact support with the correlationId from the response headers."
  }
}