Authentication

API endpoints specifications

auth

Login and retrieve an authentication token

post

Login and retrieve an authentication token Authentication: not required

Body
emailstring · emailOptional
passwordstringOptional
Responses
200
Success!
application/json
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

get

Get the user record belonging to the authentication token Authentication: required

Authorizations
Responses
200
Success!
application/json
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

post

Signup and retrieve an authentication token Authentication: not required

Body
namestringRequired
emailstring · emailRequired
passwordstringRequired
companystringRequired
Responses
200
Success!
application/json
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