Customers
Profile
Read and update the authenticated customer's profile.
View as MarkdownBoth profile endpoints are customer-authenticated: they require the tenant API key in Authorization and a valid customer session token in X-Customer-Token. Reading needs the customers:read scope, updating needs customers:write.
Both profile endpoints are customer-authenticated: they require the tenant API key in Authorization and a valid customer session token in X-Customer-Token. Reading needs the customers:read scope, updating needs customers:write.
GET /v1/api/customers/me
Fetch the authenticated customer's profile.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
X-Customer-Token | string | Yes | Customer session token from register or login. |
No query or body parameters.
Status: 200 OK.
Errors
401{"message":"Invalid customer token."}whenX-Customer-Tokenis missing or invalid.
curl https://api.borkol.com/v1/api/customers/me \
-H "Authorization: Bearer {api_key}" \
-H "X-Customer-Token: 13|Gh7rS2uX5vWy8zAbCdEfGhIjKlMnOpQrStUvWxYz"{
"data": {
"id": "9d4e2f1a-6b3c-4f8e-9a1d-2c5b7e8f0a3d",
"name": "Jane Doe",
"email": "jane@example.com",
"phone": "+31612345678",
"created_at": "2026-08-14T10:32:11+00:00"
}
}GET /v1/api/customers/me
Fetch the authenticated customer's profile.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
X-Customer-Token | string | Yes | Customer session token from register or login. |
No query or body parameters.
curl https://api.borkol.com/v1/api/customers/me \
-H "Authorization: Bearer {api_key}" \
-H "X-Customer-Token: 13|Gh7rS2uX5vWy8zAbCdEfGhIjKlMnOpQrStUvWxYz"Status: 200 OK.
{
"data": {
"id": "9d4e2f1a-6b3c-4f8e-9a1d-2c5b7e8f0a3d",
"name": "Jane Doe",
"email": "jane@example.com",
"phone": "+31612345678",
"created_at": "2026-08-14T10:32:11+00:00"
}
}Errors
401{"message":"Invalid customer token."}whenX-Customer-Tokenis missing or invalid.
PATCH /v1/api/customers/me
Update the authenticated customer's profile. This is a partial update: all body fields are optional and only the fields you send are changed. Changing the email of a non-guest account requires the account's current password in current_password.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
X-Customer-Token | string | Yes | Customer session token from register or login. |
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | Full name. Maximum 150 characters. |
email | string | No | Valid email address, maximum 255 characters. Lowercased server-side. Must not belong to another customer. Changing it on a non-guest account requires current_password. |
phone | string or null | No | Phone number, maximum 50 characters. Send null to clear. |
current_password | string | No | Required only when changing email on a non-guest account. Never stored; only checked. |
Status: 200 OK. Returns the updated customer.
Errors
422witherrors.current_password["Current password is required to change email."]when changing the email of a non-guest account withoutcurrent_password, or with a wrong one.422witherrors.email["Email already registered."]when the new email belongs to another customer.422for field validation failures.401{"message":"Invalid customer token."}whenX-Customer-Tokenis missing or invalid.
curl -X PATCH https://api.borkol.com/v1/api/customers/me \
-H "Authorization: Bearer {api_key}" \
-H "X-Customer-Token: 13|Gh7rS2uX5vWy8zAbCdEfGhIjKlMnOpQrStUvWxYz" \
-H "Content-Type: application/json" \
-d '{"name":"Jane A. Doe","phone":"+31612345678"}'{
"data": {
"id": "9d4e2f1a-6b3c-4f8e-9a1d-2c5b7e8f0a3d",
"name": "Jane A. Doe",
"email": "jane@example.com",
"phone": "+31612345678",
"created_at": "2026-08-14T10:32:11+00:00"
}
}PATCH /v1/api/customers/me
Update the authenticated customer's profile. This is a partial update: all body fields are optional and only the fields you send are changed. Changing the email of a non-guest account requires the account's current password in current_password.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
X-Customer-Token | string | Yes | Customer session token from register or login. |
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | Full name. Maximum 150 characters. |
email | string | No | Valid email address, maximum 255 characters. Lowercased server-side. Must not belong to another customer. Changing it on a non-guest account requires current_password. |
phone | string or null | No | Phone number, maximum 50 characters. Send null to clear. |
current_password | string | No | Required only when changing email on a non-guest account. Never stored; only checked. |
curl -X PATCH https://api.borkol.com/v1/api/customers/me \
-H "Authorization: Bearer {api_key}" \
-H "X-Customer-Token: 13|Gh7rS2uX5vWy8zAbCdEfGhIjKlMnOpQrStUvWxYz" \
-H "Content-Type: application/json" \
-d '{"name":"Jane A. Doe","phone":"+31612345678"}'Status: 200 OK. Returns the updated customer.
{
"data": {
"id": "9d4e2f1a-6b3c-4f8e-9a1d-2c5b7e8f0a3d",
"name": "Jane A. Doe",
"email": "jane@example.com",
"phone": "+31612345678",
"created_at": "2026-08-14T10:32:11+00:00"
}
}Errors
422witherrors.current_password["Current password is required to change email."]when changing the email of a non-guest account withoutcurrent_password, or with a wrong one.422witherrors.email["Email already registered."]when the new email belongs to another customer.422for field validation failures.401{"message":"Invalid customer token."}whenX-Customer-Tokenis missing or invalid.