Skip to main content
POST
/
v1
/
customers
/
{id}
Update a Customer
curl --request POST \
  --url https://api.leanrails.com/v1/customers/{id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "email": "jsmith@example.com",
  "name": "<string>",
  "phone": "<string>",
  "description": "<string>",
  "metadata": {}
}
'
{
  "id": "cus_xxx",
  "object": "customer",
  "livemode": false,
  "created": 1234567890,
  "merchant_id": "mer_xxx",
  "email": "jsmith@example.com",
  "name": "<string>",
  "phone": "<string>",
  "description": "<string>",
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Use your secret API key as the username with an empty password.

Headers

Idempotency-Key
string
required

Unique key to ensure idempotent requests.

Maximum string length: 255
X-API-Version
string

Override the API version for this request.

Path Parameters

id
string
required

Body

application/json
email
string<email>
name
string
Maximum string length: 256
phone
string
Maximum string length: 64
description
string
Maximum string length: 1000
metadata
object

Set of key-value pairs for storing additional information.

Response

The updated Customer.

id
string
required
Example:

"cus_xxx"

object
enum<string>
required
Available options:
customer
livemode
boolean
required
Example:

false

created
integer
required
Example:

1234567890

merchant_id
string
Example:

"mer_xxx"

email
string<email> | null
name
string | null
phone
string | null
description
string | null
metadata
object

Set of key-value pairs for storing additional information.