Link User to Org
Requires Authorization: Bearer <service JWT> in deployed environments. Mint the JWT through POST /auth/token with AWS SigV4 credentials. Creates the membership when missing. If it already exists, roles inside roleSet are replaced by roles while roles outside roleSet are preserved. Every role must be included in roleSet.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”user_01J7C4Q8QABCD1234XYZProvider user identifier returned by createUser or listUsers.
org_123Provider tenant or organization identifier. In WorkOS mode this is the WorkOS organization id, for example org_123.
Request Body required
Section titled “Request Body required ”object
Role slugs to assign within the caller-managed roleSet. Every role must also appear in roleSet.
[ "org-admin", "org-billing-manager"]Caller-managed role scope. Existing membership roles outside this set are preserved; roles inside this set are replaced by the requested role selection.
[ "org-admin", "org-billing-manager"]Responses
Section titled “ Responses ”Membership linked
object
Provider tenant or organization identifier. In WorkOS mode this is the WorkOS organization id, for example org_123.
org_123Provider user identifier returned by createUser or listUsers.
user_01J7C4Q8QABCD1234XYZRole slugs currently assigned to this user’s organization membership.
[ "org-admin"]Current membership lifecycle status returned by the configured access provider.
activeBAD_REQUEST
object
Karmo 8-digit error code.
Domain-level metadata emitted by the service.
object
object
Human-readable detail for the specific field error.
JSON pointer to the offending value.
/emailUNAUTHORIZED
object
Karmo 8-digit error code.
Domain-level metadata emitted by the service.
object
object
Human-readable detail for the specific field error.
JSON pointer to the offending value.
/emailFORBIDDEN
object
Karmo 8-digit error code.
Domain-level metadata emitted by the service.
object
object
Human-readable detail for the specific field error.
JSON pointer to the offending value.
/emailNOT_FOUND
object
Karmo 8-digit error code.
Domain-level metadata emitted by the service.
object
object
Human-readable detail for the specific field error.
JSON pointer to the offending value.
/emailCONFLICT
object
Karmo 8-digit error code.
Domain-level metadata emitted by the service.
object
object
Human-readable detail for the specific field error.
JSON pointer to the offending value.
/emailUNPROCESSABLE_ENTITY
object
Karmo 8-digit error code.
Domain-level metadata emitted by the service.
object
object
Human-readable detail for the specific field error.
JSON pointer to the offending value.
/emailConfigured access provider rate limited the request.
object
Karmo 8-digit error code.
Domain-level metadata emitted by the service.
object
object
Human-readable detail for the specific field error.
JSON pointer to the offending value.
/emailINTERNAL_SERVER_ERROR
object
Karmo 8-digit error code.
Domain-level metadata emitted by the service.
object
object
Human-readable detail for the specific field error.
JSON pointer to the offending value.
/emailAccess-management provider is not configured for this environment.
object
Karmo 8-digit error code.
Domain-level metadata emitted by the service.
object
object
Human-readable detail for the specific field error.
JSON pointer to the offending value.
/email