Skip to content

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

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger10Items per page
sort_bystringnewestSort field: newest, most_earnings, most_views, collection

Example Request

bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://fangate.info/api/products?page=1&limit=10&sort_by=newest"

Response (200)

json
{
  "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

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger10Items 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

ParameterTypeDescription
product_idintegerProduct ID

Response (200)

json
{
  "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

FieldTypeDescription
idintegerProduct ID
typestringMedia type (photo, video)
titlestringProduct title (nullable)
previewstringPreview image URL
preview_blurredstringBlurred preview URL
priceintegerPrice in cents
linkstringPayment/unlock link
link_clicksintegerTotal clicks on link
unlocksintegerSuccessful purchases
total_earningsintegerTotal revenue in cents
is_adult_contentbooleanAVS flag
is_verif_agebooleanYoti requirement
is_should_consentbooleanThird-party consent required
public_descriptionstringBuyer-visible description
private_descriptionstringCreator-only notes
mediaarrayArray 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)

FieldTypeRequiredDescription
mediafileYesOne or more media files
priceintegerYesPrice in cents
currency_idintegerYesCurrency ID
titlestringNoProduct title
public_descriptionstringNoBuyer-visible description
private_descriptionstringNoCreator-only notes
is_adult_contentbooleanNoDefault from account
is_verif_agebooleanNoRequire Yoti
is_should_consentbooleanNoThird-party consent
product_idintegerNoFor adding media to existing product
extensionstringNoFile extension (e.g. mp4)

Example Request

bash
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)

json
{
  "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

FieldTypeDescription
titlestringProduct title
public_descriptionstringBuyer-visible description
private_descriptionstringCreator-only notes
is_adult_contentbooleanAVS flag
is_verif_agebooleanYoti requirement
is_should_consentbooleanThird-party consent

Request Body

json
{
  "title": "Updated Title",
  "public_description": "Updated description",
  "is_adult_content": true,
  "is_verif_age": true
}

Response (200)

json
{
  "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)

json
{
  "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)

json
{
  "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

ParameterTypeDescription
media_idintegerMedia ID

Response (200)

json
{
  "success": true,
  "errors_message": null,
  "data": "Media deleted"
}

Fangate API Documentation