API Documentation
Integrate Gofile's powerful storage and content delivery capabilities into your applications with our REST API.
BETA Status
This API is currently in BETA and may undergo changes and improvements. We recommend checking this documentation regularly for updates and new features.
Authentication
All API requests require an API token for authentication. Include your token in the request headers:
Authorization: Bearer YOUR_API_TOKEN
Get your API token from your profile page.
Rate Limits
Rate limits are enforced on a per-endpoint basis. When exceeded, requests will receive a
429 Too Many Requests
response.
For security reasons, specific rate limit values are not publicly disclosed. Normal API usage should not trigger these limits.
Need higher limits for your use case? Contact our support team to discuss custom solutions.
Account Structure
Each account is assigned a permanent root folder that serves as the base for all content organization:
All files and subfolders must exist within this root structure. The root folder cannot be deleted or moved.
Parameters
Query ParametersSpecify region preference for server location. Available options:
eu
Europe
na
North America
Falls back to other zones if specified zone is unavailable.
Upload files to your specified server. The server URL should be obtained from the /servers
endpoint.
- Create a guest account
- Generate a new public folder in the root directory
- Upload the file to this folder
Parameters
Content-Type: multipart/form-dataThe file to be uploaded to the server
Identifier of the destination folder. If not provided, a new public folder will be created.
Creates a new folder within your specified parent folder. Use this endpoint to organize your content hierarchically.
Parameters
Content-Type: application/jsonThe identifier of the parent folder where the new folder will be created. Must be a valid folder ID from your account.
Custom name for the new folder. If not provided, the system will generate a unique folder name automatically.
Modify specific attributes of a file or folder. Different attributes are available depending on the content type.
Parameters
Content-Type: application/jsonThe attribute to modify. Available options:
name
Content name (files & folders)
description
Download page description (folders only)
tags
Comma-separated tags (folders only)
public
Public access status (folders only)
expiry
Expiration date timestamp (folders only)
password
Access password (folders only)
The new value for the specified attribute. Expected format depends on the attribute:
name | String value for the content name |
description | Text description for the download page |
tags | Comma-separated string (e.g., "tag1,tag2,tag3") |
public | Boolean string ("true" or "false") |
expiry | Unix timestamp (e.g., 1704067200) |
password | String value for the access password |
Permanently deletes specified files and folders from your account. This action cannot be undone.
Parameters
Content-Type: application/jsonA comma-separated list of content IDs to delete.
Retrieves detailed information about a folder and its contents, including metadata and file listings.
Parameters
Query ParametersSHA-256 hash of the password for accessing password-protected content
Search for files and folders within a specific parent folder based on name or tags.
Query Parameters
The identifier of the folder to search within. Must be a valid folder ID from your account.
Search string to match against content names or tags.
Search Behavior
- Matches are case-insensitive
- Partial matches are supported (e.g., searching "doc" will match "document.pdf")
- Results include matches in both content names and tags
Creates a direct access link to your content. For folders, the system automatically generates a ZIP archive containing all files.
Parameters
Content-Type: application/jsonUnix timestamp when the direct link should expire. If not specified, the link will remain active indefinitely.
Array of IP addresses allowed to access the direct link. Access will be restricted to these IPs only.
["192.168.1.1", "10.0.0.1"]
Array of domains allowed to embed or access the direct link. Useful for restricting content embedding.
["example.com", "subdomain.example.com"]
Array of username:password combinations required for basic authentication access.
["user1:pass1", "user2:pass2"]
Updates the configuration of an existing direct link. Use this endpoint to modify access restrictions or update expiration settings.
Parameters
Content-Type: application/jsonNew Unix timestamp for link expiration.
Updated list of allowed IP addresses.
["192.168.1.1", "10.0.0.1"]
Updated list of allowed domains.
["example.com", "subdomain.example.com"]
Updated list of username:password pairs.
["user1:pass1", "user2:pass2"]
Permanently removes a direct link to content. Once deleted, the link cannot be recovered.
Copy multiple files or folders to a specified destination folder.
Parameters
Content-Type: application/jsonComma-separated list of content IDs to copy.
The identifier of the destination folder where contents will be copied to.
Move multiple files and/or folders to a specified destination folder. This operation preserves all content attributes and permissions while updating their location in your storage hierarchy.
Parameters
Content-Type: application/jsonComma-separated list of content IDs to be moved. Can include both file and folder IDs.
The identifier of the destination folder where the contents will be moved. Must be a valid folder ID from your account.
Import public content into your account's root folder. This is useful for saving shared content to your personal storage space.
Parameters
Content-Type: application/jsonComma-separated list of content IDs to import into your root folder
Retrieves the account ID associated with the provided API token. This endpoint is useful for identifying your account when making subsequent API calls.
Retrieves detailed information about a specific account.
/accounts/getid
endpoint.
Resets your current authentication token and generates a new one. A login link containing the new token will be sent to your registered email address.
/accounts/getid
endpoint.
Need help with integration? Contact our support team.