> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useqrkit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve Account

> Identifies the workspace behind the API key. Requires no scope — any valid key
works. Integrations use this as the connection test and to build a
human-readable connection label.




## OpenAPI

````yaml GET /me
openapi: 3.0.3
info:
  title: QRKit API
  description: >
    Programmatic access to QRKit — create, manage and track QR codes.


    All requests are scoped to the **workspace** the API key belongs to:

    QR codes and folders created here appear in the QRKit dashboard and

    vice-versa.


    ## Dynamic vs static


    - **Dynamic** codes encode a short scan URL
    (`https://qrkit.to/{short_code}`,
      or your primary custom domain on Plus and up — see `domain_id`) that
      redirects to your destination or serves a hosted page — editable later,
      with scan analytics.
    - **Static** codes encode their payload directly — nothing to host, but
      the content is fixed once printed and there are no analytics.

    Which types are static, dynamic or either is listed on the `Target`

    schema.


    Dynamic codes have ids like `qr_123`; static codes `sqr_123`.
  version: '2026-02-08'
  contact:
    email: support@useqrkit.com
servers:
  - url: https://api.useqrkit.com/v1
    description: Production
  - url: http://localhost:3001/v1
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Webhooks
    description: >
      Webhook endpoints receive HTTP POST notifications whenever events occur in
      your workspace.

      Each endpoint subscribes to one or more event types (or `*` for all).
      Requires API key

      scopes `webhooks:read` and/or `webhooks:write`.


      Endpoint caps are counted per `source`: up to 10 endpoints created
      directly

      (`source: "api"`, the default) plus up to 50 for each integration platform

      (`zapier`, `make`, `n8n`) — integrations register one endpoint per active

      Zap/scenario and manage their own.


      ## Event catalog


      | Type | Fires when |

      |------|-----------|

      | `qr.created` | A QR code is created via API or dashboard |

      | `qr.updated` | A QR code's name, target, design, tags or active state
      changes |

      | `qr.deleted` | A QR code is deleted (moved to the Trash) |

      | `qr.restored` | A QR code is restored from the Trash: via `POST
      /v1/qr-codes/{id}/restore`, the MCP `restore_qr_code` tool, or the
      dashboard's Trash. `data` is the full restored QR code. Dashboard restores
      also send `qr.updated`, as they did before this event existed |

      | `qr.scanned` | A dynamic QR code is scanned (see privacy guarantee
      below) |

      | `batch.completed` | All items in a batch job have finished processing |

      | `batch.failed` | A batch job failed globally (not item-level errors) |

      | `lead.captured` | A visitor submits a QRKit lead-capture form (carries
      consented contact data — see note below) |

      | `ping` | Emitted only via `POST /webhooks/{id}/test` to verify
      connectivity |


      ## Event envelope


      Every delivery sends a JSON body with the shape:


      ```json

      {
        "id": "evt_…",
        "object": "event",
        "type": "qr.scanned",
        "created_at": "2026-06-11T12:34:56.789Z",
        "data": { … }
      }

      ```


      Events are addressable via `GET /v1/events/{id}` for 30 days after
      creation.

      Re-fetch authoritative object state via the REST API if you need fields
      beyond what

      the event payload includes — event ordering is not guaranteed.


      ## Signature verification


      Every delivery includes the header:


      ```

      QRKit-Signature: t=1718099696,v1=a3b2c1…

      ```


      The signed string is `"{t}.{raw_request_body}"`. Compute `HMAC-SHA256`
      over that

      string using your endpoint secret (`whsec_…`). Compare the result against
      the `v1=`

      value using a **constant-time** equality function. Reject deliveries where
      the

      timestamp `t` differs from your server clock by more than **5 minutes** to
      prevent

      replay attacks.


      During the 24-hour grace period after a `rotate-secret` call the header
      will contain

      two `v1=` entries (one for each secret). Accept a delivery if **either**
      value matches.


      ## Retry schedule


      Failed deliveries (non-2xx response, timeout, or connection error) are
      retried up to

      7 attempts on an exponential back-off schedule:


      | Attempt | Delay after previous |

      |---------|---------------------|

      | 1 | immediate |

      | 2 | 1 minute |

      | 3 | 5 minutes |

      | 4 | 30 minutes |

      | 5 | 2 hours |

      | 6 | 6 hours |

      | 7 | 24 hours |


      After the 7th failed attempt the delivery moves to terminal `failed`
      status (~33 hours

      total window).


      ## Auto-disable


      After sustained delivery failures the endpoint is automatically set to
      `auto_disabled`

      and an email is sent to the workspace owner. Re-enable it by calling

      `PATCH /v1/webhooks/{id}` with `{ "status": "enabled" }` once your server
      is healthy

      (consecutive failure count resets to zero on re-enable).


      ## Delivery semantics


      - **At-least-once** — the same event may be delivered more than once;
      deduplicate by
        the event `id`.
      - **30-day retention** — events and delivery records are kept for 30 days.

      - **Ordering not guaranteed** — process events idempotently and re-fetch
      authoritative
        state via REST or `GET /v1/events` when you need a consistent view.

      ## qr.scanned privacy guarantee


      Scan events delivered to external endpoints contain **no IP address**,
      **no precise

      location** (no latitude, longitude, or postal code), and **no raw
      user-agent string**.

      The `data` payload is limited to: `country`, `city`, `device`, `os`,
      `browser`,

      `referrer`, and `language`.


      ## lead.captured contents


      Unlike `qr.scanned`, a `lead.captured` event carries the contact data the

      visitor **voluntarily submitted with consent** through a QRKit
      lead-capture

      form — typically `email`, `name`, and `phone`, plus any custom fields. Any

      scan context attached (`scan_context`) still follows the `qr.scanned`

      allowlist (country/city/device/os/browser — never IP, precise location, or

      raw user-agent). Treat the contact fields as PII per your privacy policy.
  - name: Events
    description: >
      Read-only log of dispatched events. An event is recorded when at least one
      enabled

      webhook endpoint is subscribed to its type at the time it occurs, then
      retained for

      30 days. Use this log to replay missed deliveries, audit delivered
      activity, or inspect

      the exact payload QRKit sent. Events that match no enabled endpoint are
      not recorded, so

      this is a log of what was dispatched, not a complete archive of every
      event. Requires the

      `webhooks:read` scope.
  - name: Account
    description: >
      Identify the workspace behind an API key. `GET /me` requires no scope —
      any valid

      key works — making it the connection-test endpoint for integrations
      (Zapier, Make,

      n8n) and a quick way to check which plan, scopes and environment a key
      carries.
