Workspaces
Invite member
Invite a new member to the workspace. Only owners and managers can invite members.
POST
/
workspaces
/
{id}
/
members
Invite member
curl --request POST \
--url https://app.mavera.io/api/v1/workspaces/{id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"role": "viewer"
}
'import requests
url = "https://app.mavera.io/api/v1/workspaces/{id}/members"
payload = {
"email": "jsmith@example.com",
"role": "viewer"
}
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: 'jsmith@example.com', role: 'viewer'})
};
fetch('https://app.mavera.io/api/v1/workspaces/{id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.mavera.io/api/v1/workspaces/{id}/members"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"role\": \"viewer\"\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))
}{
"id": "<string>",
"object": "workspace.invitation",
"workspace_id": "<string>",
"email": "jsmith@example.com",
"role": "owner",
"status": "pending",
"invited_by": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}Authorizations
API key prefixed with mvra_live_. Create keys at Settings > Developer > API Keys.
Path Parameters
Workspace ID
Body
application/json
Response
Invitation sent
Available options:
workspace.invitation Role of a workspace member
Available options:
owner, manager, analyst, viewer, editor, creative_specialist, client_viewer, department_admin Available options:
pending, accepted, expired, declined ⌘I
Invite member
curl --request POST \
--url https://app.mavera.io/api/v1/workspaces/{id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"role": "viewer"
}
'import requests
url = "https://app.mavera.io/api/v1/workspaces/{id}/members"
payload = {
"email": "jsmith@example.com",
"role": "viewer"
}
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: 'jsmith@example.com', role: 'viewer'})
};
fetch('https://app.mavera.io/api/v1/workspaces/{id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.mavera.io/api/v1/workspaces/{id}/members"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"role\": \"viewer\"\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))
}{
"id": "<string>",
"object": "workspace.invitation",
"workspace_id": "<string>",
"email": "jsmith@example.com",
"role": "owner",
"status": "pending",
"invited_by": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}