GET /api/embed/session/submissions

Returns the current visitor's own submissions for a tracking page. Used by the widget's "Your submissions" section to show pending / approved status after a visitor submits.

The session is identified by the embed_session cookie, which the iframe sets automatically when the page is first loaded.

Request

GET /api/embed/session/submissions?trackingPageId=abc123 HTTP/1.1
Host: walletsleuth.app
Authorization: Bearer ws_pub_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Origin: https://example.com
Cookie: embed_session=<session-cookie>

Query parameters

NameTypeRequiredNotes
trackingPageIdstringyesTracking page ID. Must match the key.

Headers

HeaderRequiredNotes
AuthorizationyesBearer <api_key>.
Originyes for public keysMust be allowlisted.
Cookie: embed_session=...effectively yesWithout it, the response is always an empty list.

Success response

200 OK:

{
  "submissions": [
    {
      "id": "WvE7aB9c2D4f…",
      "walletAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
      "nickname": "Early holder",
      "status": "pending",
      "rejectReason": null,
      "createdAtIso": "2026-04-21T14:32:16.245Z",
      "decidedAtIso": null
    },
    {
      "id": "XkL2mN9p0Q…",
      "walletAddress": "8abcXYZdef8…",
      "nickname": "Co-founder",
      "status": "approved",
      "rejectReason": null,
      "createdAtIso": "2026-04-20T09:11:03.102Z",
      "decidedAtIso": "2026-04-20T10:04:11.899Z"
    }
  ]
}

Response fields

FieldTypeNotes
submissionsarrayUp to 50 most recent submissions for this session + page, newest first. Empty array if no session cookie.
submissions[].idstringSubmission document ID.
submissions[].walletAddressstringBase58 address submitted.
submissions[].nicknamestringNormalized nickname as stored.
submissions[].statusstringpending, approved, rejected, auto_approved, or soft_rejected.
submissions[].rejectReasonstring | nullmanual, rate_limited, queue_full, duplicate, ca_gate, cooldown, or null if not rejected.
submissions[].createdAtIsostringISO 8601 UTC timestamp.
submissions[].decidedAtIsostring | nullISO 8601 UTC timestamp of approve/reject. Null while pending.

Ordered by createdAt descending, limit 50.

Error responses

StatuserrorMeaning
400missing_tracking_page_idtrackingPageId query parameter wasn't provided.
401missing_key / invalid_key / revoked_keySee Authentication.
401missing_originPublic key with no Origin/Referer.
403origin_not_allowedOrigin not on the key's allowlist.
429rate_limit_key / rate_limit_ipGlobal rate limits. Retry-After included.

How sessions work

The embed session is a signed, server-sealed cookie:

  • Name: embed_session.
  • Scope: Path=/embed, SameSite=None; Secure; HttpOnly.
  • Lifetime: 30 days.
  • Content: opaque to the client.

The cookie is set by the iframe route on first visit (and only the iframe route — the API routes don't mint sessions). That means:

  • Iframe-loaded widgets: the cookie rides along on every fetch to /api/embed/* because the widget uses credentials: 'include'. The visitor sees their submissions.
  • Custom UIs that never load the iframe: no session cookie is ever set. Calls to this endpoint return { "submissions": [] } with a 200 even when the visitor has submitted via the API. To build a custom "your submissions" view, you'd need to track the mapping server-side or display the most recent submissionId the client received from POST /submissions.

Polling

Safe to poll at a low rate (e.g. every 5–10 seconds) to reflect status changes. Global per-key and per-IP rate limits apply. There's no dedicated websocket or SSE feed in the public API.

Example (fetch)

const res = await fetch(
  `https://walletsleuth.app/api/embed/session/submissions?trackingPageId=${pageId}`,
  {
    headers: {
      Authorization: `Bearer ${publicKey}`,
    },
    credentials: 'include', // crucial — sends the embed_session cookie
  },
);
const { submissions } = await res.json();

Preflight (OPTIONS)

Returns 204 with:

Access-Control-Allow-Origin: <request origin>
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Headers: Authorization
Access-Control-Allow-Credentials: true
Access-Control-Max-Age: 600
Vary: Origin

Related