Skip to content

API quickstart

This page takes you from no key to a queued Telegram message in three calls. The public API gives your own code access to contacts, messages, deals, tasks, email, the social inbox and finance records.

All requests go to:

https://api.pinlyx.com

Every request carries an Authorization: Bearer <token> header, where the token is a Pinlyx API key such as csk_live_....

  1. Create an API key.

    In the Pinlyx app, open Settings › Developers, stay on API keys and click Create key. Name it, pick the Live environment and tick the scopes you need, for example contacts:read and telegram:send. Copy the token right away: it is shown only once. API keys are part of the Business plan.

  2. Check the key.

    Call GET /v1/me. Any valid key may call it, no scope needed. It returns the account behind the key and the scopes it holds.

    Terminal window
    curl -s https://api.pinlyx.com/v1/me \
    -H "Authorization: Bearer csk_live_..."
    {
    "id": 42,
    "email": "jane@example.com",
    "name": "Jane Doe",
    "createdAt": "2026-01-15T09:00:00Z",
    "apiKey": {
    "keyId": "a1b2c3d4e5f6",
    "scopes": ["contacts:read", "telegram:send"]
    },
    "workspace": { "activeId": 7, "role": "Owner", "canWrite": true, "header": "X-Workspace-Id", "available": [] }
    }
  3. Queue a Telegram message.

    With the telegram:send scope, call POST /v1/telegram/messages. accountId is one of your connected Telegram accounts (GET /v1/accounts lists them). Name the recipient with contactId, username or telegramUserId. The call returns 202 Accepted at once with the queued job; the background worker sends it.

    Terminal window
    curl -s -X POST https://api.pinlyx.com/v1/telegram/messages \
    -H "Authorization: Bearer csk_live_..." \
    -H "Content-Type: application/json" \
    -d '{
    "accountId": 7,
    "username": "john_doe",
    "text": "Hi from Acme!"
    }'
    {
    "Id": 1024,
    "AccountId": 7,
    "Status": "queued",
    "RunAt": "2026-05-01T08:00:00Z",
    "CreatedAt": "2026-05-01T08:00:00Z"
    }