Media
Generate a presigned URL for file upload
Generates a presigned S3 URL that the caller can use to upload a file (e.g. a KYC document) directly to Afriex's secure storage. The returned URL is time-limited and scoped to the requested operation. The file name is sanitised before it is used: any directory part is dropped, characters outside A-Z a-z 0-9 . _ - become _, and the result is cut to 200 characters. The object is stored as {businessId}/{sanitisedName}, so always use the returned key, not the name you sent, when you reference the file in a later request.
post/api/v1/media/url
Request
- Base URLhttps://sandbox.api.afriex.com
- AuthAPI key in header x-api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"fileName": "document.pdf"
}Response
Presigned URL generated successfully.
Example response
{
"data": {
"url": "https://s3.amazonaws.com/bucket/key?X-Amz-Algorithm=AWS4-HMAC-SHA256&...",
"key": "64f0c2a1e4b0a1b2c3d4e5f6/invoice.pdf",
"expiresIn": 300
}
}Changes
No recorded changes to this operation across all 1 revision of this API.