Docs/Getting Started

Getting Started

This guide walks you through integrating Apertur into your application. You will create a project, generate an API key, configure a destination, create an upload session, and receive your first image.

1

Sign up and create a project

Go to apertur.ca/register and create your account. Once logged in, navigate to Dashboard → Projects → New Project.

Each project has its own API keys, destinations, and upload history. Choose a plan when creating the project.

2

Create an API key

Inside your project, go to API Keys → New key. Give the key a label for easy identification.

Copy your key immediately — it will not be shown again. Keys follow the format:

aptr_a1b2c3d4e5f6...
3

Configure a destination

Before creating upload sessions, you need to tell Apertur where to deliver the photos. Navigate to Dashboard → Your Project → Destinations → New destination.

Apertur supports 9 destination types: Webhook, S3, Google Drive, Dropbox, OneDrive, FTP/SFTP, WebDAV, Azure Blob, and Box.

Quickstart: Webhook destination

  1. Go to Destinations → New destination
  2. Choose "Webhook" as the type
  3. Enter your endpoint URL and save — note the destination ID

When creating an upload session, you pass the destination_ids to specify where images are delivered. If you omit it, the API key’s default destinations are used.

See the Upload Sessions documentation for all destination types and their configuration options.

4

Create an upload session

Make a POST request to /v1/sessions with your API key. Pass an array of destination_ids to specify where images are delivered.

curl -X POST https://api.apertur.ca/v1/sessions \
  -H "Authorization: Bearer aptr_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "destination_ids": ["dest_xxxx"],
    "tags": ["user:usr_123"]
  }'

Response

{
  "uuid": "sess_01HX4ABCDEFGHIJKLMN",
  "destinations": [
    { "id": "dest_xxxx", "type": "webhook", "name": "My Webhook" }
  ],
  "long_polling": false,
  "expires_at": "2024-03-29T10:00:00Z",
  "password_protected": false
}
5

Display the QR code to your user

The response includes a uuid that identifies the session. Build the upload URL and generate a QR code to display in your application. When the user scans it, they are taken to the Apertur interface — no app install required.

You can also share the URL directly via SMS or email. The interface is a Progressive Web App optimized for mobile cameras.

6

Receive images at your destination

After the user submits their photos, Apertur delivers each image to your configured destinations. For webhook destinations, we POST each image in multipart format with session metadata in the headers.

// Express.js webhook handler
app.post("/webhook", express.raw({ type: "multipart/*" }), (req, res) => {
  const sessionId = req.headers["x-aptr-session-id"];
  const imageIndex = req.headers["x-aptr-image-index"];
  const signature = req.headers["x-aptr-signature"];

  // Verify signature (recommended)
  if (!verifySignature(req.body, signature, process.env.WEBHOOK_SECRET)) {
    return res.status(401).end();
  }

  // Process the image...
  res.status(200).end();
});

See the Webhooks documentation for signature verification and retry policy details.