API Documentation

Integrate Media to URL in your tools

Authentication

All API requests must include your API key in the Authorization header as a Bearer token. Generate your key from the Dashboard.

Authorization: Bearer mtu_YOUR_API_KEY

Base URL

https://mediatourl.agency/api/v1

Endpoints

GET/api/v1/me

Returns the authenticated user's profile.

Response

{ "id": 1, "name": "John Doe", "email": "[email protected]" }
GET/api/v1/files

Returns a list of all files uploaded by the authenticated user.

Response

{
  "files": [
    {
      "id": 42,
      "filename": "photo.jpg",
      "url": "https://cdn.example.com/1/files/abc123-photo.jpg",
      "mimeType": "image/jpeg",
      "fileSize": 1048576,
      "viewCount": 12,
      "downloadCount": 3,
      "createdAt": "2026-03-04T10:00:00Z"
    }
  ],
  "total": 1
}
POST/api/v1/upload

Upload a file. Accepts multipart/form-data (field: 'file') or JSON with base64-encoded data.

Response

{
  "success": true,
  "file": {
    "filename": "photo.jpg",
    "url": "https://cdn.example.com/1/files/abc123-photo.jpg",
    "mimeType": "image/jpeg",
    "fileSize": 1048576
  }
}
DELETE/api/v1/files/:id

Delete a file by its numeric ID.

Response

{ "success": true, "message": "File deleted" }

Code Examples

# 1. Upload a file (multipart)
curl -X POST https://mediatourl.agency/api/v1/upload \
  -H "Authorization: Bearer mtu_YOUR_API_KEY" \
  -F "file=@/path/to/your/photo.jpg"

# 2. List your files
curl https://mediatourl.agency/api/v1/files \
  -H "Authorization: Bearer mtu_YOUR_API_KEY"

# 3. Delete a file
curl -X DELETE https://mediatourl.agency/api/v1/files/42 \
  -H "Authorization: Bearer mtu_YOUR_API_KEY"

Notes

  • • Maximum file size: 500 MB per upload.
  • • All file types are supported (images, videos, documents, audio, archives, etc.).
  • • Generated URLs are permanent and publicly accessible.
  • • You can revoke an API key at any time from the Dashboard — existing uploads remain accessible.
  • • Store your API key securely — it is shown only once at creation.