QuickstartMenu
On this page

Quickstart

Check your key, send a test email and read back what happened to it.

View as MarkdownOpen in ClaudeOpen in ChatGPTUpdated

By the end you’ll have a working key, the ID of one sent message and its delivery status, from three requests in your shell. The email goes to a test address, so nothing reaches an inbox.

Before you start

  • Workspace access. You need a Kirora workspace: sign up at kirora.io (see Choose an integration). Admins, developers and the owner can create API keys. A key a developer creates can’t hold transactional:send, so for this guide ask an admin or the owner for the key, or have them create it.
  • An API key from Developer → API keys, with the scopes this guide needs: transactional:send to send and messages:read to read the message back. Checking the key with GET /v1/me needs no scope. The key is shown once, when you create it. See Authentication.
  • A verified and approved sending domain to send from: add one under Settings › Email sending, publish the records it shows, and fill in the workspace’s sending profile so Kirora can review it. Nothing sends from a new domain until it’s approved, test emails included.
  • cURL and jq in your shell.

Then set the key and the API address in your shell:

Terminal
export KIRORA_API_URL=https://api.kirora.io
export KIRORA_API_KEY=kirora_...

1 Check the key

Terminal
curl "$KIRORA_API_URL/v1/me" \
  --fail-with-body --silent --show-error \
  -H "Authorization: Bearer $KIRORA_API_KEY"

It returns your workspace and the key’s scopes (the ids and names are yours):

JSON
{
  "data": {
    "workspace": { "id": "0192f3a0-0000-7000-8000-000000000001", "name": "Juniper Kitchen" },
    "apiKey": {
      "id": "0192f3a0-0000-7000-8000-000000000002",
      "name": "Quickstart",
      "kind": "integration",
      "source": "http_api",
      "scopes": ["messages:read", "transactional:send"]
    }
  }
}

Check that transactional:send and messages:read are among the scopes before you go on.

2 Send a test email

Replace mail.yourdomain.com with your verified domain. example.com is a test address: the send goes through every check a real one does, then stops before delivery, and counts toward no limit.

Terminal
curl "$KIRORA_API_URL/v1/transactional/messages" \
  --fail-with-body --silent --show-error -o kirora-send.json \
  -H "Authorization: Bearer $KIRORA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: quickstart-email-001" \
  -d '{
    "to": { "email": "[email protected]" },
    "email": {
      "from": "Juniper Kitchen <[email protected]>",
      "subject": "Your first Kirora test",
      "html": "<p>Your integration accepted its first test message.</p>"
    }
  }'

The Idempotency-Key makes the send safe to retry: a retry with the same key and body returns the original message, as it stands now, without sending again. Use a new key for a new email. Sending to an address no contact has creates the contact.

The API returns 202 Accepted: the message is queued, not yet sent. kirora-send.json holds something like this (the id and time vary):

JSON
{
  "data": {
    "messages": [
      {
        "id": "0192f3b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
        "channel": "email",
        "status": "queued",
        "correlationId": null,
        "createdAt": "2026-10-23T09:30:00.000Z",
        "sendAt": null,
        "fallbackFor": null
      }
    ],
    "skippedChannels": []
  }
}

3 Read the message

Take the message’s id from the response:

Terminal
MESSAGE_ID=$(jq -er '.data.messages[0].id' kirora-send.json)

and read it:

Terminal
curl "$KIRORA_API_URL/v1/messages/$MESSAGE_ID" \
  --fail-with-body --silent --show-error \
  -H "Authorization: Bearer $KIRORA_API_KEY"

A message starts as queued and is processed within seconds; if it is still queued, read it again shortly. A test address ends as status: "skipped" with skip.reason: "test_email": the email passed every check and was not delivered.

To see a real delivery:

  1. Set a new Idempotency-Key (for example quickstart-email-002) and "to": { "email": "…" } to an address you can read, then run step 2 again. Reusing the first key with a changed body returns 409 IDEMPOTENCY_KEY_REUSED.
  2. Read the new message as in step 3. It moves from queued to sent, then to delivered once the recipient’s mail server accepts it; check your inbox, and the spam folder, since delivered does not say which.

In your application, learn outcomes from webhooks rather than by reading in a loop. Every status is listed in Transactional messages.

If something goes wrong

  • 401 UNAUTHORIZED: the key is wrong, revoked or expired. Copy it again or create a new one.
  • 403 SCOPE_MISSING names the scope the key lacks, in details.requiredScope.
  • 409 SENDING_DOMAIN_UNVERIFIED means the from address is not on a verified domain.
  • 403 SENDING_REVIEW_REQUIRED means the domain is verified but not yet approved. details.status says where its review stands: not_requested means the workspace’s sending profile is not filled in yet (see Errors).
  • Anything else: every response carries an X-Request-Id header, and an error body carries it as error.requestId. Quote it to support. See Troubleshoot your integration.

Next steps

  • Transactional messagesStored templates, push, scheduling and batches
  • IDs and identityIdentify your users as contacts
  • EventsTrack what contacts do, to drive journeys and segments
  • WebhooksLearn what happened to each message as it happens
  • AgentsLet an AI assistant build the rest of the integration with you