paths:
  /me:
    get:
      tags:
        - Account
      summary: Retrieve Account
      description: >
        Identifies the workspace behind the API key. Requires no scope — any
        valid key

        works. Integrations use this as the connection test and to build a

        human-readable connection label.
      operationId: getAccount
      responses:
        '200':
          description: Account details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    Account:
      type: object
      properties:
        object:
          type: string
          example: account
        organization_id:
          type: string
          example: org_2abcDEfGhIjKlMn
        organization_name:
          type: string
          nullable: true
          example: Acme Inc
        plan:
          type: string
          example: pro
        key_prefix:
          type: string
          example: qr_live_a1b2
        scopes:
          type: array
          items:
            type: string
          example:
            - qr:read
            - qr:write
            - webhooks:read
            - webhooks:write
        environment:
          type: string
          enum:
            - live
            - test
        custom_domains:
          type: array
          description: >-
            The workspace's active custom domains — the ids `domain_id` accepts.
            When the plan includes custom domains (Plus and up), new dynamic
            codes go on the one with `is_primary` unless `domain_id` says
            otherwise; on other plans (e.g. during a downgrade's grace period)
            they use the default host and naming a domain returns `403`.
          items:
            type: object
            properties:
              id:
                type: string
                example: dom_3
              hostname:
                type: string
                example: go.acme.com
              is_primary:
                type: boolean
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - invalid_request
                - unauthorized
                - forbidden
                - not_found
                - conflict
                - target_not_editable
                - destination_unsafe
                - unprocessable_entity
                - payload_too_large
                - rate_limit_exceeded
                - internal_error
            message:
              type: string
            reason:
              type: string
              description: |
                Machine-readable reason, where the HTTP code alone is
                ambiguous. `NOT_IN_TRASH` (409): a restore of a code that is
                live. `DEACTIVATED` (409): a restore of a code that is
                switched off but was never deleted — re-activate it with
                `PATCH is_active: true`. `DOMAIN_RETIRED` (409): a restore or
                re-activation of a GS1 code whose custom domain was removed.
                `PLAN_LIMIT` (422): a create, batch, restore, or `PATCH` with
                `is_active: true` the plan has no room for. Parallel API
                requests are serialized per workspace, so they cannot
                together go past the limit.
              enum:
                - NOT_IN_TRASH
                - DEACTIVATED
                - DOMAIN_RETIRED
                - PLAN_LIMIT
            gs1_code:
              type: string
              description: |
                Machine-readable reason for a GS1 failure, where the HTTP code
                alone is ambiguous. Present only on GS1 requests.
              enum:
                - NOT_ENTITLED
                - PLAN_LIMIT
                - INVALID_KEY
                - INVALID_DESTINATION
                - INVALID_LINKS
                - INVALID_OVERRIDES
                - GS1_KEY_TAKEN
                - GS1_KEY_IN_TRASH
                - GS1_KEY_RETIRED
                - GS1_IDENTIFIER_IMMUTABLE
                - GS1_METADATA_MISSING
                - GS1_STATIC_HAS_NO_LINKSET
                - GS1_NOT_A_GS1_CODE
                - GS1_ERROR_CORRECTION_TOO_LOW
                - CREATE_FAILED
            field:
              type: string
              description: >-
                The input to blame, e.g. `primary_key.value`, `destination`,
                `links[2].href`.
            fields:
              type: array
              items:
                type: string
              description: >-
                The immutable identifier fields a PATCH tried to change
                (GS1_IDENTIFIER_IMMUTABLE).
            limit:
              type: integer
              description: >-
                PLAN_LIMIT only — the plan's allowance for the kind of code
                involved: GS1 codes when `gs1_code` is set, otherwise dynamic QR
                codes (`-1` = unlimited).
            current_count:
              type: integer
              description: >-
                PLAN_LIMIT only — codes of that kind the workspace already holds
                (active, not deleted).
            requested:
              type: integer
              description: >-
                PLAN_LIMIT on a batch only — the dynamic (or dynamic GS1) items
                the batch asked for.
            plan_id:
              type: string
              description: PLAN_LIMIT only — the plan the limit was read from.
            doc_url:
              type: string
            request_id:
              type: string
  responses:
    Unauthorized:
      description: >-
        Missing or invalid credentials — including a revoked or expired key, and
        a key whose workspace has been deleted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        Missing scope, the plan does not include this feature, or the
        workspace's billing is paused (API access is off until billing restarts;
        the message gives the date).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limit or monthly quota exceeded — see Retry-After header
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key in the Authorization header: `Bearer qr_live_…` or `Bearer
        qr_test_…`. Token endpoints take a Clerk session JWT instead.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.