Products
Product and content management endpoints. Create, list, update, and delete products (media + payment links).
List products
GET /api/products
Returns a paginated list of the authenticated user's products.
Authentication: Required
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
limit | integer | 10 | Items per page |
sort_by | string | newest | Sort field: newest, most_earnings, most_views, collection |
Example Request
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://fangate.info/api/products?page=1&limit=10&sort_by=newest"Response (200)
{
"success": true,
"errors_message": null,
"data": [
{
"id": 1,
"type": "video",
"title": "My Product",
"preview": "https://...",
"preview_blurred": "https://...",
"price": 550,
"link": "https://fangate.info/p/abc123",
"link_clicks": 42,
"unlocks": 5,
"total_earnings": 2750,
"is_adult_content": true,
"is_verif_age": true,
"is_should_consent": false,
"public_description": "...",
"private_description": "...",
"media": [ ... ]
}
]
}List collection products
GET /api/products/collection
Returns products that are in the user's collection (grouped shareable link).
Authentication: Required
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
limit | integer | 10 | Items per page |
Response (200)
Same structure as list products.
Get single product
GET /api/products/{product_id}
Returns a single product by ID.
Authentication: Required
Path Parameters
| Parameter | Type | Description |
|---|---|---|
product_id | integer | Product ID |
Response (200)
{
"success": true,
"errors_message": null,
"data": {
"id": 1,
"type": "video",
"title": "My Product",
"preview": "https://...",
"preview_blurred": "https://...",
"price": 550,
"link": "https://fangate.info/p/abc123",
"link_clicks": 42,
"unlocks": 5,
"total_earnings": 2750,
"is_adult_content": true,
"is_verif_age": true,
"is_should_consent": false,
"public_description": "...",
"private_description": "...",
"media": [
{
"id": 1,
"type": "video",
"url": "https://...",
"thumbnail_url": "https://..."
}
]
}
}product.resource schema
| Field | Type | Description |
|---|---|---|
id | integer | Product ID |
type | string | Media type (photo, video) |
title | string | Product title (nullable) |
preview | string | Preview image URL |
preview_blurred | string | Blurred preview URL |
price | integer | Price in cents |
link | string | Payment/unlock link |
link_clicks | integer | Total clicks on link |
unlocks | integer | Successful purchases |
total_earnings | integer | Total revenue in cents |
is_adult_content | boolean | AVS flag |
is_verif_age | boolean | Yoti requirement |
is_should_consent | boolean | Third-party consent required |
public_description | string | Buyer-visible description |
private_description | string | Creator-only notes |
media | array | Array of media.resource |
Create product
POST /api/products
Creates a new product with media upload. Uses multipart/form-data for file uploads. Media undergoes SightEngine moderation. For files > 10 MB, processing is queued (CreateProductJob).
Authentication: Required
Request Body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
media | file | Yes | One or more media files |
price | integer | Yes | Price in cents |
currency_id | integer | Yes | Currency ID |
title | string | No | Product title |
public_description | string | No | Buyer-visible description |
private_description | string | No | Creator-only notes |
is_adult_content | boolean | No | Default from account |
is_verif_age | boolean | No | Require Yoti |
is_should_consent | boolean | No | Third-party consent |
product_id | integer | No | For adding media to existing product |
extension | string | No | File extension (e.g. mp4) |
Example Request
curl -X POST https://fangate.info/api/products \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "media=@/path/to/video.mp4" \
-F "price=550" \
-F "currency_id=1" \
-F "title=My Product" \
-F "is_adult_content=true" \
-F "is_verif_age=true"Response (200)
{
"success": true,
"errors_message": null,
"data": {
"id": 1,
"type": "video",
"link": "https://fangate.info/p/abc123",
...
}
}Update product
PATCH /api/products/{product_id}
Updates existing product properties. Cannot change media files or price.
Authentication: Required
Updatable Fields
| Field | Type | Description |
|---|---|---|
title | string | Product title |
public_description | string | Buyer-visible description |
private_description | string | Creator-only notes |
is_adult_content | boolean | AVS flag |
is_verif_age | boolean | Yoti requirement |
is_should_consent | boolean | Third-party consent |
Request Body
{
"title": "Updated Title",
"public_description": "Updated description",
"is_adult_content": true,
"is_verif_age": true
}Response (200)
{
"success": true,
"errors_message": null,
"data": { "product": { ... } }
}Toggle product in collection
POST /api/products/{product_id}/collection
Adds or removes the product from the user's collection.
Authentication: Required
Response (200)
{
"success": true,
"errors_message": null,
"data": { "in_collection": true }
}Delete product
DELETE /api/products/{product_id}
Soft-deletes the product (marks as deleted, retains data).
Authentication: Required
Response (200)
{
"success": true,
"errors_message": null,
"data": "Product deleted"
}Delete product media
DELETE /api/products/media/{media_id}
Deletes a specific media file from a product.
Authentication: Required
Path Parameters
| Parameter | Type | Description |
|---|---|---|
media_id | integer | Media ID |
Response (200)
{
"success": true,
"errors_message": null,
"data": "Media deleted"
}