Quickstart

From a fresh terminal to your first contact upserted into SendGrid in under five minutes — assuming the prerequisites below.

Before you start

Phase 1 status: the CLI ships from source (not yet on npm). The npm i -g @vorlek/cli path lands in Phase 3.

Step 1 — Install the CLI

git clone https://github.com/vorlek/vorlek-cli.git
cd vorlek-cli
pnpm install
pnpm build
pnpm link --global

vorlek --version

If pnpm link --global fails with a PNPM_HOME error, run pnpm setup first and follow its instructions to update your shell rc, then re-open the terminal.

Step 2 — Sign up

vorlek auth signup

Interactive prompts ask for an email and a password (≥ 8 chars). You get back two API keys:

Step 3 — Connect SendGrid

vorlek connect sendgrid --api-key SG.your_sendgrid_key_here

Vorlek validates the key against GET /v3/user/profile, encrypts it with AES-256-GCM, and stores the ciphertext server-side. If the key is wrong or lacks scope, you get a clear error before anything is stored.

Step 4 — Upsert your first contact

vorlek contact upsert \
  --email jamie@example.com \
  --first-name Jamie \
  --properties '{"plan":"free","loyalty_tier":"gold"}'

Behind the scenes:

  1. Vorlek normalizes the input + dispatches to the SendGrid adapter.
  2. For each property the adapter doesn't know yet (plan, loyalty_tier), it auto-creates the field at SendGrid and records the mapping.
  3. It calls PUT /v3/marketing/contacts and returns the unified envelope.

Successful output:

contact_id        f1ec8680-...
action            upserted
fields_auto_created   plan, loyalty_tier
provider          sendgrid
quota             1 / 1000 (resets 2026-05-01)

Step 5 — Verify in SendGrid

Open mc.sendgrid.com/contacts and search for jamie@example.com. You should see the contact with plan and loyalty_tier populated. If the new fields don't appear in the contact yet, give it 1–2 minutes — SendGrid takes a moment to index newly-created custom fields.

What's next

Direct API call (no CLI)

If you'd rather skip the CLI and call the REST API yourself:

curl -X POST https://api.vorlek.com/v1/tools/upsert_contact \
  -H "Authorization: Bearer vk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jamie@example.com",
    "first_name": "Jamie",
    "properties": {"plan": "free", "loyalty_tier": "gold"}
  }'

You get a Vorlek key the same way — POST https://api.vorlek.com/v1/accounts/signup with {"email": "...", "password": "≥12 chars"} returns the live + test keys.