NAV
cURL python javascript php

FilePress API

You must Replace {Domain} with latest Domain of Filepress.

File

Add File

const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

const data = JSON.stringify({
  key: "UhAXIZxn2F70L1hmua0NUu0ohIDBDQ9k80La0M+sVWg=",
  id: "1dm7QxBEMmTTB86Az8afS4KszXWLqFX-a",
  quality: 1080,
  genre: "tv",
  tmdb_id: 220779,
  seasonNumber: 1,
  episodeNumber: 10,
  organizationId: "651daeab0f7659018a922876",
  isAutoUploadToStream: true,
});

var requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow",
};

fetch("{Domain}/api/v1/file/add", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
<?php

// Set up your request data
$data = array(
    "key" => "UhAXIZxn2F70L1hmua0NUu0ohIDBDQ9k80La0M+sVWg=",
    "id" => "1dm7QxBEMmTTB86Az8afS4KszXWLqFX-a",
    "quality" => 1080,
    "genre" => "tv",
    "tmdb_id" => 220779,
    "seasonNumber" => 1,
    "episodeNumber" => 10,
    "organizationId" => "651daeab0f7659018a922876",
    "isAutoUploadToStream" => true
);

// Convert the data array to JSON
$jsonData = json_encode($data);

// Initialize cURL session
$ch = curl_init();

// Set cURL options
curl_setopt($ch, CURLOPT_URL, "{Domain}/api/v1/file/add"); // Replace {Domain} with your domain
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($jsonData)
));
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

// Execute cURL session and fetch the response
$response = curl_exec($ch);

// Check if there was any error
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
} else {
    echo $response;
}

// Close cURL session
curl_close($ch);

?>

curl --location '{Domain}/api/v1/file/add' \
--header 'Content-Type: application/json' \
--data '{
    "key": "UhAXIZxn2F70L1hmua0NUu0ohIDBDQ9k80La0M+sVWg=",
    "id": "1dm7QxBEMmTTB86Az8afS4KszXWLqFX-a",
    "quality": 1080,
    "genre": "tv",
    "tmdb_id": 220779,
    "seasonNumber": 1,
    "episodeNumber": 10,
    "organizationId": "651daeab0f7659018a922876",
    "isAutoUploadToStream": true
}'

import requests
import json

url = "{Domain}/api/v1/file/add"

payload = json.dumps({
  "key": "UhAXIZxn2F70L1hmua0NUu0ohIDBDQ9k80La0M+sVWg=",
  "id": "1dm7QxBEMmTTB86Az8afS4KszXWLqFX-a",
  "quality": 1080,
  "genre": "tv",
  "tmdb_id": 220779,
  "seasonNumber": 1,
  "episodeNumber": 10,
  "organizationId": "651daeab0f7659018a922876",
  "isAutoUploadToStream": True
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)

Make sure to replace YOUR_PERSONAL_API_KEY with your API key.

The above command returns JSON structured like this:

{
  "status": true,
  "statusCode": 200,
  "statusText": "ok",
  "data": {
    "_id": "652009af87503436348c7c80",
    "name": "The Great Cleric - S01E11 [Teaser].mkv",
    "size": "5237892",
    "file_id": "1dm7QxBEMmTTB86Az8afS4KszXWLqFX-a",
    "isAutoUploadToStream": true,
    "OrgainzationId": "651daeab0f7659018a922876",
    "OrgainzationName": "TestingORG",
    "category": "VIDEO",
    "updatedAt": "2023-10-06T13:20:47.958Z",
    "createdAt": "2023-10-06T13:20:47.922Z",
    "genre": "tv",
    "quality": 1080,
    "tmdb_id": 220779,
    "imdb_id": "tt28101962",
    "seasonNumber": 1,
    "episodeNumber": 11
  }
}

[POST] {Domain}/api/v1/file/add

You must replace {Domain} to Latest Working Domain.

Like - https://new2.filepress.store/api/v1/file/add

Body Parameters

Parameter Required Description
key Yes Your Personal API Key
id Yes Your Google File Id
genre No movie or tv only
isAutoUploadToStream No Boolean
tmdbID No Tmdb or Number
seasonNumber No Number
episodeNumber No Number
tmdbID No Tmdb or Number
tmdbID No Tmdb or Number
quality No Number
organizationId No Your organization ID

Note : Organization Api Key and organizationID, both are different

Note : Only Owner/Creator of organization can see Organization ID from Manage organization Section in Organization page

{Domain}/file/{_id} - Link For File

Organization

Get Movies Files From Organization

[GET] {Domain}/api/v1/files/movie/{tmdbID}

Replace Your_Organization_Key from organization key.

Get Your_Organization_Key at Organization Page from Manage organization Section.

How to Create URL of Filepress from response?

Each Object in Array of Files will have _id.

{Domain}/file/{_id} - Link For File

var requestOptions = {
  method: "GET",
  redirect: "follow",
};

fetch(
  "{Domain}/api/v1/files/movie/842544?api_key=Your_Organization_Key",
  requestOptions
)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
<?php

// Initialize cURL session
$ch = curl_init();

// Set cURL options
curl_setopt($ch, CURLOPT_URL, "{Domain}/api/v1/files/movie/842544?api_key=Your_Organization_Key"); // Replace 'Your_Organization_Key' with your actual key
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

// Execute cURL session and fetch the response
$response = curl_exec($ch);

// Check if there was any error
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
} else {
    echo $response;
}

