Skip to main content

Flickz API (v1)

Download OpenAPI specification:Download

License: Private License

Flickz is a platform that connects event photographers with clients. It allows photographers to create profiles, upload event galleries, and sell high-resolution images. Users can browse events, purchase media, and book photographers for future gigs. This API powers both the frontend and backend operations of Flickz, including authentication, media management, and payment processing. This specification is intended for developers working on the Flickz platform, including frontend engineers, backend contributors, and third-party integrators.

Auth

Endpoints related to user authentication and account management, including signup, login, password resets, session revocation, and email verification.

Create a user account

Create a user by providing email and password.

Authorizations:
None
Request Body schema: application/json
required

Send the user email and password

email
required
string <email>
password
required
string >= 8 characters

Responses

Request samples

Content type
application/json
{
  • "email": "foo@gmail.com",
  • "password": "your_password_here"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "successfully created user account",
  • "data": {
    }
}

Login a user

Authorizations:
None
Request Body schema: application/json
required

credentials

email
required
string <email>
password
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "successfully created user account",
  • "accessToken": "string",
  • "tokenType": "string",
  • "data": {
    }
}

Revoke session

Revoke an active session token. This endpoint is primarily used to log out a user by marking their session token as invalid. Send the current authenticated user's token in the request body to terminate the session. Once revoked, the token will no longer be accepted for authenticated requests.

Authorizations:
None
Request Body schema: application/json
required
token
required
string

The session token to be revoked.

Responses

Request samples

Content type
application/json
{
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Token revoked successfully."
}

Request a password reset code

Sends a password reset code as a query parameter to the user's email, along with a frontend reset link. The code expires after 8 minutes.

Authorizations:
None
Request Body schema: application/json
required
email
required
string <email>

The email address of the user requesting a password reset.

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Password reset email sent."
}

Reset password

Reset a user's password by providing a valid reset code.

Authorizations:
None
Request Body schema: application/json
required
code
required
string

The reset code sent via email with a frontend link. Must be submitted within 8 minutes.

newPassword
string >= 8 characters

the new user password

Responses

Request samples

Content type
application/json
{
  • "code": "string",
  • "newPassword": "stringst"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Password reset successfully."
}

Request email verification

Sends a email verification code as a query param atteched to the frontend url

Authorizations:
None
Request Body schema: application/json
email
required
string <email>

the email your requesting to /auth/verify-email

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string"
}

Verify email

Verify a user's email address using the verification code sent via email.

Authorizations:
None
Request Body schema: application/json
required
code
required
string

The email verification code sent to the user.

Responses

Request samples

Content type
application/json
{
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Email verified successfully."
}

users

Get a list of users

Retrieve a list of users with pagination and optional filtering.

Authorizations:
None
query Parameters
page
integer
Default: 1

The page number for pagination (default is 1).

limit
integer
Default: 20

The number of users to return per page (default is 10, max is 100).

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Users retrieved successfully.",
  • "items": [
    ],
  • "pagination": {
    }
}

Get a user by ID

Get a user by their unique identifier.

Authorizations:
None
path Parameters
userId
required
string

The unique identifier of the user to retrieve.

Responses

Response samples

Content type
application/json
{
  • "id": "12345",
  • "name": "Jane Doe",
  • "bio": "Event photographer based in NYC.",
  • "userType": "PHOTOGRAPHER",
  • "handle": "janeshoots",
  • "photographerProfile": {
    }
}

Get a user by handle

Retrieve a public user profile by their unique handle.

Authorizations:
None
path Parameters
handle
required
string

The unique handle (username) of the user to retrieve.

Responses

Response samples

Content type
application/json
{
  • "id": "12345",
  • "name": "Jane Doe",
  • "bio": "Event photographer based in NYC.",
  • "userType": "PHOTOGRAPHER",
  • "handle": "janeshoots",
  • "photographerProfile": {
    }
}

Check handle availability

Verify whether a user handle (username) is available for registration.

Authorizations:
None
path Parameters
handle
required
string

The handle (username) to check for availability.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Handle is available.",
  • "data": {
    }
}

Get Current User

Retrieve the profile of the currently authenticated user.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "User profile retrieved successfully.",
  • "data": {
    }
}

Update Current User

Update the profile of the currently authenticated user.

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
string or null <= 100 characters

Optional name of the user (max 100 characters).

bio
string or null <= 1000 characters

Optional biography of the user (max 1000 characters).

userType
string or null
Enum: "USER" "PHOTOGRAPHER"

The role or type of user. Must be either USER or PHOTOGRAPHER.

handle
string or null [ 3 .. 30 ] characters ^[a-zA-Z0-9_]+$

Unique handle (username), 3–30 characters. Only letters, numbers, and underscores are allowed.

Responses

Request samples

Content type
application/json
{
  • "name": "Jane Doe",
  • "bio": "Photographer based in LA, specializing in weddings.",
  • "userType": "PHOTOGRAPHER",
  • "handle": "jane_doe"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "User profile updated successfully.",
  • "data": {
    }
}

Update user avatar

Upload and update the current authenticated user's avatar image.

Authorizations:
bearerAuth
Request Body schema: multipart/form-data
required
avatar
string <binary> <= 10485760 characters

Avatar image file to upload. Accepts JPEG, PNG, or WebP formats. Max size: 10MB.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "User avatar updated successfully."
}