Overview
POST
/customer/refreshcustomerRotate a live customer session (presented refresh token is single-use)
Create a record in refresh.
Auth: bearerAuth — calls run as the authenticated user.
Request body
application/json · optional
- refreshTokenstring
The opaque refresh token from a prior login/refresh.
Example
{
"refreshToken": "string"
}Responses
200
new customer access token + rotated refresh token + customerId
- tokenstring
End-customer access token (typ='customer' JWT, short-lived)
- refreshTokenstring
Opaque customer-session refresh token (single-use; rotated on refresh)
- customerIdstring
The end-customer id
Example
{
"token": "string",
"refreshToken": "string",
"customerId": "string"
}400
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/customer/refresh" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"refreshToken": "string"
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/customer/refresh", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"refreshToken\": \"string\"\n}",
});
const data = await res.json();