Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
Customers Update a customer

Update a customer

Updates the fields you send on one customer. The path `customer_id` selects the customer and replaces any `customer_id` in the body. Empty values change nothing, the customer type cannot change, and KYC status is not reset. The response does not include the customer. Get the customer to read the result.

PUThttps://api.gravv.xyz/v1/customers/{customer_id}Try it
Api-Key

Path parameters

NameDescription
customer_id:stringRequired
The customer to update. It replaces any customer_id in the body.

Body parameters

NameDescription
customer_id:string
Ignored. The path customer_id replaces any value you send.
first_name:string
Letters, spaces, apostrophes and hyphens only.
middle_name:string
Optional. At most 40 characters. Letters, with single spaces, hyphens or apostrophes between them. A period or a digit is refused. Write the name without accents, as for first_name. Gravv saves the value without leading or trailing spaces.
last_name:string
Letters, spaces, apostrophes and hyphens only.
email:string
New email. It must be unique in your tenant and use a company domain, for every customer type.
phone:string
A valid phone number in international format with a leading +, such as +2348031234567. Fictional ranges such as +1 555-01xx are rejected.
date_of_birth:string
gender:string
Possible values: male, female, other
address:object
New address. The state and country check runs only when you send both.
Show 6 child attributesobject
business_name:string
business_description:string
business_type:string
business_industry:string
registration_number:string
external_id:string
associated_persons:object[]
Business customers only. Ignored for individuals. Send id to edit a person. Omit it to add a new person, who then needs first_name, last_name, email, gender, date_of_birth, phone and address.
Show 9 child attributesobject[]

Response

Returns 200 OK. Customer updated

NameDescription
data:object
Show 2 child attributesobject
error:null

Errors

StatusMeaning
200Customer updated
400Invalid field, or the customer is not in your tenant
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request PUT \
--url 'https://api.gravv.xyz/v1/customers/e59daa17-20ed-4727-833c-e1c633782cc8' \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"first_name": "Jane",
"last_name": "Smith",
"phone": "+2348031234568"
}'
Responseapplication/json
200400OK
{
"data": {
"message": "customer updated successfully",
"status": true
},
"error": null
}