{"openapi":"3.1.0","info":{"title":"Partner API","version":"1"},"servers":[{"url":"https://admin.formstack.com/api/v1","description":"Partner API"}],"paths":{"/organizations/{organizationId}/subaccounts/{subaccountId}/memberships/{membershipId}/personalAccessTokens":{"get":{"tags":["PartnerApi"],"description":"List Personal Access Tokens for a subaccount membership. Token secrets are not included in the response.","operationId":"listSubaccountMembershipPersonalAccessTokens","parameters":[{"name":"organizationId","in":"path","description":"ID of the parent organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}},{"name":"subaccountId","in":"path","description":"ID of the subaccount","required":true,"schema":{"type":"string","format":"uuid","example":"8ecb0a3c-3e38-11f1-96c0-0242ac000003"}},{"name":"membershipId","in":"path","description":"ID of the membership (subaccount user)","required":true,"schema":{"type":"string","format":"uuid","example":"2b609bb4-3e57-11f1-8a46-0242ac000003"}},{"name":"page","in":"query","description":"Page","required":false,"schema":{"type":"integer","example":1,"default":1}},{"name":"limit","in":"query","description":"Page size","required":false,"schema":{"type":"integer","example":10,"default":10,"enum":[10,25,50,100]}}],"responses":{"200":{"description":"Personal Access Tokens for the membership","content":{"application/json":{"schema":{"properties":{"total":{"type":"integer","example":2},"page":{"type":"integer","example":1},"data":{"type":"array","items":{"$ref":"#/components/schemas/common.PersonalAccessToken"}}},"type":"object"}}}},"403":{"description":"Forbidden"},"404":{"description":"Organization, subaccount, or membership not found"},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/general_validation_error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["PartnerApi"],"description":"Create a new Personal Access Token for a subaccount user. The membership must have an accepted user (not an invitation).","operationId":"createSubaccountMembershipPersonalAccessToken","parameters":[{"name":"organizationId","in":"path","description":"ID of the parent organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}},{"name":"subaccountId","in":"path","description":"ID of the subaccount","required":true,"schema":{"type":"string","format":"uuid","example":"8ecb0a3c-3e38-11f1-96c0-0242ac000003"}},{"name":"membershipId","in":"path","description":"ID of the membership (subaccount user)","required":true,"schema":{"type":"string","format":"uuid","example":"2b609bb4-3e57-11f1-8a46-0242ac000003"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePersonalAccessTokenRequest"}}}},"responses":{"201":{"description":"Personal Access Token created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/common.PersonalAccessToken"}}}},"403":{"description":"Forbidden"},"404":{"description":"Organization, subaccount, or membership not found"},"422":{"description":"Validation error (e.g. invitation has no user, max keys reached)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/general_validation_error"}}}}},"security":[{"bearerAuth":[]}]}},"/organizations/{organizationId}/subaccounts/{subaccountId}/memberships/{membershipId}/personalAccessTokens/{patId}":{"delete":{"tags":["PartnerApi"],"description":"Revoke a Personal Access Token belonging to a subaccount user.","operationId":"revokeSubaccountMembershipPersonalAccessToken","parameters":[{"name":"organizationId","in":"path","description":"ID of the parent organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}},{"name":"subaccountId","in":"path","description":"ID of the subaccount","required":true,"schema":{"type":"string","format":"uuid","example":"8ecb0a3c-3e38-11f1-96c0-0242ac000003"}},{"name":"membershipId","in":"path","description":"ID of the membership","required":true,"schema":{"type":"string","format":"uuid","example":"2b609bb4-3e57-11f1-8a46-0242ac000003"}},{"name":"patId","in":"path","description":"ID of the Personal Access Token to revoke","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}}],"responses":{"204":{"description":"Personal Access Token revoked"},"403":{"description":"Forbidden"},"404":{"description":"Organization, subaccount, membership, or PAT not found"}},"security":[{"bearerAuth":[]}]}},"/organizations/{organizationId}/subaccounts/{subaccountId}/sso/config":{"get":{"tags":["PartnerApi"],"description":"Returns current Organization's SSO config","operationId":"showSsoConfig","parameters":[{"name":"organizationId","in":"path","description":"ID of the organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}},{"name":"subaccountId","in":"path","description":"ID of the subaccount","required":true,"schema":{"type":"string","format":"uuid","example":"8ecb0a3c-3e38-11f1-96c0-0242ac000003"}}],"responses":{"200":{"description":"apps api keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoConfig"}}}},"404":{"description":"Organization could not be found"}},"security":[{"bearerAuth":[]}]}},"/organizations/{organizationId}/subaccounts/products":{"get":{"tags":["PartnerApi"],"description":"Get a list of products available for provisioning","operationId":"listSubaccountProvisioningAvailableProducts","parameters":[{"name":"organizationId","in":"path","description":"ID of the parent organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}}],"responses":{"200":{"description":"products list","content":{"application/json":{"schema":{"properties":{"products":{"$ref":"#/components/schemas/ProductsAvailable"}},"type":"object"}}}},"404":{"description":"Organization could not be found"}},"security":[{"bearerAuth":[]}]}},"/organizations/{organizationId}/subaccounts/preview":{"post":{"tags":["PartnerApi"],"operationId":"createNewSubaccountPreview","parameters":[{"name":"organizationId","in":"path","description":"ID of the parent organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewBuildNewRequest"}}}},"responses":{"200":{"description":"New Subaccount Billing Preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApiCreateSubaccountPreview"}}}},"422":{"description":"Errors occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/general_validation_error"}}}}},"security":[{"bearerAuth":[]}]}},"/organizations/{organizationId}/subaccounts":{"get":{"tags":["PartnerApi"],"description":"Get a list of subaccounts","operationId":"listSubaccounts","parameters":[{"name":"name","in":"query","description":"Filter by subaccount name","required":false,"schema":{"type":"string","example":"Acme"}},{"name":"page","in":"query","description":"Page","required":false,"schema":{"type":"integer","example":1,"default":1}},{"name":"orderBy","in":"query","description":"Sort field","required":false,"schema":{"type":"string","example":"createdAt","default":"createdAt","enum":["name","createdAt","id","status"]}},{"name":"orderDir","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","example":"asc","enum":["asc","desc"]}},{"name":"organizationId","in":"path","description":"ID of the organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}}],"responses":{"200":{"description":"subaccounts list","content":{"application/json":{"schema":{"properties":{"total":{"title":"total","type":"integer","example":3},"page":{"title":"page","type":"integer","example":1},"data":{"title":"result set","type":"array","items":{"$ref":"#/components/schemas/PartnerApiSubaccountBasic"}}},"type":"object"}}}},"404":{"description":"Organization could not be found"},"422":{"description":"Errors occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/general_validation_error"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["PartnerApi"],"operationId":"createNewSubaccount","parameters":[{"name":"organizationId","in":"path","description":"ID of the parent organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubaccountRequest"}}}},"responses":{"200":{"description":"Subaccount was created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApiSubaccount"}}}},"422":{"description":"Errors occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/general_validation_error"}}}}},"security":[{"bearerAuth":[]}]}},"/organizations/{organizationId}/subaccounts/{subaccountId}":{"get":{"tags":["PartnerApi"],"description":"Get subaccount details","operationId":"getSubaccount","parameters":[{"name":"organizationId","in":"path","description":"ID of the organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}},{"name":"subaccountId","in":"path","description":"ID of the subaccount","required":true,"schema":{"type":"string","format":"uuid","example":"8ecb0a3c-3e38-11f1-96c0-0242ac000003"}}],"responses":{"200":{"description":"Subaccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApiSubaccount"}}}},"404":{"description":"Organization could not be found"}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["PartnerApi"],"description":"Update basic subaccount organization details. Currently supports updating `name` only. Name changes propagate asynchronously to connected products (SNS OrganizationUpdated) and billing (Zuora via OrganizationRenamed).","operationId":"updateSubaccount","parameters":[{"name":"organizationId","in":"path","description":"ID of the parent organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}},{"name":"subaccountId","in":"path","description":"ID of the subaccount","required":true,"schema":{"type":"string","format":"uuid","example":"8ecb0a3c-3e38-11f1-96c0-0242ac000003"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubaccountRequest"}}}},"responses":{"200":{"description":"Subaccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApiSubaccount"}}}},"404":{"description":"Organization could not be found"},"422":{"description":"Errors occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/general_validation_error"}}}}},"security":[{"bearerAuth":[]}]}},"/organizations/{organizationId}/subaccounts/{subaccountId}/app-api-keys":{"get":{"tags":["PartnerApi"],"description":"Get app API keys for a subaccount","operationId":"getSubaccountAppApiKeys","parameters":[{"name":"organizationId","in":"path","description":"ID of the organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}},{"name":"subaccountId","in":"path","description":"ID of the subaccount","required":true,"schema":{"type":"string","format":"uuid","example":"8ecb0a3c-3e38-11f1-96c0-0242ac000003"}}],"responses":{"200":{"description":"Apps API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApiOrganizationAppApiKeys"}}}},"404":{"description":"Organization could not be found"},"502":{"description":"Failed to retrieve app API keys, safe to retry"}},"security":[{"bearerAuth":[]}]}},"/organizations/{organizationId}/subaccounts/{subaccountId}/memberships":{"get":{"tags":["PartnerApi"],"description":"List memberships for a subaccount. Results are ordered by `createdAt` ascending, then membership id. Pagination matches other Partner list endpoints (`total`, `page`, `data`).","operationId":"listSubaccountMemberships","parameters":[{"name":"organizationId","in":"path","description":"ID of the parent organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}},{"name":"subaccountId","in":"path","description":"ID of the subaccount","required":true,"schema":{"type":"string","format":"uuid","example":"8ecb0a3c-3e38-11f1-96c0-0242ac000003"}},{"name":"page","in":"query","description":"Page","required":false,"schema":{"type":"integer","example":1,"default":1}},{"name":"limit","in":"query","description":"Page size","required":false,"schema":{"type":"integer","example":25,"default":10,"enum":[10,25,50,100]}}],"responses":{"200":{"description":"Membership rows for the subaccount","content":{"application/json":{"schema":{"properties":{"total":{"type":"integer","example":12},"page":{"type":"integer","example":1},"data":{"type":"array","items":{"$ref":"#/components/schemas/PartnerApiSubaccountMembershipListItem"}}},"type":"object"}}}},"404":{"description":"Organization or subaccount could not be found"},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/general_validation_error"}}}}},"security":[{"bearerAuth":[]}]}},"/organizations/{organizationId}/subaccounts/{subaccountId}/memberships/{membershipId}":{"patch":{"tags":["PartnerApi"],"description":"Update membership for a subaccount. Optional roles: omit the field to leave roles unchanged. Only roles for products included in the request are changed. Optional email, firstName, and/or lastName update the member; omitted fields keep the existing stored value. Email changes apply to the underlying user and propagate to connected apps via SNS (UserUpdated). Email cannot be changed for pending invitations, IdP-managed users, users who belong to other organizations, users with pending invitations elsewhere, or when the email-change rate limit applies.","operationId":"updateSubaccountMembership","parameters":[{"name":"organizationId","in":"path","description":"ID of the parent organization","required":true,"schema":{"type":"string","format":"uuid","example":"b443d63c-3e37-11f1-8898-0242ac000003"}},{"name":"subaccountId","in":"path","description":"ID of the subaccount","required":true,"schema":{"type":"string","format":"uuid","example":"8ecb0a3c-3e38-11f1-96c0-0242ac000003"}},{"name":"membershipId","in":"path","description":"ID of the membership","required":true,"schema":{"type":"string","format":"uuid","example":"2b609bb4-3e57-11f1-8a46-0242ac000003"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubaccountMembershipRequest"}}}},"responses":{"200":{"description":"Membership was updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApiMembership"}}}},"404":{"description":"Organization, subaccount, or membership could not be found"},"422":{"description":"Validation error, or last app admin cannot be removed without reassignment","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/general_validation_error"},{"$ref":"#/components/schemas/partner_api_last_app_admin_removal_error"}]}}}}},"security":[{"bearerAuth":[]}]}}},"components":{"schemas":{"OrganizationBillingOverviewUsage":{"properties":{"label":{"description":"Text for the feature","type":"string","example":"Users"},"current":{"description":"current usage value for the feature","type":"integer","example":2},"currentFormatted":{"description":"current usage formatted (optional)","type":["string","null"],"example":"512M"},"limit":{"description":"maximum usage value for the feature","type":"integer","example":10},"limitFormatted":{"description":"limit formatted (optional)","type":["string","null"],"example":"3G"},"warningMessage":{"description":"Warning message","type":"string","example":"Nearing monthly limit"},"validUntil":{"description":"Usage valid until","type":["string","null"],"example":"6 days 20 hours"}},"type":"object"},"common.MoneyAmount":{"properties":{"amount":{"description":"amount in cents/smallest monetary unit for a currency","type":"string","example":"4200"},"currency":{"type":"string","example":"USD"},"formatted":{"type":"string","example":"$400.00"}},"type":"object","readOnly":true},"common.PersonalAccessToken":{"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"example":"2b609bb4-3e57-11f1-8a46-0242ac000003"},"name":{"type":"string","example":"CI deploy key"},"secret":{"type":["string","null"],"readOnly":true,"example":"fs_pat_********"},"description":{"type":["string","null"],"example":"Read-only for billing exports"},"duration":{"writeOnly":true,"example":"90 days","enum":["30 days","60 days","90 days"]},"expiresAt":{"description":"Y-m-d\\TH:i:sP format","type":["string","null"],"readOnly":true,"example":"2019-09-01T12:35:30+00:00"},"createdAt":{"type":"string","format":"date","readOnly":true,"example":"2022-11-14T17:00:50-05:00"},"updatedAt":{"type":"string","format":"date","readOnly":true,"example":"2022-11-14T17:00:50-05:00"},"createdBy":{"type":["string","null"],"readOnly":true,"example":"user@example.com"},"updatedBy":{"type":["string","null"],"readOnly":true,"example":"user@example.com"},"revokedBy":{"type":["string","null"],"readOnly":true,"example":"user@example.com"},"owner":{"type":["string","null"],"readOnly":true,"example":"John Doe"},"ownerMembershipId":{"type":["string","null"],"format":"uuid","readOnly":true,"example":"2b609bb4-3e57-11f1-8a46-0242ac000003"},"status":{"description":"status of the key","type":"string","readOnly":true,"example":"active","enum":["active","revoked","expired"]}},"type":"object"},"general_validation_error":{"properties":{"message":{"description":"Basic error description","type":"string","example":"The given data failed to pass validation."},"errors":{"description":"Basic error description","type":"object","additionalProperties":{"type":"array","items":{"type":"string","example":"cannot be blank"}}}},"type":"object"},"partner_api_last_app_admin_removal_error":{"description":"Returned when the last admin role for one or more apps cannot be removed without reassignment.","required":["message","reasonCode","needsAdminReassignForApps"],"properties":{"message":{"type":"string","example":"Can't remove admin role for these apps without assigning another admin."},"reasonCode":{"type":"string","example":"error_removing_last_app_admin"},"needsAdminReassignForApps":{"description":"Product ids where another member must be promoted to admin first","type":"array","items":{"type":"string","example":"formstack_classic"},"example":["formstack_classic","dobby"]}},"type":"object"},"CreatePersonalAccessTokenRequest":{"required":["name"],"properties":{"name":{"description":"Display name for the token","type":"string","example":"HawkSoft integration"},"description":{"type":["string","null"],"example":"Used for member sync in production"},"duration":{"type":["string","null"],"example":"90 days","enum":["30 days","60 days","90 days"]},"skipNotifications":{"description":"When true, do not queue PAT created email notifications.","type":["boolean","null"],"example":false}},"type":"object"},"CreateSubaccountRequest":{"description":"Create a subaccount for the parent organization.","required":["name","email","firstName","lastName","productHandles"],"properties":{"productHandles":{"description":"Billing product handles to provision on the subaccount.","type":"array","items":{"description":"Billing product handle (e.g. p: or c: prefix)","type":"string"},"example":["p:forms-teams","c:forms-workflows"]},"name":{"description":"Organization display name for the new subaccount.","type":"string","example":"Acme Insurance"},"email":{"type":"string","format":"email","example":"admin@acme.com"},"firstName":{"type":"string","example":"Jane"},"lastName":{"type":"string","example":"Smith"},"logoBase64":{"description":"Optional logo which should be base64 encoded data urls https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs","type":"string","example":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="},"periodicity":{"description":"Periodicity of the order","type":"string","example":"monthly","enum":["monthly","yearly"]},"twoFactorEnforcementGracePeriodDays":{"description":"Optional number of days until organization-wide 2FA enforcement applies to the new subaccount (1–30). When omitted, the default grace period applies (currently 7 days after subscription start).","type":["integer","null"],"example":30,"maximum":30,"minimum":1}},"type":"object"},"PartnerSubaccountMembershipRoleItem":{"oneOf":[{"description":"FSID/organization app: `role` is required and must not be null.","required":["product","role"],"properties":{"product":{"type":"string","example":"organization","enum":["organization"]},"role":{"type":"string","example":"admin","enum":["admin","basic"]}},"type":"object"},{"description":"Insure Sign app: `role` must be present. Use `null` to skip granting on invite or remove access on update.","required":["product","role"],"properties":{"product":{"type":"string","example":"insure_sign","enum":["insure_sign"]},"role":{"type":["string","null"],"example":"admin","enum":["admin","regular",null]}},"type":"object"},{"description":"Forms app: `role` must be present. Use `null` to skip granting on invite or remove access on update.","required":["product","role"],"properties":{"product":{"type":"string","example":"formstack_classic","enum":["formstack_classic"]},"role":{"type":["string","null"],"example":"regular","enum":["admin","regular","analyst","participant",null]}},"type":"object"},{"description":"Docs (Webmerge) app: `role` must be present. Use `null` to skip granting on invite or remove access on update.","required":["product","role"],"properties":{"product":{"type":"string","example":"webmerge","enum":["webmerge"]},"role":{"type":["string","null"],"example":"user","enum":["user","admin",null]}},"type":"object"},{"description":"Workflows (Dobby) app: `role` must be present. Use `null` to skip granting on invite or remove access on update.","required":["product","role"],"properties":{"product":{"type":"string","example":"dobby","enum":["dobby"]},"role":{"type":["string","null"],"example":"regular","enum":["regular","admin","workspace_user",null]}},"type":"object"},{"description":"Salesforce app: `role` must be present. Use `null` to skip granting on invite or remove access on update.","required":["product","role"],"properties":{"product":{"type":"string","example":"salesforce","enum":["salesforce"]},"role":{"type":["string","null"],"example":"regular","enum":["regular",null]}},"type":"object"},{"description":"Streamline (Thor/Odin) app: `role` must be present. Use `null` to skip granting on invite or remove access on update.","required":["product","role"],"properties":{"product":{"type":"string","example":"odin","enum":["odin"]},"role":{"type":["string","null"],"example":"builder","enum":["admin","manager","builder","operator",null]}},"type":"object"}]},"PreviewBuildNewRequest":{"required":["productHandles"],"properties":{"productHandles":{"type":"array","items":{"description":"Billing product handle (e.g. p: or c: prefix)","type":"string"},"example":["p:forms-teams","c:forms-extra-user:2"]},"periodicity":{"description":"Periodicity of the order","type":"string","example":"yearly","enum":["monthly","yearly"]}},"type":"object"},"UpdateSubaccountMembershipRequest":{"properties":{"email":{"type":["string","null"],"format":"email","example":"jane.smith@example.com"},"firstName":{"type":["string","null"],"example":"John"},"lastName":{"type":["string","null"],"example":"Doe"},"roles":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PartnerSubaccountMembershipRoleItem"},"example":[{"product":"organization","role":"admin"},{"product":"formstack_classic","role":"regular"}]}},"type":"object"},"UpdateSubaccountRequest":{"description":"Update the subaccount organization display name.","required":["name"],"properties":{"name":{"description":"Organization display name for the subaccount.","type":"string","example":"Acme Insurance"}},"type":"object"},"PartnerApiCreateSubaccountPreview":{"properties":{"immediateCharge":{"$ref":"#/components/schemas/common.MoneyAmount"},"regularCharge":{"$ref":"#/components/schemas/common.MoneyAmount"}},"type":"object"},"Idp":{"properties":{"name":{"type":"string","example":"Okta / Acme"},"updatedBy":{"type":"string","example":"jane@acme.com"},"updatedAt":{"type":["integer","null"],"example":1713888000},"isEnabled":{"type":"boolean","example":true},"type":{"type":"string","example":"saml","enum":["saml","oidc"]},"idpMetadata":{"description":"Identity Provider metadata","oneOf":[{"$ref":"#/components/schemas/SamlIdpMetadata"},{"$ref":"#/components/schemas/OidcIdpMetadata"}]},"spMetadata":{"description":"Service Provider metadata","oneOf":[{"$ref":"#/components/schemas/SamlSpMetadata"},{"$ref":"#/components/schemas/OidcSpMetadata"}]}},"type":"object"},"SamlIdpMetadata":{"properties":{"metadataUrl":{"type":["string","null"],"example":"https://idp.example.com/metadata"},"entityId":{"type":["string","null"],"example":"urn:example:acme:idp"},"ssoUrl":{"type":["string","null"],"example":"https://idp.example.com/sso/saml2"}},"type":"object"},"OidcIdpMetadata":{"properties":{"providerUrl":{"type":["string","null"],"example":"https://idp.example.com/oidc"},"clientId":{"type":["string","null"],"example":"oidc_client_123"},"customScopes":{"type":["string","null"],"example":"openid profile email"}},"type":"object"},"SamlSpMetadata":{"properties":{"entityId":{"type":["string","null"],"example":"urn:formstack:acme:sp"},"acsUrl":{"type":["string","null"],"example":"https://admin.formstack.com/acs/8ecb0a3c-3e38-11f1-96c0-0242ac000003"}},"type":"object"},"OidcSpMetadata":{"properties":{"redirectUri":{"type":["string","null"],"example":"https://admin.formstack.com/oidc/callback"}},"type":"object"},"PartnerApiInvitation":{"properties":{"type":{"type":"string","readOnly":true,"example":"invitation","enum":["invitation"]},"id":{"type":"string","format":"uuid","readOnly":true,"example":"1a509aa4-3e38-11f1-8c0d-0242ac000003"},"email":{"type":"string","format":"email","readOnly":true,"example":"pending@acme.com"},"firstName":{"type":["string","null"],"readOnly":true,"example":"Pat"},"lastName":{"type":["string","null"],"readOnly":true,"example":"Lee"}},"type":"object"},"PartnerApiMembership":{"properties":{"membershipId":{"type":"string","format":"uuid","readOnly":true,"example":"2b609bb4-3e57-11f1-8a46-0242ac000003"},"roles":{"type":"array","items":{"properties":{"product":{"type":"string","example":"dobby"},"role":{"type":"string","example":"admin"}},"type":"object"},"readOnly":true,"example":[{"product":"organization","role":"admin"}]},"member":{"description":"Member (User or Invitation)","readOnly":true,"oneOf":[{"$ref":"#/components/schemas/PartnerApiUser"},{"$ref":"#/components/schemas/PartnerApiInvitation"}]}},"type":"object"},"PartnerApiOrganizationAppApiKeys":{"properties":{"apiKeys":{"properties":{"forms":{"type":["string","null"],"example":"secret"},"docs":{"type":["string","null"],"example":"secret"}},"type":"object"}},"type":"object"},"Product":{"properties":{"handle":{"type":"string","readOnly":true,"example":"p:forms-teams"},"name":{"type":"string","readOnly":true,"example":"Forms Teams plan"}},"type":"object"},"ProductsAvailable":{"properties":{"plans":{"title":"plans","type":"array","items":{"$ref":"#/components/schemas/Product"},"example":[{"handle":"p:forms-teams","name":"Forms Teams plan"}]},"extras":{"title":"extras","type":"array","items":{"$ref":"#/components/schemas/Product"},"example":[{"handle":"c:forms-senders","name":"Extra senders"}]},"addons":{"title":"addons","type":"array","items":{"$ref":"#/components/schemas/Product"},"example":[]}},"type":"object"},"SsoConfig":{"properties":{"verifiedSsoDomains":{"type":"array","items":{"type":"string","example":"login.acme.com"},"example":["login.acme.com","sso.example.org"]},"idps":{"type":"array","items":{"$ref":"#/components/schemas/Idp"}},"allowsGoogleAuth":{"type":"boolean","example":true},"allowsAppleAuth":{"type":"boolean","example":false},"requireLoginViaSso":{"type":"boolean","example":false},"enableQuietUserCreation":{"type":"boolean","example":false},"autoRedirectToIdentityProvider":{"type":"boolean","example":true},"allowUserCreation":{"type":"boolean","example":true}},"type":"object"},"PartnerApiSubaccount":{"description":"Full subaccount: same as PartnerApiSubaccountBasic plus products and entitlements (GET one subaccount, create response).","type":"object","allOf":[{"$ref":"#/components/schemas/PartnerApiSubaccountBasic"},{"properties":{"products":{"description":"Not returned on GET /subaccounts (list); included on GET /subaccounts/{id} and subaccount create response.","type":"array","items":{"$ref":"#/components/schemas/PartnerApiSubaccountProduct"}},"oldestAdminMembershipId":{"description":"Organization admin membership id for the subaccount.","type":["string","null"],"format":"uuid","readOnly":true,"example":"2b609bb4-3e57-11f1-8a46-0242ac000003"}},"type":"object"}]},"PartnerApiSubaccountBasic":{"description":"Subaccount fields returned by GET /subaccounts (list). For products and entitlements, GET a single subaccount. `appIds` and `appAdmins` keys depend on enabled products (e.g. forms, docs, sign, copilot, or the application id).","properties":{"id":{"type":"string","format":"uuid","readOnly":true,"example":"8ecb0a3c-3e38-11f1-96c0-0242ac000003"},"name":{"type":"string","example":"Acme Subaccount"},"appIds":{"properties":{"forms":{"type":["string","null"],"example":"123456"},"docs":{"type":["string","null"],"example":"78910"},"sign":{"type":["string","null"],"example":"111213"}},"type":"object","example":{"forms":"123456","docs":null,"sign":"111213"},"additionalProperties":{"type":["string","null"]}},"appUsage":{"properties":{"forms":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationBillingOverviewUsage"}},"docs":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationBillingOverviewUsage"}},"sign":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationBillingOverviewUsage"}}},"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationBillingOverviewUsage"}}},"appAdmins":{"properties":{"forms":{"type":["string","null"],"example":"john@doe.org"},"docs":{"type":["string","null"],"example":"jane@doe.org"},"sign":{"type":["string","null"],"example":"john@doe.org"}},"type":"object","example":{"forms":"john@doe.org","docs":null,"sign":"john@doe.org"},"additionalProperties":{"type":["string","null"]}}},"type":"object"},"PartnerApiSubaccountMembershipListItem":{"properties":{"membershipId":{"type":"string","format":"uuid","readOnly":true,"example":"2b609bb4-3e57-11f1-8a46-0242ac000003"},"userId":{"description":"Formstack user id when the member is a user; null for a pending invitation.","type":["string","null"],"format":"uuid","readOnly":true,"example":"b443d63c-3e37-11f1-8898-0242ac000003"},"email":{"type":"string","format":"email","readOnly":true,"example":"member@acme.com"},"firstName":{"type":["string","null"],"readOnly":true,"example":"John"},"lastName":{"type":["string","null"],"readOnly":true,"example":"Doe"},"isOrganizationAdmin":{"description":"True when this membership has the organization (FSID) admin role.","type":"boolean","readOnly":true,"example":true},"roles":{"description":"Product roles for this membership (subscription access summary).","type":"array","items":{"properties":{"product":{"type":"string","example":"formstack_classic"},"role":{"type":"string","example":"admin"}},"type":"object"},"readOnly":true,"example":[{"product":"organization","role":"admin"},{"product":"formstack_classic","role":"regular"}]},"invitationAccepted":{"description":"True when a user is linked to this membership (invitation accepted or created without a pending invite). False for pending invitations.","type":"boolean","readOnly":true,"example":true},"lastLoginAt":{"description":"Last time this membership signed in (ISO 8601). Null when the member has never signed in or the membership is a pending invitation.","type":["string","null"],"format":"date-time","readOnly":true,"example":"2026-08-14T18:36:42+00:00"}},"type":"object"},"PartnerApiSubaccountProduct":{"properties":{"handle":{"type":"string","readOnly":true,"example":"p:forms-teams"},"name":{"type":"string","readOnly":true,"example":"Forms Teams plan"},"quantity":{"type":"integer","readOnly":true,"example":1},"type":{"description":"Billing catalog product kind: plan, component, discount, legacy, or unknown","type":"string","readOnly":true,"example":"plan"}},"type":"object"},"PartnerApiUser":{"properties":{"type":{"type":"string","readOnly":true,"example":"user","enum":["user"]},"id":{"type":"string","format":"uuid","readOnly":true,"example":"b443d63c-3e37-11f1-8898-0242ac000003"},"email":{"type":"string","format":"email","readOnly":true,"example":"jane@example.com"},"firstName":{"type":"string","readOnly":true,"example":"Jane"},"lastName":{"type":"string","readOnly":true,"example":"Smith"}},"type":"object"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer authentication"}}},"tags":[{"name":"PartnerApi","description":"PartnerApi"}]}