Create a membership
How to create a membership via API
To create a new membership, send a POST
request to the /api/memberships
endpoint, passing the resource arguments in the request body.
Request
POST https://provisioning.commercelayer.io/api/memberships
Arguments
Body Parameter | Type | Required |
---|---|---|
type |
| Required |
attributes.user_email |
| Required |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.metadata |
| Optional |
relationships.organization |
| Required |
relationships.role |
| Required |
relationships.application_memberships |
| Optional |
Example
The following request creates a new membership:
Last updated