PrimePages
Home
Categories
🔞 Adult 📚 General 🈶 Hentai Magazines 😘 Onlyf4n
Popular Latest
Resources
Earn Money Support Terms Privacy DMCA
Login Register

API Documentation

Create Magazine Post - Complete Reference

Version: 1.0 | Last updated: January 8, 2026

Endpoint

POST /api/magazines/create.php

This endpoint allows authenticated users to create and publish new magazine posts on the PrimePages platform. All magazines are published immediately upon successful creation.

Authentication

Two levels of authentication are required to use this endpoint:

1. API Key

Provide your API key using either method:

  • Query Parameter: ?api_key=m9xK8vQ2pL5nR7gfggertrsfssdg
  • Header: X-API-Key: m9xK8vQ2pL5nR7gfggertrsfssdg

2. User Token

Provide your user token (obtained from login) using either method:

  • Query Parameter: ?token=65a4f8b3c2d1e9f7a6b5c4d3e2f1a0b9c8d7e6f5
  • Header (Bearer): Authorization: Bearer 65a4f8b3c2d1e9f7a6b5c4d3e2f1a0b9c8d7e6f5

Headers

Content-Type: application/json
X-API-Key: m9xK8vQ2pL5nR7gfggertrsfssdg
Authorization: Bearer {user_token}

Request Parameters (Body - JSON)

ParameterTypeRequiredDescription
titlestring✅ RequiredTitle of the magazine
category_idinteger✅ RequiredID of the category (must exist in database)
languagestring✅ RequiredLanguage code (ej: "es", "en", "fr")
pdf_filestring✅ RequiredURL or path to the PDF file
descriptionstring❌ OptionalMagazine description
pagesinteger❌ OptionalNumber of pages (default: 0)
cover_imagestring❌ OptionalCover image URL (default: "default-cover.jpg")
issue_datestring❌ OptionalIssue date in YYYY-MM-DD format (default: current date)

Example Request

cURL

curl -X POST "https://primepages.sbs/api/magazines/create.php?api_key=m9xK8vQ2pL5nR7gfggertrsfssdg&token=65a4f8b3c2d1e9f7a6b5c4d3e2f1a0b9c8d7e6f5" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "National Geographic - Enero 2025",
    "description": "Special edition about climate change",
    "category_id": 5,
    "language": "es",
    "pages": 120,
    "pdf_file": "https://storage.example.com/magazines/ng_jan2025.pdf",
    "cover_image": "https://storage.example.com/covers/ng_jan2025.jpg",
    "issue_date": "2025-01-15"
  }'

JavaScript (Fetch)

const response = await fetch('https://primepages.sbs/api/magazines/create.php', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'm9xK8vQ2pL5nR7gfggertrsfssdg',
    'Authorization': 'Bearer ' + userToken
  },
  body: JSON.stringify({
    title: 'Mi Nueva Revista',
    category_id: 3,
    language: 'es',
    pdf_file: 'https://ejemplo.com/magazine.pdf',
    description: 'Descripción de mi revista',
    pages: 50,
    cover_image: 'https://ejemplo.com/cover.jpg'
  })
});

const data = await response.json();
console.log(data);

Python (Requests)

import requests

url = "https://primepages.sbs/api/magazines/create.php"
params = {
    "api_key": "m9xK8vQ2pL5nR7gfggertrsfssdg",
    "token": "65a4f8b3c2d1e9f7a6b5c4d3e2f1a0b9c8d7e6f5"
}
data = {
    "title": "Mi Nueva Revista",
    "category_id": 3,
    "language": "es",
    "pdf_file": "https://ejemplo.com/magazine.pdf",
    "description": "Descripción de mi revista",
    "pages": 50,
    "cover_image": "https://ejemplo.com/cover.jpg"
}

response = requests.post(url, params=params, json=data)
print(response.json())

Success Response

Status: 201 Created
{
  "success": true,
  "message": "Revista publicada exitosamente",
  "magazine_id": 42,
  "cover_image_saved": "https://storage.example.com/covers/ng_jan2025.jpg"
}

Error Responses

401 Invalid API Key
{
  "error": "API Key inválida"
}
401 Invalid or Expired Token
{
  "error": "Token inválido o expirado"
}
400 Missing Required Fields
{
  "error": "Faltan campos requeridos: title, category_id, language"
}
400 Invalid Category
{
  "error": "Categoría no válida"
}
405 Method Not Allowed
{
  "error": "Método no permitido"
}
500 Internal Server Error
{
  "error": "Error al crear la revista: {error_message}"
}

HTTP Status Codes

CodeDescription
201Created - Magazine successfully published
400Bad Request - Invalid input data
401Unauthorized - Invalid API key or token
405Method Not Allowed - Only POST method is accepted
500Internal Server Error - Server-side issue

Special Behavior - cover_image Field

The cover_image field accepts two formats:

  • External URL (recommended): Direct URL to an image - stored as-is
  • Local filename: Name of a local file in the uploads folder
Note: If no cover_image is provided, the default value "default-cover.jpg" will be used.

Auto-generated Fields

The following fields are automatically set by the system:

  • status: Set to "published" automatically
  • is_external_link: Set to 1 (true) by default
  • created_at: Current timestamp
  • uploaded_by: ID of the authenticated user

Support

Need Help?

If you have any questions or need assistance with the API, please contact us:

  • Email: api@primepages.sbs
  • Website: Contact Form
Integration Ready: Use our API to seamlessly integrate magazine publishing into your applications.

PrimePages

Download free PDF magazines online. Explore fashion, business, technology, lifestyle and more on PrimePages.

Quick Links

  • PDF Magazines Online
  • Earn Money
  • Popular
  • Latest Magazines
  • All Categories
  • API
  • Sitemap

Popular Categories

  • 🔞 Adult
  • 📚 General
  • 🈶 Hentai Magazines
  • 😘 Onlyf4n

Legal

  • Terms and Conditions
  • Privacy Policy
  • DMCA
  • Contact

© 2026 PrimePages - All rights reserved