Switch current organization
const options = {method: 'POST'};
fetch('http://localhost:4005/v1/arc/organizations/:id/switch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:4005/v1/arc/organizations/:id/switch"
req, _ := http.NewRequest("POST", url, nil)
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/switchimport requests
url = "http://localhost:4005/v1/arc/organizations/:id/switch"
response = requests.post(url)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"logo": "<string>",
"metadata": {},
"deletedAt": "2023-11-07T05:31:56Z",
"userRole": "owner"
},
"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
Switch current organization
Switch the current organization for the authenticated user’s session
POST
/
v1
/
arc
/
organizations
/
:id
/
switch
Switch current organization
const options = {method: 'POST'};
fetch('http://localhost:4005/v1/arc/organizations/:id/switch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:4005/v1/arc/organizations/:id/switch"
req, _ := http.NewRequest("POST", url, nil)
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/switchimport requests
url = "http://localhost:4005/v1/arc/organizations/:id/switch"
response = requests.post(url)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"logo": "<string>",
"metadata": {},
"deletedAt": "2023-11-07T05:31:56Z",
"userRole": "owner"
},
"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?