Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(/organizations/invitations#invitation-metadata) Update that metadata transfers to org membership #1608

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/organizations/invitations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Once the user visits the invitation link, they will be redirected to the page yo

### Invitation metadata

You can also add metadata to an invitation when creating the invitation through the Backend API. Once the invited user signs up using the invitation link, the invitation metadata (`OrganizationInvitation.public_metadata`) will be stored in the user's metadata (`User.public_metadata`). You can find more information about user metadata in the [metadata](/docs/users/metadata) docs.
You can also add metadata to an invitation when creating the invitation through the Backend API. Once the invited user signs up using the invitation link, the invitation metadata (`OrganizationInvitation.public_metadata`) will be stored in the organization membership's metadata (`OrganizationMembership.publicMetadata`). You can find more information about organization membership metadata in the [Organization Membership](/docs/references/javascript/organization-membership) docs.

To add metadata to an invitation, you can use the `public_metadata` property when the invitation is created.

Expand All @@ -91,7 +91,7 @@ curl 'https://api.clerk.com/v1/organizations/<YOUR_ORGANIZATION_ID>/invitations'
-X POST \
-H 'Authorization: Bearer {{secret}}' \
-H 'Content-Type: application/json' \
-d '{ "inviter_user_id": "user_123", "email_address": "[email protected]", "role": "org:member", "public_metadata": {"age": "21"} }'
-d '{ "inviter_user_id": "user_123", "email_address": "[email protected]", "role": "org:member", "public_metadata": {"department": "marketing"} }'
```

## Revoke an invitation
Expand Down
Loading