Transfer organization ownership
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({newOwnerId: '<string>'})
};
fetch('http://localhost:4005/v1/arc/organizations/:id/transfer', 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/transfer"
payload := strings.NewReader("{\n \"newOwnerId\": \"<string>\"\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/transfer \
--header 'Content-Type: application/json' \
--data '
{
"newOwnerId": "<string>"
}
'import requests
url = "http://localhost:4005/v1/arc/organizations/:id/transfer"
payload = { "newOwnerId": "<string>" }
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
Transfer organization ownership
Transfer ownership to another member. Caller is downgraded to admin and stays in the org. Requires owner role.
POST
/
v1
/
arc
/
organizations
/
:id
/
transfer
Transfer organization ownership
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({newOwnerId: '<string>'})
};
fetch('http://localhost:4005/v1/arc/organizations/:id/transfer', 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/transfer"
payload := strings.NewReader("{\n \"newOwnerId\": \"<string>\"\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/transfer \
--header 'Content-Type: application/json' \
--data '
{
"newOwnerId": "<string>"
}
'import requests
url = "http://localhost:4005/v1/arc/organizations/:id/transfer"
payload = { "newOwnerId": "<string>" }
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>"
}
}Was this page helpful?