Memberships
Create a membership
Getting Started
Endpoints
- Benefit Applications
- Benefits
- Bookings
- Companies
- Event Tickets
- Feed Posts
- Invoices
- Invoice Items
- Locations
- Memberships
- Networks
- Orders
- Plans
- Products
- Resources
- Subscriptions
- Support Tickets
- Transactions
- Visitors
Memberships
Create a membership
Create a membership and send an email invitation to join if type is member.
OAuth
Required scopes:community
POST
/
community
/
memberships
/
v1
curl --request POST \
--url https://api.spacebring.com/community/memberships/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"membership": {
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "admin",
"metadata": {},
"notes": "<string>",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "member",
"user": {
"email": "jsmith@example.com",
"about": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"surname": "<string>"
}
},
"locale": "<string>"
}'
{
"membership": {
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createDate": "2023-11-07T05:31:56Z",
"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"
}
}
Authorizations
See our authentication documentation for how to authorize your requests
Headers
The id of the network. Required when using bearer token authentication
Body
application/json
Available options:
admin
, member
The location id where to create a membership.
Use to attach key-value data to the object. Available only for admins.
The type of membership. Default value is member.
Available options:
member
, nonmember
Response
201
application/json
Created
Use to attach key-value data to the object. Available only for admins.
Available options:
member
, admin
Available options:
requested
, approved
Available options:
member
, nonmember
curl --request POST \
--url https://api.spacebring.com/community/memberships/v1 \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"membership": {
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "admin",
"metadata": {},
"notes": "<string>",
"locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "member",
"user": {
"email": "jsmith@example.com",
"about": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"surname": "<string>"
}
},
"locale": "<string>"
}'
{
"membership": {
"companyRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createDate": "2023-11-07T05:31:56Z",
"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"
}
}