POST /auth
This is the only publicly accessible endpoint and is used for authenticating and retrieving an API token for subsequent calls.
Endpoint
POST https://api.timekit.io/v2/auth
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
email |
body | string | Email of the user | ||
password |
body | string | Password of the user |
Request examples
curlcurl -X POST \
-d '{
"email": "doc.brown@timekit.io",
"password": "FluxCapacitator"
}' \
https://api.timekit.io/v2/auth
Response examples
200
json{
"data": {
"id": "fca27950-1be8-41e2-951c-a43a61d45d43",
"first_name": "Dr. Emmett",
"last_name": "Brown",
"name": "Dr. Emmett Brown",
"email": "doc.brown@timekit.io",
"image": "http:\/\/www.gravatar.com\/avatar\/35b00087ea20066e5da95f8359183f04",
"timezone": "America\/Los_Angeles",
"api_token": "nvHfRSlhvsnlg4rS7Wt28Ty47qdgegwSu3YK7hPW"
}
}
422
json{
"errors": {
"email": [
"The email field is required."
],
"password": [
"The password field is required."
]
}
401
json{
"error": {
"message": "Email and password does not match any user",
"status_code": 401
}