Skip to content
reelspanDocs

Media and analytics

Media library

Keep uploaded videos, photos and PDFs in your media library, import them from Google Drive or Dropbox, and post them again by media_id.

GETapi.reelspan.com/v1/libraryTry it →

The media library keeps files you want to post more than once: a brand intro, a product video, a set of photos. Files in the library are never deleted on their own. You post them by media_id, without uploading them again.

Files that are not in the library are temporary: an upload is deleted 7 days after the posts that use it finish, and an upload no post ever used is deleted after a day.

Add files

There are three ways to put a file in the library:

  • Upload and keep it at once: Upload media with save=true (and an optional title).
  • Keep something already uploaded: POST /v1/library with its media_ids.
  • Import from a link: POST /v1/library/import with a Google Drive or Dropbox share link, or any public https link.
curl -X POST "https://api.reelspan.com/v1/media/upload?kind=video&save=true&title=Brand%20intro" \
  -H "Authorization: Bearer $REELSPAN_API_KEY" \
  -F "[email protected]"

Keep an earlier upload

curl -X POST https://api.reelspan.com/v1/library \
  -H "Authorization: Bearer $REELSPAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"media_ids": ["med_4f2a…"], "title": "Brand intro"}'

Send 1 to 50 media_ids. A file that is already in the library only gets the new title.

curl -X POST https://api.reelspan.com/v1/library/import \
  -H "Authorization: Bearer $REELSPAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://drive.google.com/file/d/1AbC…/view?usp=sharing", "title": "Product demo"}'

The link must be https. A Google Drive or Dropbox file must be shared as "anyone with the link". Reelspan copies the file in, so the link can change or go away afterwards. It takes videos, photos and PDFs: a video or PDF up to your plan's upload size, a photo up to 20 MB, as long as the library has room.

Post from the library

Use the media_id where a post takes an uploaded file:

curl -X POST https://api.reelspan.com/v1/posts/video \
  -H "Authorization: Bearer $REELSPAN_API_KEY" \
  -F "user=my-brand" \
  -F "platform[]=tiktok" \
  -F "platform[]=youtube" \
  -F "title=Meet the team" \
  -F "video_media_id=med_4f2a…"

List the library

curl "https://api.reelspan.com/v1/library?kind=video&limit=20" \
  -H "Authorization: Bearer $REELSPAN_API_KEY"
{
  "success": true,
  "usage": { "used_bytes": 734003200, "limit_bytes": 26843545600, "items": 12 },
  "items": [
    {
      "media_id": "med_4f2a…",
      "kind": "video",
      "title": "Brand intro",
      "filename": "launch.mp4",
      "content_type": "video/mp4",
      "size_bytes": 48211022,
      "duration_seconds": 31.5,
      "width": 1080,
      "height": 1920,
      "saved_at": "2026-11-03T10:22:41.000Z",
      "url": "https://…"
    }
  ],
  "next_before": "2026-11-03T10:22:41.000Z"
}
  • Newest first. kind is video, photo or document; leave it out for all.
  • limit is 1 to 100 (default 48). When there are more, pass next_before as before to get the next page; it is null on the last page.
  • Each item's url is a link to the file that works for an hour. For a fresh one later, call GET /v1/library/{media_id}/file, which redirects (302) to a new link.
  • duration_seconds, width and height are null when they aren't known (always for PDFs).

Remove a file

curl -X DELETE https://api.reelspan.com/v1/library/med_4f2a… \
  -H "Authorization: Bearer $REELSPAN_API_KEY"

Removing takes the file out of the library and frees its space. The file itself is deleted once no post waiting to go out uses it, so a scheduled post that uses it still publishes.

Storage per plan

Files in the library count against your plan's library space. Temporary uploads don't.

Plan Library space
Free 1 GB
Starter 25 GB
Pro 100 GB
Agency 250 GB
Scale 500 GB

usage in each answer shows the bytes used, your plan's limit and the number of files. When a file doesn't fit, the answer is 413 with error_code: LIBRARY_FULL and says how much space is left. See Plans and limits.

Errors

Status error_code When
400 varies The import link couldn't be fetched or isn't a video, photo or PDF. The message says why.
404 MEDIA_NOT_FOUND No upload or library file with that media_id in your workspace.
413 LIBRARY_FULL Not enough library space left.
413 FILE_TOO_LARGE The imported file is over the size limit, or bigger than the space left.

Listing and downloading need the read scope; adding, importing and removing need publish.

GETapi.reelspan.com/v1/libraryTry it →

Parameters

  • kindstring · query

    videophotodocument

  • limitstring · query

    1 to 100, default 48

  • beforestring · query

    next_before from the previous page

Responses

200 Library

{
  "success": true,
  "usage": {
    "used_bytes": 0,
    "limit_bytes": 0,
    "items": 0
  },
  "items": [
    {
      "media_id": "string",
      "kind": "video",
      "title": "string",
      "filename": "string",
      "content_type": "string",
      "size_bytes": 0,
      "duration_seconds": 0,
      "width": 0,
      "height": 0,
      "saved_at": "string",
      "url": "string"
    }
  ],
  "next_before": "string"
}
POSTapi.reelspan.com/v1/libraryTry it →

Request body

application/json

  • media_idsstring[]required
  • titlestring

Responses

200 Saved

{
  "success": true,
  "items": [
    {
      "media_id": "string",
      "kind": "video",
      "title": "string",
      "filename": "string",
      "content_type": "string",
      "size_bytes": 0,
      "duration_seconds": 0,
      "width": 0,
      "height": 0,
      "saved_at": "string",
      "url": "string"
    }
  ],
  "usage": {
    "used_bytes": 0,
    "limit_bytes": 0,
    "items": 0
  }
}

404 Unknown media

{
  "success": false,
  "message": "string",
  "error": "string",
  "error_code": "string"
}

413 Library full

{
  "success": false,
  "message": "string",
  "error": "string",
  "error_code": "string"
}
POSTapi.reelspan.com/v1/library/importTry it →

Request body

application/json

  • urlstringrequired
  • titlestring

Responses

200 Imported

{
  "success": true,
  "item": {
    "media_id": "string",
    "kind": "video",
    "title": "string",
    "filename": "string",
    "content_type": "string",
    "size_bytes": 0,
    "duration_seconds": 0,
    "width": 0,
    "height": 0,
    "saved_at": "string",
    "url": "string"
  },
  "usage": {
    "used_bytes": 0,
    "limit_bytes": 0,
    "items": 0
  }
}

400 Could not fetch

{
  "success": false,
  "message": "string",
  "error": "string",
  "error_code": "string"
}

413 Too large or library full

{
  "success": false,
  "message": "string",
  "error": "string",
  "error_code": "string"
}
DELETEapi.reelspan.com/v1/library/{media_id}Try it →

Parameters

  • media_idstring · pathrequired

Responses

200 Removed

{
  "success": true,
  "media_id": "string"
}

404 Not in the library

{
  "success": false,
  "message": "string",
  "error": "string",
  "error_code": "string"
}
GETapi.reelspan.com/v1/library/{media_id}/fileTry it →

Parameters

  • media_idstring · pathrequired

Responses

404 Not in the library

{
  "success": false,
  "message": "string",
  "error": "string",
  "error_code": "string"
}

Something unclear or missing? Write to [email protected] and we’ll fix the page.