{"openapi":"3.1.0","info":{"title":"Lazyform API","version":"1.0.0","description":"Manage forms, read submissions and connect integrations. Authenticate with `Authorization: Bearer lf_api_…`."},"servers":[{"url":"https://lazyform-api.xvelopers.com/api/v1"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API token (lf_api_…) from Settings → API tokens."},"cookieAuth":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"The dashboard login."}},"schemas":{"Me":{"type":"object","properties":{"user":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":["string","null"]},"isAdmin":{"type":"boolean"}},"required":["id","name","email","image","isAdmin"]},"via":{"type":"string","enum":["session","token"]},"workspaces":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}},"endpoints":{"type":"object","properties":{"submit":{"type":"string","example":"https://api.getlazyform.com/submit"}},"required":["submit"]}},"required":["user","via","workspaces","endpoints"]},"Workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"plan":{"type":"string","enum":["free","pro","business"]},"role":{"type":"string","enum":["owner","admin","member"]},"suspended":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"}},"required":["id","name","plan","role","suspended","createdAt"]},"Error":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string","example":"not_found"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["success","error"]},"NameInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]},"Usage":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","business"]},"limits":{"type":"object","properties":{"submissionsPerMonth":{"type":"number"},"overagePer1000":{"type":["number","null"]},"retentionDays":{"type":["number","null"]},"recipientsPerForm":{"type":"number"},"linkedEmails":{"type":"number"},"storageBytes":{"type":"number"},"seats":{"type":"number"},"integrationsPerForm":{"type":"number"}},"required":["submissionsPerMonth","overagePer1000","retentionDays","recipientsPerForm","linkedEmails","storageBytes","seats","integrationsPerForm"]},"period":{"type":"string","example":"2026-12"},"accepted":{"type":"integer"},"spam":{"type":"integer"},"overLimit":{"type":"integer"},"percent":{"type":"integer"},"storageBytes":{"type":"integer"}},"required":["plan","limits","period","accepted","spam","overLimit","percent","storageBytes"]},"Member":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"}},"required":["userId","name","email","image","role","joinedAt"]},"Ok":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]},"Invitation":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"expiresAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"},"expired":{"type":"boolean"}},"required":["id","email","role","expiresAt","createdAt","expired"]},"Project":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"name":{"type":"string"},"formCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"}},"required":["id","workspaceId","name","formCount","createdAt"]},"LinkedEmail":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"verified":{"type":"boolean"},"verifiedAt":{"type":["string","null"],"format":"date-time","example":"2026-12-04T10:00:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"}},"required":["id","email","verified","verifiedAt","createdAt"]},"Form":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"accessKey":{"type":"string","example":"lf_0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p"},"status":{"type":"string","enum":["active","paused"]},"features":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FeatureState"}},"firstSubmissionAt":{"type":["string","null"],"format":"date-time","example":"2026-12-04T10:00:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"},"stats":{"type":"object","properties":{"total":{"type":"integer"},"unread":{"type":"integer"},"spam":{"type":"integer"},"lastSubmissionAt":{"type":["string","null"],"format":"date-time","example":"2026-12-04T10:00:00.000Z"}},"required":["total","unread","spam","lastSubmissionAt"]}},"required":["id","workspaceId","projectId","name","accessKey","status","features","firstSubmissionAt","createdAt","updatedAt","stats"]},"FeatureState":{"type":"object","additionalProperties":{},"description":"A feature's switch (`enabled`) and its options (see config/features.ts for each feature's options)."},"Analytics":{"type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","example":"2026-12-04"},"submissions":{"type":"integer"},"spam":{"type":"integer"}},"required":["date","submissions","spam"]}},"totals":{"type":"object","properties":{"submissions":{"type":"integer"},"spam":{"type":"integer"}},"required":["submissions","spam"]},"topPages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"submissions":{"type":"integer"}},"required":["url","submissions"]}}},"required":["days","totals","topPages"]},"Submission":{"type":"object","properties":{"id":{"type":"string"},"formId":{"type":"string"},"status":{"type":"string","enum":["ok","spam"]},"fields":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]},"description":"The fields in the order the visitor sent them: [name, value]."},"meta":{"type":"object","properties":{"pageUrl":{"type":"string"},"userAgent":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"overLimit":{"type":"boolean"},"test":{"type":"boolean"}}},"spamScore":{"type":["number","null"]},"spamReasons":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string"},"detail":{"type":"string"}},"required":["check"]}},"read":{"type":"boolean"},"readAt":{"type":["string","null"],"format":"date-time","example":"2026-12-04T10:00:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"}},"required":["id","formId","status","fields","meta","spamScore","spamReasons","read","readAt","createdAt"]},"SubmissionDetail":{"allOf":[{"$ref":"#/components/schemas/Submission"},{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}}},"required":["files","deliveries"]}]},"File":{"type":"object","properties":{"id":{"type":"string"},"field":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"integer"}},"required":["id","field","name","contentType","size"]},"Delivery":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string","enum":["email","autoreply","ai_autoreply","integration"]},"integrationId":{"type":["string","null"]},"integrationType":{"type":["string","null"]},"target":{"type":["string","null"]},"status":{"type":"string","enum":["pending","sent","failed","skipped"]},"attempts":{"type":"integer"},"lastError":{"type":["string","null"]},"response":{"type":["string","null"]},"deliveredAt":{"type":["string","null"],"format":"date-time","example":"2026-12-04T10:00:00.000Z"},"nextAttemptAt":{"type":["string","null"],"format":"date-time","example":"2026-12-04T10:00:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"}},"required":["id","channel","integrationId","integrationType","target","status","attempts","lastError","response","deliveredAt","nextAttemptAt","createdAt"]},"IntegrationCatalogEntry":{"type":"object","properties":{"id":{"type":"string","enum":["telegram","discord","slack","whatsapp","sms","webhook","google_sheets","notion","airtable","mailchimp","zapier","make","n8n","turnstile","hcaptcha","recaptcha_v2","recaptcha_v3","smtp","virustotal"]},"kind":{"type":"string","enum":["notify","destination","automation","captcha","email","security"]},"plan":{"type":"string","enum":["free","pro","business"]},"connect":{"type":"string","enum":["fields","oauth"]},"available":{"type":"boolean"}},"required":["id","kind","plan","connect","available"]},"Integration":{"type":"object","properties":{"id":{"type":"string"},"formId":{"type":"string"},"type":{"type":"string","enum":["telegram","discord","slack","whatsapp","sms","webhook","google_sheets","notion","airtable","mailchimp","zapier","make","n8n","turnstile","hcaptcha","recaptcha_v2","recaptcha_v3","smtp","virustotal"]},"enabled":{"type":"boolean"},"config":{"type":"object","additionalProperties":{},"description":"Options without secrets (secrets are never sent back)."},"connected":{"type":"boolean"},"target":{"type":["string","null"]},"lastError":{"type":["string","null"]},"lastErrorAt":{"type":["string","null"],"format":"date-time","example":"2026-12-04T10:00:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"}},"required":["id","formId","type","enabled","config","connected","target","lastError","lastErrorAt","createdAt"]},"ApiToken":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"lastUsedAt":{"type":["string","null"],"format":"date-time","example":"2026-12-04T10:00:00.000Z"},"createdAt":{"type":"string","format":"date-time","example":"2026-12-04T10:00:00.000Z"}},"required":["id","name","prefix","lastUsedAt","createdAt"]}},"parameters":{}},"paths":{"/me":{"get":{"tags":["Workspaces"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Who is calling, and their workspaces","responses":{"200":{"description":"The signed-in person (null for an API token) and the workspaces they can use","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Me"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces":{"get":{"tags":["Workspaces"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"List workspaces","responses":{"200":{"description":"Workspaces you belong to (or the API token’s one)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Workspaces"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Create a workspace","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameInput"}}}},"responses":{"201":{"description":"The new workspace; you are its owner","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Workspace"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{workspaceId}":{"get":{"tags":["Workspaces"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Get a workspace","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"The workspace","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Workspace"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Workspaces"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Rename a workspace (admins)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameInput"}}}},"responses":{"200":{"description":"The renamed workspace","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Workspace"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{workspaceId}/usage":{"get":{"tags":["Workspaces"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"This month's usage against the plan","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Submissions this month, spam blocked, storage, and the plan’s limits","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Usage"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{workspaceId}/members":{"get":{"tags":["Team"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"List members","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"People in the workspace","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{workspaceId}/members/{userId}":{"patch":{"tags":["Team"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Change a member's role (owner)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"usr_123"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["admin","member"]}},"required":["role"]}}}},"responses":{"200":{"description":"Role changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Team"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Remove a member, or leave the workspace","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"usr_123"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{workspaceId}/invitations":{"get":{"tags":["Team"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"List open invitations (admins)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Invitations not accepted yet","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Team"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Invite someone by email (admins)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"role":{"type":"string","enum":["admin","member"],"default":"member"}},"required":["email"]}}}},"responses":{"201":{"description":"Invitation emailed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invitation"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a higher plan (`plan_required`) or a plan limit is reached (`limit_reached`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already a member (`already_member`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{workspaceId}/invitations/{invitationId}":{"delete":{"tags":["Team"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Withdraw an invitation (admins)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"inv_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"invitationId","in":"path"}],"responses":{"200":{"description":"Withdrawn","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invitations/{token}":{"get":{"tags":["Team"],"summary":"What an invitation link is for (no sign-in needed)","parameters":[{"schema":{"type":"string","minLength":10,"maxLength":200},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"The workspace and who invited whom","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspaceName":{"type":"string"},"inviterName":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["workspaceName","inviterName","email","role"]}},"required":["data"]}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Expired (`invitation_expired`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invitations/{token}/accept":{"post":{"tags":["Team"],"security":[{"cookieAuth":[]}],"summary":"Accept an invitation (signed in as the invited address)","parameters":[{"schema":{"type":"string","minLength":10,"maxLength":200},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"You are now a member","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"]}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{workspaceId}/projects":{"get":{"tags":["Projects"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"List projects","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Projects, by name","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Projects"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Create a project","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameInput"}}}},"responses":{"201":{"description":"The new project","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Project"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}":{"patch":{"tags":["Projects"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Rename a project","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"int_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameInput"}}}},"responses":{"200":{"description":"The renamed project","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Project"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Projects"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Delete a project (its forms are kept, ungrouped)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"int_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{workspaceId}/linked-emails":{"get":{"tags":["Linked emails"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"List linked emails","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Addresses forms may send to, confirmed or waiting","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LinkedEmail"}}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Linked emails"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Link an email (admins); a confirmation link is emailed to it","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"}},"required":["email"]}}}},"responses":{"201":{"description":"Waiting for confirmation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LinkedEmail"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a higher plan (`plan_required`) or a plan limit is reached (`limit_reached`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already linked (`already_linked`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/linked-emails/{id}/resend":{"post":{"tags":["Linked emails"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Email the confirmation link again (admins)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"int_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already confirmed (`already_verified`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/linked-emails/{id}":{"delete":{"tags":["Linked emails"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Remove a linked email (admins)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"int_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/linked-emails/verify":{"post":{"tags":["Linked emails"],"summary":"Confirm a linked email with the token from its email (no sign-in needed)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":200}},"required":["token"]}}}},"responses":{"200":{"description":"Confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"email":{"type":"string"},"workspaceName":{"type":"string"}},"required":["email","workspaceName"]}},"required":["data"]}}}},"404":{"description":"Link not valid (`invalid_link`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{workspaceId}/forms":{"get":{"tags":["Forms"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"List forms","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"},{"schema":{"type":"string","maxLength":64,"description":"Only this project’s forms; \"none\" for forms in no project"},"required":false,"description":"Only this project’s forms; \"none\" for forms in no project","name":"projectId","in":"query"}],"responses":{"200":{"description":"Forms, oldest first, with submission counts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Form"}}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Forms"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Create a form","description":"The new form has its own access key and the default features (email notifications and zero-friction spam protection on).","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"projectId":{"type":["string","null"],"maxLength":64}},"required":["name"]}}}},"responses":{"201":{"description":"The new form","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Form"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{formId}":{"get":{"tags":["Forms"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Get a form","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"}],"responses":{"200":{"description":"The form","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Form"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Forms"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Rename, move to a project, pause or resume","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"projectId":{"type":["string","null"],"maxLength":64},"status":{"type":"string","enum":["active","paused"]}}}}}},"responses":{"200":{"description":"The updated form","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Form"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Forms"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Delete a form and all its submissions","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{formId}/regenerate-key":{"post":{"tags":["Forms"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Give the form a new access key (the old one stops working)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"}],"responses":{"200":{"description":"The form with its new key","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Form"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{formId}/duplicate":{"post":{"tags":["Forms"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Copy a form’s features into a new form with its own key","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameInput"}}}},"responses":{"201":{"description":"The copy","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Form"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{formId}/features/{featureId}":{"patch":{"tags":["Forms"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Switch a feature on or off and save its options","description":"Send the whole feature: `enabled` plus its options (missing options take their defaults). Features above the plan can only be switched off.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"},{"schema":{"type":"string","enum":["email_notification","reply_to_visitor","autoreply","custom_email_template","custom_redirect","branded_success_page","honeypot","time_trap","allowed_domains","spam_filter","duplicate_filter","block_rules","country_filter","ai_spam_check","disposable_email_filter","email_validation","phone_validation","file_uploads","remove_branding","form_rules","partial_submissions","ai_autoreply","data_retention"],"example":"honeypot"},"required":true,"name":"featureId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":{}}}}},"responses":{"200":{"description":"The form with the updated feature","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Form"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a higher plan (`plan_required`) or a plan limit is reached (`limit_reached`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{formId}/test-submission":{"post":{"tags":["Forms"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Send a test submission through the real submit endpoint","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"fields":{"type":"object","additionalProperties":{"type":"string","maxLength":5000}}}}}}},"responses":{"200":{"description":"Accepted; it shows in the inbox marked as a test","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":["string","null"]}},"required":["id"]}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The submit endpoint refused it; `code` is the submit error (e.g. `form_paused`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{formId}/analytics":{"get":{"tags":["Forms"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Submissions and spam per day (30 days) and top pages","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"}],"responses":{"200":{"description":"Analytics, test submissions left out","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Analytics"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{formId}/submissions":{"get":{"tags":["Submissions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"List submissions, newest first","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"},{"schema":{"type":"string","maxLength":200,"description":"Text anywhere in the fields"},"required":false,"description":"Text anywhere in the fields","name":"q","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"description":"From this time (inclusive)","example":"2026-12-01"},"required":false,"description":"From this time (inclusive)","name":"from","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"description":"Up to this time (exclusive)","example":"2026-12-31"},"required":false,"description":"Up to this time (exclusive)","name":"to","in":"query"},{"schema":{"type":"string","enum":["ok","spam"],"description":"`ok` (inbox, default) or `spam`"},"required":false,"description":"`ok` (inbox, default) or `spam`","name":"status","in":"query"},{"schema":{"type":"string","enum":["read","unread"]},"required":false,"name":"read","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"nextCursor from the previous page"},"required":false,"description":"nextCursor from the previous page","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"example":25},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of submissions; pass nextCursor to get the next one","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Submission"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{formId}/submissions/export":{"get":{"tags":["Submissions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Download submissions as CSV","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"},{"schema":{"type":"string","maxLength":200,"description":"Text anywhere in the fields"},"required":false,"description":"Text anywhere in the fields","name":"q","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"description":"From this time (inclusive)","example":"2026-12-01"},"required":false,"description":"From this time (inclusive)","name":"from","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}],"description":"Up to this time (exclusive)","example":"2026-12-31"},"required":false,"description":"Up to this time (exclusive)","name":"to","in":"query"},{"schema":{"type":"string","enum":["ok","spam"],"description":"`ok` (inbox, default) or `spam`"},"required":false,"description":"`ok` (inbox, default) or `spam`","name":"status","in":"query"},{"schema":{"type":"string","enum":["read","unread"]},"required":false,"name":"read","in":"query"}],"responses":{"200":{"description":"CSV: id, submitted_at, each field, page_url, country, city","content":{"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{formId}/submissions/read":{"post":{"tags":["Submissions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Mark submissions read or unread","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":500},"read":{"type":"boolean"}},"required":["ids","read"]}}}},"responses":{"200":{"description":"How many changed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"updated":{"type":"integer"}},"required":["updated"]}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{formId}/submissions/delete":{"post":{"tags":["Submissions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Delete several submissions","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":500}},"required":["ids"]}}}},"responses":{"200":{"description":"How many were deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"integer"}},"required":["deleted"]}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/submissions/{submissionId}":{"get":{"tags":["Submissions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Get a submission with its files and delivery log","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"sub_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"submissionId","in":"path"}],"responses":{"200":{"description":"The submission","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SubmissionDetail"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Submissions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Delete a submission and its files","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"sub_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"submissionId","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/submissions/{submissionId}/not-spam":{"post":{"tags":["Submissions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Not spam: move to the inbox and deliver it","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"sub_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"submissionId","in":"path"}],"responses":{"200":{"description":"The submission, now in the inbox","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SubmissionDetail"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/submissions/{submissionId}/spam":{"post":{"tags":["Submissions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Move to the spam folder","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"sub_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"submissionId","in":"path"}],"responses":{"200":{"description":"The submission, now in spam","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SubmissionDetail"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/deliveries/{id}/resend":{"post":{"tags":["Submissions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Send one delivery again (email, webhook, …)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"int_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The submission with its updated delivery log","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SubmissionDetail"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/files/{id}":{"get":{"tags":["Submissions"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Download an uploaded file","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"int_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/integrations/catalog":{"get":{"tags":["Integrations"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Every integration, its plan and whether it is available","responses":{"200":{"description":"The catalogue","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationCatalogEntry"}}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forms/{formId}/integrations":{"get":{"tags":["Integrations"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"List a form’s integrations","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"}],"responses":{"200":{"description":"Connected integrations, without secrets","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Integrations"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Connect an integration","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"frm_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"formId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["telegram","discord","slack","whatsapp","sms","webhook","google_sheets","notion","airtable","mailchimp","zapier","make","n8n","turnstile","hcaptcha","recaptcha_v2","recaptcha_v3","smtp","virustotal"]},"config":{"type":"object","additionalProperties":{},"description":"The integration’s options (see config/integrations.ts). Leave a secret empty to keep the saved one."},"enabled":{"type":"boolean"}},"required":["type","config"]}}}},"responses":{"201":{"description":"Connected. `revealed` holds secrets Lazyform generated (a webhook signing secret), shown this once","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Integration"},{"type":"object","properties":{"revealed":{"type":"object","additionalProperties":{"type":"string"}}},"required":["revealed"]}]}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a higher plan (`plan_required`) or a plan limit is reached (`limit_reached`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not offered here yet (`integration_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/integrations/{id}":{"get":{"tags":["Integrations"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Get an integration","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"int_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The integration, without secrets","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Integration"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Integrations"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Change options, or switch on/off","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"int_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","additionalProperties":{},"description":"The integration’s options (see config/integrations.ts). Leave a secret empty to keep the saved one."},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Integration"}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a higher plan (`plan_required`) or a plan limit is reached (`limit_reached`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Integrations"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Disconnect an integration","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"int_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/integrations/{id}/test":{"post":{"tags":["Integrations"],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"summary":"Test the saved options (sends a test message where possible)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"int_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The test result; a failure is also saved as lastError","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"},"error":{"type":"string"},"response":{"type":["string","null"]}},"required":["ok","response"]}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspaces/{workspaceId}/api-tokens":{"get":{"tags":["API tokens"],"security":[{"cookieAuth":[]}],"summary":"List API tokens (admins, dashboard only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"responses":{"200":{"description":"Tokens, newest first (never the token itself)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiToken"}}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["API tokens"],"security":[{"cookieAuth":[]}],"summary":"Make an API token (admins, dashboard only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"ws_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"workspaceId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameInput"}}}},"responses":{"201":{"description":"The token; this is the only time it is shown","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/ApiToken"},{"type":"object","properties":{"token":{"type":"string","example":"lf_api_…"}},"required":["token"]}]}},"required":["data"]}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-tokens/{id}":{"delete":{"tags":["API tokens"],"security":[{"cookieAuth":[]}],"summary":"Revoke an API token (admins, dashboard only)","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64,"example":"int_3f8a91c2k0d7m1x9q2a4"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Revoked; it stops working at once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Invalid input (`validation_failed`) or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed (`forbidden`, `person_required`, `invalid_origin`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or not yours (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{}}