API Reference - User Photos
Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108065
← Back to API Reference | Getting Started
User Photos
User Photos stores profile images for members, including profile photos, logos, and cover photos. Each record tracks the filename, photo type, and processing status for a member's uploaded image.
users_photo — DB table: users_photoThe User Photos Object
| Field | Type | Description |
|---|---|---|
photo_id | integer | Unique photo record ID (primary key, read-only) |
user_id | integer | ID of the member this photo belongs to (foreign key to users) |
file | string | Filename of the uploaded image |
original | string | Filename of the original unprocessed image before resizing (nullable) |
type | string | Type of photo. One of: logo, photo, cover_photo |
date_added | string | Date the photo was uploaded, formatted as YYYYMMDDHHmmss |
resized | string | Date the image was resized/processed, formatted as YYYYMMDDHHmmss |
error | string | Error message from image processing, if any |
compliant | integer | Whether the image passed compliance checks (0 = not checked/non-compliant, 1 = compliant) |
List User Photo Records
Returns a paginated list of user photo records.
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/users_photo/get?limit=25" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"tablesExists": true,
"photo_id": "1",
"user_id": "1",
"file": "cimage-1-436-photo.jpeg",
"original": null,
"type": "cover_photo",
"date_added": "",
"resized": "",
"error": "",
"compliant": "0"
},
{
"tablesExists": true,
"photo_id": "2",
"user_id": "24",
"file": "pimage-24-339-photo.png",
"original": null,
"type": "photo",
"date_added": "",
"resized": "",
"error": "",
"compliant": "0"
}
],
"total": "136",
"current_page": 1,
"total_pages": 68,
"next_page": "MipfKjI="
}Retrieve a User Photo Record
Example Request
curl -X GET "https://www.yourdomain.com/api/v2/users_photo/get/1" \ -H "X-Api-Key: your-api-key-here"
Example Response
{
"status": "success",
"message": [
{
"tablesExists": true,
"photo_id": "1",
"user_id": "1",
"file": "cimage-1-436-photo.jpeg",
"original": null,
"type": "cover_photo",
"date_added": "",
"resized": "",
"error": "",
"compliant": "0"
}
],
"total": "136",
"current_page": 1,
"total_pages": 6,
"next_page": "MipfKjI1"
}Create a User Photo Record
Creates a new photo record for a member. Note: this creates a database record only; actual image upload is handled separately through the site's upload interface.
Example Request
curl -X POST "https://www.yourdomain.com/api/v2/users_photo/create" \ -H "X-Api-Key: your-api-key-here" \ -d "user_id=1" \ -d "file=pimage-1-500-photo.jpg" \ -d "type=photo" \ -d "date_added=20260403000000"
Example Response
{
"status": "success",
"message": {
"photo_id": "910076",
"user_id": "1",
"file": "pimage-1-500-photo.jpg",
"original": null,
"type": "photo",
"date_added": "20260403000000",
"resized": null,
"error": null,
"compliant": null
}
}Update a User Photo Record
Example Request
curl -X PUT "https://www.yourdomain.com/api/v2/users_photo/update" \ -H "X-Api-Key: your-api-key-here" \ -d "photo_id=910076" \ -d "type=logo"
Example Response
{
"status": "success",
"message": {
"photo_id": "910076",
"user_id": "1",
"file": "pimage-1-500-photo.jpg",
"original": null,
"type": "logo",
"date_added": "20260403000000",
"resized": "",
"error": "",
"compliant": "0"
}
}Delete a User Photo Record
Example Request
curl -X DELETE "https://www.yourdomain.com/api/v2/users_photo/delete" \ -H "X-Api-Key: your-api-key-here" \ -d "photo_id=910076"
Example Response
{
"status": "success",
"message": "users_photo record was deleted"
}