Skip to content

Commit

Permalink
(/organizations/invitations#invitation-metadata) Update that metadata…
Browse files Browse the repository at this point in the history
… transfers to org membership (#1608)
  • Loading branch information
jeremy-clerk authored Oct 8, 2024
1 parent a9638a7 commit e0e501c
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit e0e501c

Please sign in to comment.