13 endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /api/albums | List albums |
POST | /api/albums | Create a new album |
DELETE | /api/albums/{id} | Delete an album |
GET | /api/albums/{id} | Get album by ID |
PUT | /api/albums/{id} | Update an album |
POST | /api/albums/{id}/hide | Hide an album (moderator action) |
DELETE | /api/albums/{id}/images | Delete an image from an album |
POST | /api/albums/{id}/images | Upload images to an album |
DELETE | /api/albums/{id}/images/all | Delete all images from an album |
PUT | /api/albums/{id}/images/reorder | Reorder images in an album |
GET | /api/albums/{id}/like | Get album likes |
POST | /api/albums/{id}/like | Like or unlike an album |
POST | /api/albums/{id}/unhide | Unhide an album (moderator action) |
GET /api/albumsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
page | query | no | integer | — |
limit | query | no | integer | — |
search | query | no | string | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Paginated list of albums | — |
POST /api/albumsAuth: Bearer JWT required.
Request body (required) — application/json
| Field | Type | Required | Description |
|---|---|---|---|
title | string | yes | — |
titleArabic | string | yes | — |
description | string | no | — |
descriptionArabic | string | no | — |
isPublic | boolean | no | — |
Responses
| Status | Description | Body |
|---|---|---|
201 | Album created successfully | — |
400 | Validation error | — |
401 | Authentication required | — |
403 | Permission denied | — |
DELETE /api/albums/{id}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Album deleted successfully | — |
403 | Permission denied | — |
404 | Album not found | — |
GET /api/albums/{id}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Album details | — |
404 | Album not found | — |
PUT /api/albums/{id}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Request body (required) — application/json
| Field | Type | Required | Description |
|---|---|---|---|
title | string | no | — |
titleArabic | string | no | — |
description | string | no | — |
descriptionArabic | string | no | — |
isPublic | boolean | no | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Album updated successfully | — |
403 | Permission denied | — |
404 | Album not found | — |
POST /api/albums/{id}/hideAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Album hidden successfully | — |
403 | Permission denied | — |
DELETE /api/albums/{id}/imagesAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
imageId | query | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Image deleted successfully | — |
403 | Permission denied | — |
POST /api/albums/{id}/imagesAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Request body (required) — multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
images | string (binary)[] | no | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Images uploaded successfully | — |
403 | Permission denied | — |
DELETE /api/albums/{id}/images/allAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | All images deleted successfully | — |
403 | Permission denied | — |
PUT /api/albums/{id}/images/reorderAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Request body (required) — application/json
| Field | Type | Required | Description |
|---|---|---|---|
imageIds | string (uuid)[] | yes | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Images reordered successfully | — |
403 | Permission denied | — |
GET /api/albums/{id}/likeAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
page | query | no | integer | — |
limit | query | no | integer | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | List of likes | — |
POST /api/albums/{id}/likeAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Like toggled successfully | — |
POST /api/albums/{id}/unhideAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Album unhidden successfully | — |
403 | Permission denied | — |