Invite workspace member
curl --request POST \
--url https://api.memcontext.in/api/workspaces/{workspaceId}/invitations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "jsmith@example.com"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
fetch('https://api.memcontext.in/api/workspaces/{workspaceId}/invitations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.memcontext.in/api/workspaces/{workspaceId}/invitations"
payload = { "email": "jsmith@example.com" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"invitation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"role": "admin",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}Workspaces
Invite workspace member
POST
https://api.memcontext.in
/
api
/
workspaces
/
{workspaceId}
/
invitations
Invite workspace member
curl --request POST \
--url https://api.memcontext.in/api/workspaces/{workspaceId}/invitations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "jsmith@example.com"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com'})
};
fetch('https://api.memcontext.in/api/workspaces/{workspaceId}/invitations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.memcontext.in/api/workspaces/{workspaceId}/invitations"
payload = { "email": "jsmith@example.com" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"invitation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"role": "admin",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}Authorizations
ApiKeyAuthCookieAuth
API key created from the MemContext dashboard. Keys are prefixed with mc_, bound to one workspace, and API-key requests cannot override that workspace.
Path Parameters
Body
application/json
Response
201 - application/json
Invitation email sent. Membership is created only after the invited user accepts.
Hide child attributes
Hide child attributes
