There are two ways to upload using the Upload API: you can send a file in one part, or break it into smaller parts.

Full-file Upload

Check the user's quota

Before you begin, call vimeo.videos.upload.getQuota to make sure the user has enough space available in their account, and to let them know if their video will be encoded in HD.

Get an Upload Ticket

Before you can upload a video, you'll need an upload ticket. You can get one by calling vimeo.videos.upload.getTicket. You should receive a response like this:

<?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok" generated_in="0.0028">
    <ticket id="abcdef124567890" endpoint="http://1.2.3.4/upload?ticket_id=abcdef124567890" />
</rsp>

If uploading is currently unavailable, this method will return error 105: Service currently unavailable.

Post the Video

The next step is to POST the video, along with the ticket_id, to the endpoint returned in the vimeo.videos.upload.getTicket call. This call should signed like you would any other API call, but make sure to leave the file data out when generating the signature.

oauth_consumer_key
Your application's consumer key
oauth_nonce
A randomly-generated string that is unique to this API call.
oauth_signature_method
The cryptographic method used to sign the call.
oauth_signature
The generated signature for the call. Do not include the file data.
oauth_timestamp
UNIX timestamp for when the call was generated.
oauth_version
You don't need to include this, but if you do, it must be 1.0.
ticket_id
The ticket id from vimeo.videos.upload.getTicket
file_data
The binary file data

You will receive the MD5 hash of the file back from this call, which you can use to make sure the file uploaded properly.

Confirm the Upload

The final step is to confirm the upload by calling vimeo.videos.upload.confirm. This will complete the upload process and return the video_id. If you do not call this method, the video will not be processed.

<?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok" generated_in="0.0028">
    <ticket id="8d2904e33351c3d198bdeb0668b73768" video_id="12345" />
</rsp>

Segmented Upload

Check the user's quota

Before you begin, call vimeo.videos.upload.getQuota to make sure the user has enough space available in their account, and to let them know if their video will be encoded in HD.

Get an Upload Ticket

Before you can upload a video, you'll need an upload ticket. You can get one by calling vimeo.videos.upload.getTicket. You should receive a response like this:

<?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok" generated_in="0.0028">
    <ticket id="abcdef124567890" endpoint="http://1.2.3.4/upload?ticket_id=abcdef124567890" />
</rsp>

If uploading is currently unavailable, this method will return error 105: Service currently unavailable.

Post the Video files

The next step is to POST the pieces of the video, along with the ticket_id, to the endpoint returned in the vimeo.videos.upload.getTicket call. This call should signed like you would any other API call, but make sure to leave the file data out when generating the signature.

oauth_consumer_key
Your application's consumer key
oauth_nonce
A randomly-generated string that is unique to this API call.
oauth_signature_method
The cryptographic method used to sign the call.
oauth_signature
The generated signature for the call. Do not include the file data.
oauth_timestamp
UNIX timestamp for when the call was generated.
oauth_version
You don't need to include this, but if you do, it must be 1.0.
ticket_id
The ticket id from vimeo.videos.upload.getTicket
file_data
The binary file data

You will receive the MD5 hash of each file as you POST the pieces. You will need these, in order, for the next call.

Note: if more than a couple hours have passed since your ticket was generated, make sure to call vimeo.videos.upload.checkTicket to make sure that your ticket is still valid.

Create the Manifest

You will need to create a manifest of the MD5s of each of the videos you uploaded. The order you put them in will dictate the order that they will be pieced together. This allows you to exclude pieces of the file that were interrupted or incorrectly uploaded. Below is the format of the manifest in XML and JSON:

<?xml version="1.0" encoding="utf-8"?>
<files>
    <file md5="718a4221052e81534696bc84ef5bc195" />
    <file md5="5102c13e6822b630748ffb9d9c212967" />
</files>
{
    "files": [{
        "md5":
        "718a4221052e81534696bc84ef5bc195"
    },
    {
        "md5":
        "5102c13e6822b630748ffb9d9c212967"
    }]
}

Verify the Manifest

POST the manifest to vimeo.videos.upload.verifyManifest. The manifest should not be included in the signature.

If all the pieces that were uploaded are included in the manifest, this method will return the ticket_id and the MD5 of the combined file. If pieces were uploaded and not included in the manifest, this method will also return a list of the MD5s of those pieces.

Confirm the Upload

The final step is to confirm the upload by calling vimeo.videos.upload.confirm. You will need to pass the manifest to this method. This will complete the upload process and return the video_id. If you do not call this method, the video will not be processed.

<?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok" generated_in="0.0028">
    <ticket id="8d2904e33351c3d198bdeb0668b73768" video_id="12345" />
</rsp>