René's URL Explorer Experiment


Title: createOrganizationInvitationBulk return type does not match Backend API response shape · Issue #8740 · clerk/javascript · GitHub

Open Graph Title: createOrganizationInvitationBulk return type does not match Backend API response shape · Issue #8740 · clerk/javascript

X Title: createOrganizationInvitationBulk return type does not match Backend API response shape · Issue #8740 · clerk/javascript

Description: Package + version @clerk/backend@3.5.0 Description clerkClient.organizations.createOrganizationInvitationBulk() is typed as returning Promise, but the Backend API endpoint it wraps returns an object with a data ...

Open Graph Description: Package + version @clerk/backend@3.5.0 Description clerkClient.organizations.createOrganizationInvitationBulk() is typed as returning Promise, but the Backend API endpoint...

X Description: Package + version @clerk/backend@3.5.0 Description clerkClient.organizations.createOrganizationInvitationBulk() is typed as returning Promise<OrganizationInvitation[]>, but the Backend API en...

Opengraph URL: https://github.com/clerk/javascript/issues/8740

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"createOrganizationInvitationBulk return type does not match Backend API response shape","articleBody":"### Package + version\n\n`@clerk/backend@3.5.0`\n\n### Description\n\n`clerkClient.organizations.createOrganizationInvitationBulk()` is typed as returning `Promise\u003cOrganizationInvitation[]>`, but the Backend API endpoint it wraps returns an object with a `data` array and `total_count`.\n\nThe latest published declaration in `@clerk/backend@3.5.0` still has:\n\n```ts\ncreateOrganizationInvitationBulk(\n  organizationId: string,\n  params: CreateBulkOrganizationInvitationParams,\n): Promise\u003cOrganizationInvitation[]>;\n```\n\nThe compiled implementation appears to return the raw request result without unwrapping `data`:\n\n```js\nasync createOrganizationInvitationBulk(organizationId, params) {\n  this.requireId(organizationId);\n  return this.request({\n    method: \"POST\",\n    path: joinPaths(basePath19, organizationId, \"invitations\", \"bulk\"),\n    bodyParams: params\n  });\n}\n```\n\nHowever, the Backend API reference for `POST /v1/organizations/{organization_id}/invitations/bulk` shows a response shaped like:\n\n```json\n{\n  \"data\": [\n    {\n      \"object\": \"organization_invitation\",\n      \"id\": \"string\"\n    }\n  ],\n  \"total_count\": 1\n}\n```\n\nDocs reference: https://clerk.com/docs/reference/backend-api/tag/organization-invitations/POST/organizations/%7Borganization_id%7D/invitations/bulk\n\nSDK reference currently says `Promise\u003cOrganizationInvitation[]>`: https://clerk.com/docs/reference/backend/organization/create-organization-invitation-bulk\n\n### Expected behavior\n\nEither:\n\n1. the SDK should unwrap and return `OrganizationInvitation[]`, matching the current TypeScript declaration, or\n2. the TypeScript declaration and SDK docs should reflect the actual returned object shape, likely something like `Promise\u003cPaginatedResourceResponse\u003cOrganizationInvitation[]>>` or `{ data: OrganizationInvitation[]; totalCount: number }`.\n\n### Actual behavior\n\nRuntime returns an object with a `data` array, while TypeScript says the method returns an array.\n\nThis makes code like this type-check but fail at runtime:\n\n```ts\nconst invitations = await clerkClient.organizations.createOrganizationInvitationBulk(orgId, params);\n\nfor (const invitation of invitations) {\n  // invitations is not iterable if the runtime response is { data: [...] }\n}\n```\n\n### Workaround\n\n```ts\nconst response = await clerkClient.organizations.createOrganizationInvitationBulk(orgId, params) as\n  | OrganizationInvitation[]\n  | { data: OrganizationInvitation[]; totalCount?: number; total_count?: number };\n\nconst invitations = Array.isArray(response) ? response : response.data;\n```\n\n### Notes\n\nThe response shape shown in the Backend API reference is also consistent with other list-style Clerk responses that expose `data` and count metadata.","author":{"url":"https://github.com/MisterJimson","@type":"Person","name":"MisterJimson"},"datePublished":"2026-06-03T18:25:53Z","url":"https://github.com/clerk/javascript/issues/8740"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b23ffed3-103d-0b4a-02b3-fa86346ad990
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC354:71C2F:11C432D:185B46C:6AFB6C9A
html-safe-nonce34a2c59aa04c8e107b89a3777eb29d64fc97767281d258418da03d58548f02a2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzU0OjcxQzJGOjExQzQzMkQ6MTg1QjQ2Qzo2QUZCNkM5QSIsInZpc2l0b3JfaWQiOiIxNDExNDcyMzc4NjM3ODA2NzQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac8f1e7f70ebef99f39cb83a395ac2f0c2c1bbc01ab98b59a4f0e78754272c1961
hovercard-subject-tagissue:4582568370
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/clerk/javascript/8740/issue_layout
twitter:imagehttps://opengraph.githubassets.com/86b0893436cf3a7971daa010be6b054e75d8955fc99d749a140d59c646ddd4dd/clerk/javascript/issues/8740
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/86b0893436cf3a7971daa010be6b054e75d8955fc99d749a140d59c646ddd4dd/clerk/javascript/issues/8740
og:image:altPackage + version @clerk/backend@3.5.0 Description clerkClient.organizations.createOrganizationInvitationBulk() is typed as returning Promise, but the Backend API endpoint...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMisterJimson
hostnamegithub.com
expected-hostnamegithub.com
Nonecca289ecd54650fcf3c0b037a58b97186dee2cc4406819d87fab93728fd83700
turbo-cache-controlno-preview
go-importgithub.com/clerk/javascript git https://github.com/clerk/javascript.git
octolytics-dimension-user_id49538330
octolytics-dimension-user_loginclerk
octolytics-dimension-repository_id438331492
octolytics-dimension-repository_nwoclerk/javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id438331492
octolytics-dimension-repository_network_root_nwoclerk/javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release88808b1fae5ab8a526a73e7ce5542a10eb9d6971
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/clerk/javascript/issues/8740#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fclerk%2Fjavascript%2Fissues%2F8740
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fclerk%2Fjavascript%2Fissues%2F8740
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=clerk%2Fjavascript
Reloadhttps://github.com/clerk/javascript/issues/8740
Reloadhttps://github.com/clerk/javascript/issues/8740
Reloadhttps://github.com/clerk/javascript/issues/8740
clerkhttps://github.com/clerk
javascripthttps://github.com/clerk/javascript
Codehttps://github.com/clerk/javascript
Issues45 (45)https://github.com/clerk/javascript/issues
Pull requests110 (110)https://github.com/clerk/javascript/pulls
Discussionshttps://github.com/clerk/javascript/discussions
Actionshttps://github.com/clerk/javascript/actions
Security and quality6 (6)https://github.com/clerk/javascript/security
Insightshttps://github.com/clerk/javascript/pulse
https://github.com/clerk/javascript
New issuehttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/8740
New issuehttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/8740
#8751https://github.com/clerk/javascript/pull/8751
createOrganizationInvitationBulk return type does not match Backend API response shapehttps://github.com/clerk/javascript/issues/8740#top
#8751https://github.com/clerk/javascript/pull/8751
https://github.com/MisterJimson
MisterJimsonhttps://github.com/MisterJimson
on Jun 3, 2026https://github.com/clerk/javascript/issues/8740#issue-4582568370
https://clerk.com/docs/reference/backend-api/tag/organization-invitations/POST/organizations/%7Borganization_id%7D/invitations/bulkhttps://clerk.com/docs/reference/backend-api/tag/organization-invitations/POST/organizations/%7Borganization_id%7D/invitations/bulk
https://clerk.com/docs/reference/backend/organization/create-organization-invitation-bulkhttps://clerk.com/docs/reference/backend/organization/create-organization-invitation-bulk
jacekradkohttps://github.com/jacekradko
completedhttps://github.com/clerk/javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#8751https://github.com/clerk/javascript/pull/8751
on Jun 9, 2026https://github.com/clerk/javascript/issues/8740#event-26537473503
Sign up for freehttps://github.com/signup?return_to=https://github.com/clerk/javascript/issues/8740
Sign in to commenthttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/8740
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.