curl --request POST \
--url https://api.spacebring.com/community/memberships/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"membership": {
"role": "admin",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user": {
"email": "[email protected]",
"name": "<string>",
"about": "<string>",
"phoneNumber": "<string>",
"surname": "<string>"
},
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyRole": "manager",
"metadata": {},
"notes": "<string>",
"type": "member"
},
"locale": "<string>"
}
'{
"membership": {
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyRole": "manager",
"createDate": "2023-11-07T05:31:56Z",
"credits": {
"expiring": 123,
"permanent": 123
},
"dayPasses": {
"expiring": 123
},
"deleteDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invitationDate": "2023-11-07T05:31:56Z",
"locationRef": "<string>",
"metadata": {},
"notes": "<string>",
"role": "member",
"status": "requested",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "member",
"user": {
"about": "<string>",
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
},
"userRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Create a membership and send an email invitation to join if type is member.
communitycurl --request POST \
--url https://api.spacebring.com/community/memberships/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"membership": {
"role": "admin",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user": {
"email": "[email protected]",
"name": "<string>",
"about": "<string>",
"phoneNumber": "<string>",
"surname": "<string>"
},
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyRole": "manager",
"metadata": {},
"notes": "<string>",
"type": "member"
},
"locale": "<string>"
}
'{
"membership": {
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyRole": "manager",
"createDate": "2023-11-07T05:31:56Z",
"credits": {
"expiring": 123,
"permanent": 123
},
"dayPasses": {
"expiring": 123
},
"deleteDate": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invitationDate": "2023-11-07T05:31:56Z",
"locationRef": "<string>",
"metadata": {},
"notes": "<string>",
"role": "member",
"status": "requested",
"subscriptionRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "member",
"user": {
"about": "<string>",
"email": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"phoneNumber": "<string>",
"photoUrl": "<string>",
"surname": "<string>"
},
"userRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}See our authentication documentation for how to authorize your requests
The id of the network. Required when using bearer token authentication
Show child attributes
admin, member The location id where to create a membership.
manager, member Use to attach key-value data to the object. Available only for admins.
The type of membership. Default value is member.
member, nonmember Created
Show child attributes
manager, member The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
The date and time in ISO 8601 format, e.g. 2021-05-21T10:00:00Z
Use to attach key-value data to the object. Available only for admins.
member, admin requested, approved member, nonmember