Skip to content

Search Users

Search users.

Endpoint

http
GET /api/v1/search

Parameters

Query parameters

ParameterTypeRequiredDescription
filterstringyesType of the active filter. Only users is allowed.
querystringyesYour search query to find users

Request example

sh
curl --location --request GET 'https://files.ro/api/v1/search?filter=users&query=john@doe.com' \
--header 'Authorization: Bearer {token}'

Response

json
{
  "data": [
    {
      "data": {
        "id": "user_123",
        "type": "user",
        "attributes": {
          "avatar": "https://files.ro/storage/avatars/jane.png",
          "name": "Jane Doe",
          "color": "#00BC7E",
          "email": "jane@example.com"
        }
      }
    }
  ]
}
json
{
  "type": "error",
  "message": "You are not authorized"
}
json
{
  "type": "error",
  "message": "Access denied. You need administrator privileges to search the users."
}
json
{
  "message": "The given data was invalid.",
  "errors": {
    "field": [
      "The field is required."
    ]
  }
}