General
Presigned URLs API
Generate presigned URLs for uploading files to S3.
Endpoint
POST /identity/presigned_urlsPayload
{
"files": [
{
"bucket": "kulcare-stag-profile-images",
"file_path": "users/123/avatar.jpg"
}
]
}| Field | Type | Required | Description |
|---|---|---|---|
files | Array | Yes | Array of file objects |
files[].bucket | String | Yes | S3 bucket name |
files[].file_path | String | Yes | Key/path for the file in S3 |
Response
{
"data": {
"ps_urls": [
"https://kulcare-stag-profile-images.s3.amazonaws.com/users/123/avatar.jpg?X-Amz-Algorithm=..."
],
"type": "presigned_url",
"message": "data fetched"
},
"meta": {
"request_id": "uuid-here"
}
}Usage
After receiving the presigned URL, make a PUT request to the URL to upload the file:
curl -X PUT "<presigned_url>" \
-H "Content-Type: image/jpeg" \
--data-binary @file.jpg