Skip to content

Quick start

By the end of this page you’ll have listed your products, added a customer and opened a ticket for them, all from your terminal.

  1. Make an API key.

    In the Supportaka dashboard, open Developers → API keys → Create API key. Give it a name (for example Quick start) and the scopes products:read, customers:write and tickets:write.

    Copy the key when it’s shown: it starts with spk_ and is shown only once. If you lose it, rotate the key to get a new one.

  2. Find your organization ID.

    It’s on the same Developers page, under Your IDs. Save both values:

    Terminal window
    export SUPPORTAKA_KEY="spk_…"
    export SUPPORTAKA_ORG="your-organization-id"
  3. List your products.

    Customers and tickets belong to a product, so first get its id:

    Terminal window
    curl https://api.supportaka.com/api/v1/organizations/$SUPPORTAKA_ORG/products \
    -H "Authorization: Bearer $SUPPORTAKA_KEY"
    {
    "products": [
    { "id": "01a211b0-054c-7c56-a7ad-0fac8a3d108f", "public_id": "prod_8Jq2…", "name": "Andy Store", "status": "active" }
    ]
    }

    Save the product’s id (the UUID, not the prod_… public ID):

    Terminal window
    export SUPPORTAKA_PRODUCT="01a211b0-054c-7c56-a7ad-0fac8a3d108f"
  4. Add a customer.

    Terminal window
    curl https://api.supportaka.com/api/v1/organizations/$SUPPORTAKA_ORG/products/$SUPPORTAKA_PRODUCT/customers \
    -H "Authorization: Bearer $SUPPORTAKA_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "name": "Ada Obi", "email": "ada@example.com" }'

    The answer is the new customer, with its id.

  5. Open a ticket for them.

    The Idempotency-Key header makes the request safe to retry: send it again with the same key and you get the same ticket back, not a second one.

    Terminal window
    curl https://api.supportaka.com/api/v1/organizations/$SUPPORTAKA_ORG/products/$SUPPORTAKA_PRODUCT/tickets \
    -H "Authorization: Bearer $SUPPORTAKA_KEY" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: order-1042-refund" \
    -d '{
    "customer_id": "CUSTOMER_ID",
    "subject": "Refund for order #1042",
    "description": "The customer asked for a refund in the app.",
    "priority": "high",
    "tags": ["refund"]
    }'

    The ticket appears in the dashboard straight away, ready for your team.