Add member to organization
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>', role: 'member'})
};
fetch('http://localhost:4005/v1/arc/organizations/: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 := "http://localhost:4005/v1/arc/organizations/:id/members"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"role\": \"member\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}curl --request POST \
--url http://localhost:4005/v1/arc/organizations/:id/members \
--header 'Content-Type: application/json' \
--data '
{
"userId": "<string>",
"role": "member"
}
'import requests
url = "http://localhost:4005/v1/arc/organizations/:id/members"
payload = {
"userId": "<string>",
"role": "member"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"organizationId": "<string>",
"userId": "<string>",
"role": "owner",
"createdAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}Organizations
Add member to organization
Add a user as a member of the organization. Requires owner or admin role.
POST
/
v1
/
arc
/
organizations
/
:id
/
members
Add member to organization
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>', role: 'member'})
};
fetch('http://localhost:4005/v1/arc/organizations/: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 := "http://localhost:4005/v1/arc/organizations/:id/members"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"role\": \"member\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}curl --request POST \
--url http://localhost:4005/v1/arc/organizations/:id/members \
--header 'Content-Type: application/json' \
--data '
{
"userId": "<string>",
"role": "member"
}
'import requests
url = "http://localhost:4005/v1/arc/organizations/:id/members"
payload = {
"userId": "<string>",
"role": "member"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"organizationId": "<string>",
"userId": "<string>",
"role": "owner",
"createdAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}Path Parameters
Body
application/json
Was this page helpful?