Update a customer

Only the fields sent change.

PATCH/v1/customers/{id}

Path Parameters

  • idstringrequired

Body Parameters

  • namestring

    At most 200 characters. Nullable.

  • external_idstring

    Your id for them; unique per account At most 200 characters. Nullable.

  • metadataobject

    Up to 50 string values

Details

metadata replaces the whole object; null clears a field.

Responses

  • 200Customer

    The customer

  • 401Error

    Missing, malformed, or revoked API key

  • 402Error

    Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged

  • 404Error

    Not found

  • 409Error

    external_id already used

  • 429Error

    Rate limit or quota exceeded

Response Fields

  • idstring

    Example: cus_a1B2c3D4e5F6g7.

  • objectcustomer
  • namestring

    Nullable.

  • external_idstring

    Nullable.

  • metadataobject
  • created_atstring (date-time)
  • updated_atstring (date-time)
  • phone_numbersarray of string

    Only on retrieve

Errors

Every error has the same JSON shape, and request_id matches the X-Request-Id response header. Errors lists every code and what to do about it.

  • 401

    Missing, malformed, or revoked API key

  • 402

    Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged

  • 404

    Not found

  • 409

    external_id already used

  • 429

    Rate limit or quota exceeded