Overview
POST
/customer/logincustomerAuthenticate one of the caller's end-customers (email + password)
Create a record in login.
Auth: bearerAuth — calls run as the authenticated user.
Request body
application/json · optional
- emailoptionalstring
- identifieroptionalstring
- passwordstring
Example
{
"email": "string",
"identifier": "string",
"password": "string"
}Responses
200
customer access token + opaque 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"
}202
second factor required
- mfaRequiredtrue
- tokenstring
Short-lived MFA pending token
- methods"sms" | "totp" | "webauthn" | "recovery"[]
Second factors the user can satisfy
Example
{
"mfaRequired": true,
"token": "string",
"methods": [
"sms"
]
}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/login" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "string",
"identifier": "string",
"password": "string"
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/customer/login", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"email\": \"string\",\n \"identifier\": \"string\",\n \"password\": \"string\"\n}",
});
const data = await res.json();