Amazon S3 Export

Stream PDF and image output directly to your S3 bucket by adding an s3 object to any convert request.

Request Example

curl -X POST https://api.sigli.dev/v1/process \
  -H "X-API-Key: sig_live_xxx" \
  -H "X-Convert-Type: html-to-pdf" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "<h1>Tax Invoice KOS/2026-27/0418</h1><p>Kaveri Office Systems Pvt. Ltd. to Nandi Hills Organics LLP</p>…",
    "format": "A4",
    "s3": {
      "bucket": "my-invoices",
      "key": "invoices/2026-10/KOS-2026-27-0418.pdf",
      "region": "us-east-1"
    }
  }'

When s3 is set the API returns JSON instead of binary:

{
  "success": true,
  "meta": { "type": "html-to-pdf" },
  "data": {
    "stored": {
      "provider": "s3",
      "bucket": "my-invoices",
      "key": "invoices/2026-10/KOS-2026-27-0418.pdf",
      "storage_url": "https://my-invoices.s3.amazonaws.com/invoices/2026-10/KOS-2026-27-0418.pdf",
      "size_bytes": 186320,
      "content_type": "application/pdf"
    }
  }
}

Required IAM Policy

Grant the Sigli service principal write access to your bucket:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "SigliWrite",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::123456789012:root"
      },
      "Action": [
        "s3:PutObject",
        "s3:PutObjectAcl"
      ],
      "Resource": "arn:aws:s3:::my-invoices/*"
    }
  ]
}
Note: Uploaded objects are always written with a public-read ACL — there's no per-request override for this today.