Update customer
Updates one owned customer.
PATCH
/v1/customers/{customerId}Authorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
customerIdstringrequiredCustomer identifier.
Request body
requiredapplication/jsonnamestringmin length 1 · max length 120
phonestringmatches ^\+?[0-9()\s-]{7,20}$
channelsstring[]min items 1
Responses
200Customer updated successfully.
idstringrequirednamestringrequiredmin length 1 · max length 120
phonestringrequiredmatches ^\+?[0-9()\s-]{7,20}$
channelsstring[]requiredmin items 1
404Customer not found.
codestringrequiredmessagestringrequiredRequest
curl -X PATCH "https://api.hackathon.space/v1/customers/string" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"phone": "string",
"channels": [
"telegram"
]
}'const response = await fetch("https://api.hackathon.space/v1/customers/string", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"phone": "string",
"channels": [
"telegram"
]
})
});import requests
response = requests.patch(
"https://api.hackathon.space/v1/customers/string",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"name": "string",
"phone": "string",
"channels": [
"telegram"
]
},
)Response
{
"id": "cus_123",
"name": "Jane Doe",
"phone": "+60123456789",
"channels": [
"telegram",
"twilio-sms"
]
}{
"code": "NOT_FOUND",
"message": "Resource not found."
}