Home > Documentation

Authentication

The PeopleOS API uses API keys to authenticate requests. You can view and manage your API keys in your administration panel.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

On our instance, all API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail. On your instance, it will be up to you.

You must use the API key in the Authorization header. The value must be Bearer followed by a space and then the API key.

On our instance, the API calls are rate limited to 60 requests per minute. On your instance, you can change that settings in the api.php configuration file.

There are two ways to get an API key:

  • You can create an API key in the settings section of your account.

  • You can use the login API route, described below, to login with your email and password. This will give you an API key that you can use to authenticate your requests.

Code
curl -X GET "https://peopleos.cloud/api/persons" \ -H "Authorization: Bearer YOUR_API_KEY"

Login

This endpoint logs in a user and returns an API key. This is the only endpoint that lets you use your email and password to authenticate your requests.

URL parameters

This endpoint does not have any parameters.

Query parameters

email string required

The email of the user. Maximum 255 characters.

password string required

The password of the user. Maximum 255 characters.

Response attributes

message string

The message of the response.

status integer

The status code of the response.

data object

The data of the response.

token string

The API key of the user.

POST /api/login
{
"message": "Authenticated" ,
"status": 200 ,
"data": {
"token": "1|1234567890" ,
}
}

Logout

This endpoint logs out a user and deletes the API key that was used to authenticate the request . Please be certain.

URL parameters

This endpoint does not have any parameters.

Query parameters

No query parameters are available for this endpoint.

Response attributes

message string

The message of the response.

status integer

The status code of the response.

DELETE /api/logout
{
"message": "Logged out successfully" ,
"status": 200 ,
}
Taylor Swift being happy

Please login to vote.

It's free and will help us improve the page.

Taylor will be proud of you.

Last updated on June 30, 2025.