logo
Upload url

Generate image upload URL

Generate a presigned URL for uploading images.

POST
/images/upload-url

Authorization

x-kommunity-api-key<token>

In: header

Response Body

Successfully generated upload URL

successRequiredboolean
upload_urlRequiredstring

Presigned URL for uploading the image

image_urlRequiredstring

CDN URL where the image will be accessible after upload

export interface Response {
  success: boolean;
  /**
   * Presigned URL for uploading the image
   */
  upload_url: string;
  /**
   * CDN URL where the image will be accessible after upload
   */
  image_url: string;
}
 
curl -X POST "/api/v1/images/upload-url" \
  -H "x-kommunity-api-key: <token>"
{
  "success": true,
  "upload_url": "https://bucket-name.s3.amazonaws.com/image-key?AWSAccessKeyId=...",
  "image_url": "https://cdn.kommunity.app/image-key"
}