Skip to main content

Specify Folder ID

Learn how to organize your uploads by specifying destination folders when uploading media via the API.

Vatsal Shah avatar
Written by Vatsal Shah
Updated over 2 weeks ago

Specify Folder ID

Overview

Organize your media files by choosing exactly where they are stored. This feature allows you to direct your uploads to specific folders, making it easier to manage and locate your content.

Keep your media library tidy and efficient by assigning uploads to relevant folders, saving you time when you need to find specific files.

How It Works

When uploading media, you can include a folderId in your API request. This tells the system which folder to place the file in.

If you don't specify a folder, your media will automatically go to your default "Uploads" folder.

Configuration

You can specify the destination folder for your media uploads by including the folderId parameter in your API request body.

The endpoint for uploading media is:

POST /api/v1/media/upload

Include the following parameter in your JSON body or form-data:

Parameter

Type

Description

folderId

string

The unique ID of the folder where you want the file to be stored.

Default Behavior

  • If folderId is not provided or is empty, the system will automatically upload the file to your default "Uploads" folder.

  • If the provided folderId does not exist or you do not have permission to access it, the system may fall back to the default folder or return an error depending on your permissions.

Examples

Here is an example of a request body:

{
  "url": "https://example.com/video.mp4",
  "name": "My Video",
  "folderId": "folder_123456789"
}

Finding Your Folder ID

You can find the folderId by navigating to the folder in the Speak AI dashboard and looking at the URL bar. Alternatively, you can use the "List Folders" API endpoint to retrieve a list of your available folders.

Next Steps

Ready to organize your media?

  • Try uploading a file and specify a folderId to see it in action.

  • Explore your folders to ensure your media is being stored as expected.

Need help? Contact our support team or check out our other guides.

Did this answer your question?