Get started

Quickstart

Create an API key, authenticate, create your first task, and subscribe to an event.

By the end of this guide, you'll have an API key, you'll have read data from the CRM and created a task, and you'll have set up a webhook that notifies you when an opportunity is won.

  1. 1

    Create an API key

    Sign in to the CRM with an admin account and open the Settings → Developers (Ayarlar → Geliştiriciler) page (https://ornek.solk.app/settings/developers). Give the key a recognizable name (e.g. "Accounting sync") and click Create key (Anahtar oluştur).

    The key starts with sk_ and is shown only once; save it to a password manager right away. The key runs with the permissions of the admin who created it and stays valid until it's revoked.

    An API key is like a password with full access. Don't put it in code that runs in the browser, in a mobile app, or in a public repository. For apps that act on behalf of a user, use OAuth.

  2. 2

    Authenticate

    Add the Authorization: Bearer <key> header to every request. Make GET /api/v1/me your first call: it returns who the key belongs to, the enabled modules, and the installation's stage keys.

    curl https://ornek.solk.app/api/v1/me \
      -H "Authorization: Bearer $SOLK_API_KEY"

    ok: true in the response means the request succeeded. Failed requests return ok: false, a machine-readable error code, and a message you can show to the user — see Errors for details.

  3. 3

    Read records

    Fetch open opportunities sorted by value:

    curl "https://ornek.solk.app/api/v1/opportunities?scope=all&sort=value&per=10" \
      -H "Authorization: Bearer $SOLK_API_KEY"

    List endpoints return rows, total, page, and pages. To get a single record in full, request it by ID: GET /api/v1/opportunities/{id}.

  4. 4

    Create a task

    curl https://ornek.solk.app/api/v1/tasks \
      -H "Authorization: Bearer $SOLK_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "title": "Fiyat listesini gönder",
        "customer": "Kuzey Plastik Sanayi",
        "due_date": "2026-10-05",
        "due_time": "10:30",
        "priority": "Yüksek"
      }'

    The task is assigned to the key's owner (use assigned_to to assign it to someone else). The company is matched by name; no project is created automatically. The task shows up immediately in the CRM's Actions (Aksiyonlar) list and in its owner's phone calendar.

  5. 5

    Subscribe to events

    Open Settings → Apps → Webhook (Ayarlar → Uygulamalar → Web kancası), enter your receiving URL, and select the Opportunity won (Fırsat kazanıldı) event. When the event occurs, the CRM sends signed JSON to your URL:

    {
      "event": "opp_won",
      "title": "Fırsat kazanıldı",
      "text": "Kuzey Plastik Sanayi · Streç film tedariki · 338.400 € · Sorumlu: Deniz Aksoy",
      "url": "https://ornek.solk.app/opportunities/53",
      "data": { "id": 53, "rid": "006Xq3…", "name": "Streç film tedariki", "customer": "Kuzey Plastik Sanayi",
                "customer_id": 31, "stage": "Win", "stage_label": "Win", "value": 338400.0, "currency": "EUR", "owner": "Deniz Aksoy" },
      "workspace": "Örnek Kimya",
      "app": "Solk CRM",
      "sent_at": "2026-10-02T14:05:11"
    }

    To learn how to verify the signature, see Webhooks.

Next steps