Overview
API for managing images associated with events. Supports uploading multiple images and deleting individual images.Authentication & Permissions
All endpoints require Auth0 authentication. Permission Model:- Regular Users: Can upload and delete images for their own events
- Admin Users: Can upload and delete images for all events
Upload Images to Event
Path Parameters
Event ID
Request Body
Send asmultipart/form-data with one or more files:
One or more image files to upload. Use the field name
images for all files.Response
Indicates if the upload was successful
Success message with count of uploaded images
Array of uploaded image objects
Example
cURL
Success Response (201 Created)
Error Responses
400 Bad Request - No files providedDelete Image from Event
Path Parameters
Event ID
Image ID to delete (obtained from the
images array when listing events or from the upload response)Response
Indicates if the deletion was successful
Confirmation message
Example
cURL
Success Response (200 OK)
Error Responses
403 Forbidden - User does not have permissionNotes
- Images are uploaded to Google Cloud Storage in the
eventsfolder - Supported image formats: JPEG, PNG, GIF, WebP (depending on GCS configuration)
- Maximum file size depends on your server configuration (typically 10-50 MB)
- When an event is deleted, all associated images are also deleted
- Regular users can only manage images for events they created
- Admin users can manage images for all events
- The
uploaded_byfield is automatically set to the authenticated user making the request
Integration with Events API
These image endpoints work in conjunction with the Events API. After creating an event, you can:- Upload images using
POST /api/admin/events/<event_id>/images/ - View images in the event response (included in the
imagesarray) - Delete images using
DELETE /api/admin/events/<event_id>/images/<image_id>/
GET /api/admin/events/<event_id>/.