Archived docs Get your API Key
Get started
Tutorials
Guides
Reference
Help for AI agents
🤖 AI Assistant

FTP / SFTP delivery

JSON2Video can upload rendered videos straight to your FTP or SFTP server, removing the need to download from our CDN and re-upload. This is the standard way to deliver finished assets to a media management system, a CMS staging area, or a customer's drop folder.

Configuration

Add an FTP or SFTP destination to the exports[].destinations array. We strongly recommend storing credentials in a Dashboard Connection and referencing them by id:

{
  "resolution": "full-hd",
  "scenes": [ /* ... */ ],
  "exports": [{
    "destinations": [{
      "id": "my-sftp-connection",
      "file": "promo-__yyyy__-__mm__-__dd__.mp4"
    }]
  }]
}

Sensitive fields stored in Connections are encrypted at rest. Override any field at request time by re-declaring it — for example, set remote-path per render while reusing the Connection's host / credentials.

Inline credentials (not recommended)

If you must pass credentials inline, use the same JSON shape without an id:

{
  "exports": [{
    "destinations": [{
      "type": "sftp",
      "host": "sftp.example.com",
      "port": 22,
      "username": "uploader",
      "password": "...",
      "remote-path": "/incoming/videos/",
      "file": "__random__.mp4"
    }]
  }]
}

This appears in your API logs and in your codebase. Prefer Connections.

Properties

Property Type Required Notes
type string yes "ftp" or "sftp"
host string yes hostname or IP
port number yes typically 21 for FTP, 22 for SFTP
username string yes account username
password string yes account password / SSH password
remote-path string no directory path; defaults to ./
file string no filename; defaults to a unique name

Filename macros

Both remote-path and file accept macros that are expanded at upload time. The most common:

  • __yyyy__, __mm__, __dd__ — date components
  • __hh__, __nn__, __ss__ — time components
  • __random__ — a random number
  • __filename__ — the original filename JSON2Video assigned

Example dynamic path:

{
  "remote-path": "/customers/acme/__yyyy__/__mm__/",
  "file": "acme-promo-__yyyy__-__mm__-__dd__-__random__.mp4"
}

Operational notes

  • Timeout: the full export step (all destinations combined) must finish within 5 minutes. Very large videos to slow servers may time out.
  • Order: when multiple destinations are listed, they are processed sequentially. The webhook destination (if also present) fires only after all destinations succeed or after the timeout.
  • Failure mode: if the upload fails, the movie's status reports done (the render succeeded) but the export error is logged on the movie object. Monitor for upload failures separately.

See also