Skip to main content

Users API

The Users API allows you to manage user accounts and retrieve user information.

List Users

Get a list of users.

Endpoint: GET /users

Headers:

  • X-F-Authorization: Client token (required)

Query Parameters:

  • limit (optional): Number of results to return
  • offset (optional): Number of results to skip
  • role (optional): Filter by role ID(s) (comma-separated)

Response:

[
{
"id": "user-id",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"photo": "https://example.com/photo.jpg",
"roles": [
{
"id": "role-id"
}
]
}
]

Get Current User

Get the currently authenticated user's profile, including their level, badges, and interests.

Endpoint: GET /users/i

Headers:

  • X-F-Authorization: Client token (required)
  • X-F-Authentication: User token (required)

Response:

{
"id": "user-id",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"photo": "https://example.com/photo.jpg",
"points": 1250,
"roles": [
{
"id": "attender"
}
]
}

Create User

Register a new user account. Only a client token is required — this is the public registration endpoint. New users are automatically assigned the attender role.

Endpoint: POST /users

Headers:

  • X-F-Authorization: Client token (required)

Request Body:

{
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"password": "secure-password"
}

Response: Returns the created user object (password is not included).

Update User

Update an existing user's profile. Users may only update their own account.

Endpoint: PUT /users/:id

Headers:

  • X-F-Authorization: Client token (required)
  • X-F-Authentication: User token (required)

Request Body:

{
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"phone": "+1234567890",
"address": "123 Main St",
"city": "Berlin",
"country": "Germany"
}

Upload User Photo

Upload a profile photo for a user. Accepts multipart/form-data with an image field, or a JSON body with a photo field containing a URL or base64-encoded image.

Endpoint: POST /users/:id/photo

Headers:

  • X-F-Authorization: Client token (required)
  • X-F-Authentication: User token (required)
  • Content-Type: multipart/form-data or application/json

Response: Returns the updated user object with the new photo URL.

Delete User

Delete a user account. Users may only delete their own account.

Endpoint: DELETE /users/:id

Headers:

  • X-F-Authorization: Client token (required)
  • X-F-Authentication: User token (required)

Authenticated feed

Personalized upcoming festivals and gigs for the signed-in user (followed organizers / artists affect ordering).

Endpoint: GET /users/i/feed

Headers:

  • X-F-Authorization: Client token (required)
  • X-F-Authentication: User token (required)

Query parameters:

  • festivals_page, festivals_limit — pagination for the festivals list (defaults: page 1, limit 20; limit capped at 100)
  • gigs_page, gigs_limit — pagination for the gigs list (same defaults and cap)

Response:

{
"festivals": [],
"festivalsPagination": {
"page": 1,
"limit": 20,
"total": 0,
"totalPages": 0,
"hasMore": false
},
"gigs": [],
"gigsPagination": {
"page": 1,
"limit": 20,
"total": 0,
"totalPages": 0,
"hasMore": false
}
}

Clients that need the full feed should request additional pages independently for festivals and gigs (e.g. increment festivals_page while holding gigs_page fixed, then repeat for gigs). Use festivalsPagination.hasMore and gigsPagination.hasMore to know when to stop.