Media Share API
  1. Internal
Media Share API
  • Authentication
    • Create new user account
      POST
    • Login to existing account
      POST
    • Initiate Google OAuth for YouTube
      GET
    • Initiate Facebook OAuth
      GET
    • Get connected social accounts
      GET
  • Posts
    • Create and publish a post
      POST
    • Get user's posts
      GET
    • Get post details
      GET
    • Update post
      PATCH
    • Delete post
      DELETE
  • Assets
    • Upload media asset
      POST
    • Get user's assets
      GET
    • Delete asset
      DELETE
  • Plans
    • Get available subscription plans
      GET
  • Subscriptions
    • Upgrade subscription plan
      POST
    • Get subscription status
      GET
  • Services
    • Get service status
      GET
    • Toggle service on/off (admin only)
      POST
  • Queue
    • Get queue statistics
      GET
  • Internal
    • Internal endpoint for worker-to-server file uploads
      POST
  • Schemas
    • Error
    • User
    • Subscription
    • Plan
    • Post
    • PlatformPost
    • Media
    • Asset
    • SocialAccount
  1. Internal

Internal endpoint for worker-to-server file uploads

POST
https://api.mediashare.com/api/files/upload-from-worker
INTERNAL USE ONLY - Not for direct client use.
This endpoint is used in distributed architectures where the worker process runs
on a different server than the API. The worker uploads temporary files to the
API server using this endpoint.

Authentication#

Requires X-Internal-Request header with the INTERNAL_SECRET environment variable.

Use Case#

Worker downloads media from external URLs
Worker processes/converts media files
Worker uploads to API server for serving to platforms (e.g., TikTok PULL_FROM_URL)

Request

Authorization
API Key
Add parameter in header
X-API-Key
Example:
X-API-Key: ********************
or
Header Params

Body Params multipart/form-dataRequired

Responses

🟢200
application/json
File uploaded successfully
Body

🟠400
🟠401
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.mediashare.com/api/files/upload-from-worker' \
--header 'X-Internal-Request;' \
--header 'X-API-Key: <api-key>' \
--form 'file=@""' \
--form 'storageType=""'
Response Response Example
{
    "success": true,
    "url": "https://api.yourdomain.com/uploads/temp/file-123.jpg"
}
Modified at 2025-12-15 20:30:09
Previous
Get queue statistics
Next
Error
Built with