Skip to main content
PATCH
/
customers
/
{customerId}
Update a customer
curl --request PATCH \
  --url https://api.useproxy.ai/v1/customers/{customerId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "phone": "<string>",
  "name": {
    "first": "<string>",
    "last": "<string>"
  },
  "policy": {
    "requireIntent": true,
    "requireAttestation": true,
    "requireApproval": true,
    "autoApproveBelow": 123,
    "attestationWindowMinutes": 123,
    "cooldownMinutes": 123,
    "ttlMinutes": 123,
    "ttlDays": 123,
    "limits": {
      "perAuth": 123,
      "perDay": 123,
      "perMonth": 123
    },
    "allowedMccs": [
      "<string>"
    ],
    "blockedMccs": [
      "<string>"
    ],
    "allowedMerchants": [
      "<string>"
    ],
    "lockToFirstMerchant": true
  },
  "metadata": {}
}
'
{
  "id": "<string>",
  "type": "consumer",
  "status": "pending",
  "email": "<string>",
  "phone": "<string>",
  "name": {
    "first": "<string>",
    "last": "<string>"
  },
  "policy": {
    "requireIntent": true,
    "requireAttestation": true,
    "requireApproval": true,
    "autoApproveBelow": 123,
    "attestationWindowMinutes": 123,
    "cooldownMinutes": 123,
    "ttlMinutes": 123,
    "ttlDays": 123,
    "limits": {
      "perAuth": 123,
      "perDay": 123,
      "perMonth": 123
    },
    "allowedMccs": [
      "<string>"
    ],
    "blockedMccs": [
      "<string>"
    ],
    "allowedMerchants": [
      "<string>"
    ],
    "lockToFirstMerchant": true
  },
  "metadata": {},
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as Bearer <api_key>.

Headers

Idempotency-Key
string

Unique key for idempotent requests (24-hour cache)

Path Parameters

customerId
string
required

Customer ID (e.g., cus_...)

Body

application/json
email
string
phone
string
name
object
policy
object

Spending policy controls

metadata
object

Response

Customer updated

id
string
required

Unique customer ID

type
enum<string>
required

Customer type

Available options:
consumer,
corporate
status
enum<string>
required

Customer status

Available options:
pending,
active,
deleted
email
string | null

Customer email

phone
string | null

Customer phone number

name
object
policy
object

Spending policy controls

metadata
object

Custom metadata

createdAt
string<date-time> | null