Authentication
API endpoints specifications
auth
Login and retrieve an authentication token Authentication: not required
Body
emailstring · emailOptional
passwordstringOptional
Responses
200
Success!
application/json
400
Input Error. Check the request payload for issues.
401
Unauthorized
403
Access denied. Additional privileges are needed access the requested resource.
404
Not Found. The requested resource does not exist.
429
Rate Limited. Too many requests.
500
Unexpected error
post
POST /api:auth/auth/login HTTP/1.1
Host: api.answr.space
Content-Type: application/json
Accept: */*
Content-Length: 44
{
"email": "[email protected]",
"password": "text"
}
{
"authToken": "text",
"user": "text"
}
Get the user record belonging to the authentication token Authentication: required
Authorizations
Responses
200
Success!
application/json
400
Input Error. Check the request payload for issues.
401
Unauthorized
403
Access denied. Additional privileges are needed access the requested resource.
404
Not Found. The requested resource does not exist.
429
Rate Limited. Too many requests.
500
Unexpected error
get
GET /api:auth/auth/me HTTP/1.1
Host: api.answr.space
Authorization: Bearer JWT
Accept: */*
{
"id": 1,
"created_at": "now",
"name": "text",
"email": "[email protected]",
"role": "admin",
"company": "text",
"active_requests": 1
}
Signup and retrieve an authentication token Authentication: not required
Body
namestringRequired
emailstring · emailRequired
passwordstringRequired
companystringRequired
Responses
200
Success!
application/json
400
Input Error. Check the request payload for issues.
401
Unauthorized
403
Access denied. Additional privileges are needed access the requested resource.
404
Not Found. The requested resource does not exist.
429
Rate Limited. Too many requests.
500
Unexpected error
post
POST /api:auth/auth/signup HTTP/1.1
Host: api.answr.space
Content-Type: application/json
Accept: */*
Content-Length: 75
{
"name": "text",
"email": "[email protected]",
"password": "text",
"company": "text"
}
{
"authToken": "text",
"user": "text"
}
Last updated