Skip to content

Bug: create_organization_membership uses incorrect API endpoint (singular instead of plural) #228

@max-zheng

Description

@max-zheng

Description

The CreateOrganizationMembership operation in src/user_management/operations/create_organization_membership.rs hits /user_management/organization_membership (singular), but the WorkOS API endpoint is /user_management/organization_memberships (plural).

https://github.com/RustForWeb/workos/blob/main/src/user_management/operations/create_organization_membership.rs#L79

let url = self
    .workos
    .base_url()
    .join("/user_management/organization_membership")?;  // should be /organization_memberships

Expected

POST /user_management/organization_memberships

Actual

POST /user_management/organization_membership

Reference

WorkOS Docs: Create an organization membership

The docs show the endpoint as /user_management/organization_memberships (plural).

Impact

Calls to create_organization_membership silently fail (likely 404), causing users to end up with organizations but no memberships.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions