Creates or updates (upserts) a membership with a specified organization ID and user ID. Only the organization owner can grant organization membership to new users.
Unique organization identifier. An organization is an entity that represents a company. For more information, see Obtain an organization ID.
List of IP addresses that are permitted access. Private subnets are prohibited. To remove restrictions, set this value to null.
[ "153.12.32.33", "201.54.122.0/24", "2001:0db8:abcd:0012:0000:0000:0000:ffff", "2001:db8:abcd:12::0/64" ]
Permissions that the user has within the organization. Use the wildcard character * for full access.
[ "PostFile", "StorefrontGetAccount", "StorefrontGetWebsite", "StorefrontGetKycDocument", "StorefrontPostKycDocument" ]
- Mock serverhttps://www.rebilly.com/_mock/catalog/all/memberships/{organizationId}/{userId}
- Sandbox serverhttps://api-sandbox.rebilly.com/organizations/{organizationId}/memberships/{organizationId}/{userId}
- Live serverhttps://api.rebilly.com/organizations/{organizationId}/memberships/{organizationId}/{userId}
- SecretApiKey
- JWT
curl -i -X PUT \
https://www.rebilly.com/_mock/catalog/all/memberships/4f6cf35x-2c4y-483z-a0a9-158621f77a21/4f6cf35x-2c4y-483z-a0a9-158621f77a21 \
-H 'Content-Type: application/json' \
-H 'REB-APIKEY: YOUR_API_KEY_HERE' \
-d '{
"allowedIps": [
"153.12.32.33",
"201.54.122.0/24",
"2001:0db8:abcd:0012:0000:0000:0000:ffff",
"2001:db8:abcd:12::0/64"
],
"permissions": [
"PostFile",
"StorefrontGetAccount",
"StorefrontGetWebsite",
"StorefrontGetKycDocument",
"StorefrontPostKycDocument"
],
"isOwner": true,
"roleIds": [
"string"
]
}'Membership updated.
Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.
List of IP addresses that are permitted access. Private subnets are prohibited. To remove restrictions, set this value to null.
[ "153.12.32.33", "201.54.122.0/24", "2001:0db8:abcd:0012:0000:0000:0000:ffff", "2001:db8:abcd:12::0/64" ]
Permissions that the user has within the organization. Use the wildcard character * for full access.
[ "PostFile", "StorefrontGetAccount", "StorefrontGetWebsite", "StorefrontGetKycDocument", "StorefrontPostKycDocument" ]
Role IDs associated with the user. Role IDs specify the roles that the user performs within the organization. For example, the user may be an organization admin.
{ "organization": { "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21", "name": "string", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z" }, "user": { "id": "usr_0YVCEENYJ3D7Q9EN6BN16HA0G4", "name": "string", "email": "user@example.com" }, "allowedIps": [ "153.12.32.33", "201.54.122.0/24", "2001:0db8:abcd:0012:0000:0000:0000:ffff", "2001:db8:abcd:12::0/64" ], "permissions": [ "PostFile", "StorefrontGetAccount", "StorefrontGetWebsite", "StorefrontGetKycDocument", "StorefrontPostKycDocument" ], "isOwner": true, "isDefault": true, "roleIds": [ "string" ], "acl": [ { … } ], "_links": [ { … } ], "_embedded": { "roles": [] } }