Invite members
curl --request POST \
--url https://api.example.com/api/projects/{projectId}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"groupIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"owner": false
}
'import requests
url = "https://api.example.com/api/projects/{projectId}/members"
payload = {
"userIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"groupIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"owner": False
}
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({
userIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
groupIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
owner: false
})
};
fetch('https://api.example.com/api/projects/{projectId}/members', 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.example.com/api/projects/{projectId}/members",
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([
'userIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'groupIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'owner' => false
]),
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.example.com/api/projects/{projectId}/members"
payload := strings.NewReader("{\n \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"groupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"owner\": false\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.example.com/api/projects/{projectId}/members")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"groupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"owner\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/projects/{projectId}/members")
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 \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"groupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"owner\": false\n}"
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>",
"owner": true,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>",
"type": "<string>",
"status": "<string>",
"organisationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>",
"isService": true
},
"groups": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"permissions": [
"<string>"
],
"description": "<string>",
"roleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
]Member
Invite members
Invite one or more users to become members of a project, optionally assigning them to groups and setting owner status.
POST
/
api
/
projects
/
{projectId}
/
members
Invite members
curl --request POST \
--url https://api.example.com/api/projects/{projectId}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"groupIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"owner": false
}
'import requests
url = "https://api.example.com/api/projects/{projectId}/members"
payload = {
"userIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"groupIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"owner": False
}
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({
userIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
groupIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
owner: false
})
};
fetch('https://api.example.com/api/projects/{projectId}/members', 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.example.com/api/projects/{projectId}/members",
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([
'userIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'groupIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'owner' => false
]),
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.example.com/api/projects/{projectId}/members"
payload := strings.NewReader("{\n \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"groupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"owner\": false\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.example.com/api/projects/{projectId}/members")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"groupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"owner\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/projects/{projectId}/members")
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 \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"groupIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"owner\": false\n}"
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>",
"owner": true,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"firstName": "<string>",
"lastName": "<string>",
"type": "<string>",
"status": "<string>",
"organisationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>",
"isService": true
},
"groups": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"permissions": [
"<string>"
],
"description": "<string>",
"roleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
]Authorizations
personalAccessTokeninternalAuth
Personal access token is obtained through your profile
Path Parameters
Unique identifier of the project
Body
application/json
Response
200 - application/json
List of newly created membership records
Unique identifier of the member
Timestamp when the member was created
Timestamp when the member was last updated
Whether the member is an owner of the project
User ID of the member
Project ID the member belongs to
User details of the member
Show child attributes
Show child attributes
Groups the member belongs to
Show child attributes
Show child attributes
Was this page helpful?
⌘I