// Close cURL session
curl_close($ch);

?>

curl --location '{Domain}/api/v1/files/movie/842544?api_key=Your_Organization_Key'
import requests

url = "{Domain}/api/v1/files/movie/842544?api_key=Your_Organization_Key"

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
{
  "status": true,
  "statusCode": 200,
  "statusText": "ok",
  "data": {
    "files": [
      {
        "_id": "651c4b7bd3d77e6c3ee17b88",
        "name": "Transfusion (2023) Trailer.mkv",
        "size": "36968679",
        "category": "VIDEO",
        "genre": "movie",
        "quality": 480
      },
      {
        "_id": "651c4b7cd3d77e6c3ee17bfc",
        "name": "Transfusion (2023) Trailer.mkv",
        "size": "1039737",
        "category": "VIDEO",
        "genre": "movie",
        "quality": 720
      }
    ]
  }
}

Get TV Files From Organization

[GET] {Domain}/api/v1/files/tv/{tmdbID}/{seasonNo}/{episodeNo}

Replace {Domain} with latest Domain.

import requests
url = "{Domain}/api/v1/files/tv/45140/1/2?api_key=Your_Organization_Key"

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
var requestOptions = {
  method: "GET",
  body: raw,
  redirect: "follow",
};

fetch(
  "{Domain}/api/v1/files/tv/45140/1/2?api_key=Your_Organization_Key",
  requestOptions
)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
curl --location '{Domain}/api/v1/files/tv/45140/1/2?api_key=Your_Organization_Key'
<?php

// Initialize cURL session
$ch = curl_init();

// Set cURL options
curl_setopt($ch, CURLOPT_URL, "{Domain}/api/v1/files/tv/45140/1/2?api_key=Your_Organization_Key"); // Replace 'Your_Organization_Key' with your actual key
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_POSTFIELDS, $raw);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

// Execute cURL session and fetch the response
$response = curl_exec($ch);

// Check if there was any error
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
} else {
    echo $response;
}

// Close cURL session
curl_close($ch);

?>


Make sure to replace YOUR_PERSONAL_API_KEY with your API key.

The above command returns JSON structured like this:

{
  "status": true,
  "statusCode": 200,
  "statusText": "ok",
  "data": {
    "files": [
      {
        "_id": "63c4669be1c4d7eab428c52a",
        "name": "Teen Titans Go Season 1 Ep 2 trailer2.mkv",
        "size": "47361",
        "category": "VIDEO",
        "genre": "tv",
        "quality": 720,
        "seasonNumber": 1,
        "episodeNumber": 2
      },
      {
        "_id": "66c19936ff3a8701d335be4a",
        "name": "Teen Titans Go Season 1 Ep 2 trailer.mkv",
        "size": "230340",
        "category": "VIDEO",
        "genre": "tv",
        "quality": 1080,
        "seasonNumber": 1,
        "episodeNumber": 2
      }
    ]
  }
}