Invite member to organization
curl --request POST \
--url https://api.mnemom.ai/v1/orgs/{org_id}/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"role": "member",
"products": "<unknown>"
}
'import requests
url = "https://api.mnemom.ai/v1/orgs/{org_id}/invitations"
payload = {
"email": "[email protected]",
"role": "member",
"products": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '[email protected]', role: 'member', products: '<unknown>'})
};
fetch('https://api.mnemom.ai/v1/orgs/{org_id}/invitations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mnemom.ai/v1/orgs/{org_id}/invitations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '[email protected]',
'role' => 'member',
'products' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mnemom.ai/v1/orgs/{org_id}/invitations"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"role\": \"member\",\n \"products\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mnemom.ai/v1/orgs/{org_id}/invitations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"role\": \"member\",\n \"products\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mnemom.ai/v1/orgs/{org_id}/invitations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"[email protected]\",\n \"role\": \"member\",\n \"products\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"invitation_id": "<string>",
"org_id": "<string>",
"email": "<string>",
"role": "<string>",
"token": "<string>",
"status": "pending",
"invited_by": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"products": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Organizations
Invite member to organization
Invite member to organization
POST
/
orgs
/
{org_id}
/
invitations
Invite member to organization
curl --request POST \
--url https://api.mnemom.ai/v1/orgs/{org_id}/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"role": "member",
"products": "<unknown>"
}
'import requests
url = "https://api.mnemom.ai/v1/orgs/{org_id}/invitations"
payload = {
"email": "[email protected]",
"role": "member",
"products": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '[email protected]', role: 'member', products: '<unknown>'})
};
fetch('https://api.mnemom.ai/v1/orgs/{org_id}/invitations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mnemom.ai/v1/orgs/{org_id}/invitations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '[email protected]',
'role' => 'member',
'products' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mnemom.ai/v1/orgs/{org_id}/invitations"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"role\": \"member\",\n \"products\": \"<unknown>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mnemom.ai/v1/orgs/{org_id}/invitations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"[email protected]\",\n \"role\": \"member\",\n \"products\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mnemom.ai/v1/orgs/{org_id}/invitations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"[email protected]\",\n \"role\": \"member\",\n \"products\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"invitation_id": "<string>",
"org_id": "<string>",
"email": "<string>",
"role": "<string>",
"token": "<string>",
"status": "pending",
"invited_by": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"products": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Body
application/json
Workspace invite (MNE-9737): a list of at most 16 product names (strings). Products the invitee is granted on accept, in every environment the organization holds them. Read only while the organization's org_onboarding_v2 flag is on; otherwise ignored whatever its value, as before. With the flag on, a value that is not such a list is refused with 400, and each name must be an invitable product the organization holds an active grant for, or the request is refused with 400. While the flag is on, inviting an email that already has a pending invitation revokes the old invitation (its link stops working) instead of returning 409.
Response
Invitation created