Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.antryk.com/llms.txt

Use this file to discover all available pages before exploring further.

Upload an object (file) to Antryk Storage using a simple and optimized API. This endpoint allows you to directly upload files to a specific bucket and path by defining them in the URL itself, making the request cleaner and more efficient.
curl --request POST \
  --url "https://storage.apis.antryk.com/api/v1/buckets/upload-final-v1/objects/uploads/po.exe" \
  --header "x-access-key: YOUR_ACCESS_KEY" \
  --header "x-secret-key: YOUR_SECRET_KEY" \
  --header "Content-Type: multipart/form-data" \
  --form "file=@YOUR_FILENAME"
For Node.js applications, it is recommended to use the official @antryk/sdk.
The SDK abstracts authentication, request handling, and validation, allowing you to upload files using simple method calls instead of manually constructing HTTP requests.
Send this request as multipart/form-data. Only the file field should be included in the body. All other details such as bucket name and object path must be provided via the URL, and authentication must be passed via headers.
This is the recommended and modern approach for uploading files to Antryk Storage:
  • Only the file is sent in the request body.
  • The bucket name and object path are defined directly in the URL.
  • Authentication is handled via headers:
    • x-access-key
    • x-secret-key
This approach simplifies request structure, improves clarity, and aligns better with RESTful API design.
⚠️ The older approach (sending bucket, key, accessKey, and secretKey in the body) is still supported for backward compatibility, but it is strongly recommended to migrate to this new method for better performance, security, and maintainability.

Request Parameters

name
string
required
The name of the storage bucket. This is specified in the URL path.
path
string
required
The full path (including filename) where the object will be stored inside the bucket.
x-access-key
string
required
Your Antryk access key used for authentication. You can obtain this from the Antryk Console.
x-secret-key
string
required
Your Antryk secret key used for authentication. Keep this secure and never expose it publicly.
file
file
required
The file to upload. Must be sent as multipart/form-data.

Examples

name
string
required
Example: upload-final-v1
path
string
required
Example: uploads/po.exe
x-access-key
string
required
Example: YOUR_ACCESS_KEY
x-secret-key
string
required
Example: YOUR_SECRET_KEY
file
file
required
Example: YOUR_FILENAME

Additional Notes

  • Ensure the file size and type comply with your bucket configuration and limits.
  • The path should include the full directory structure along with the filename.
  • If a file already exists at the specified path, it may be overwritten depending on your storage settings.
  • Always keep your access credentials secure. Avoid exposing them in frontend applications.

Response

Returns a JSON object with upload confirmation including the object key and metadata.
{
  "success": true,
  "key": "uploads/po.exe",
  "bucket": "upload-final-v1"
}