Skip to content

Quickstart

Zero to a saved, shareable snippet in five minutes — once via the API, once via the CLI.

1. Get a token

Sign in at the console (passwordless — Google, GitHub, magic link, or passkey) and create an API key under Settings → API keys. Keys are scoped; read + write is enough for this guide.

text
qd_live_5a2c…   ← keep it secret; it acts as you

2. Create a snippet (HTTP)

One request. The response already contains the public link — the same "save & copy link" gesture the UI performs.

bash
curl -X POST https://api.quietdesk.dev/v1/snippets \
  -H "Authorization: Bearer qd_live_…" \
  -H "Idempotency-Key: ik_quickstart_001" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "sql",
    "name": "Refund eligibility check — last 90 days",
    "body": "SELECT id, amount_cents FROM charges WHERE created_at >= NOW() - INTERVAL '\''90 days'\'';",
    "tags": ["stripe", "refunds"],
    "visibility": "team"
  }'

Response (201):

json
{
  "id": "snp_7c4b2e09",
  "type": "sql",
  "name": "Refund eligibility check — last 90 days",
  "slug": "refund-eligibility-check-last-90-days",
  "version": 1,
  "visibility": "team",
  "public_url": "https://qd.sk/s/refund-eligibility-check-last-90-days",
  "updated_at": "2026-06-10T09:14:02Z"
}

Share public_url with anyone — it renders the snippet read-only. Delete the snippet (or rotate the link) and the link returns 404.

3. The same thing, via the CLI

bash
npm i -g @quietdesk/cli
qd auth login --key qd_live_…

qd snippets create --type sql --name "Refund eligibility check" -f refund.sql
# ✓ snp_7c4b2e09 saved as v.01 · public link copied to clipboard

4. Let your agent do it

Add the MCP server to your client config and the same verb is a tool call away — see the MCP reference.

json
{ "mcpServers": { "quietdesk": {
  "url": "https://mcp.quietdesk.dev",
  "headers": { "Authorization": "Bearer qd_live_…" }
} } }

What just happened

  • The write was org-scoped (your token's organization) and idempotent (same Idempotency-Key ⇒ same result, no duplicate).
  • An audit event recorded who created it and through which door.
  • The snippet is version 1; every save bumps the version, and history is queryable.

Next: the Glossary for the full data model, or the API guide for errors, pagination, and conventions.

One vocabulary, every door.