Update organization
const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', logo: '<string>', metadata: {}})
};
fetch('http://localhost:8000/api/v1/organizations/{id}', 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:8000/api/v1/organizations/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"logo\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", 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 PATCH \
--url http://localhost:8000/api/v1/organizations/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"logo": "<string>",
"metadata": {}
}
'import requests
url = "http://localhost:8000/api/v1/organizations/{id}"
payload = {
"name": "<string>",
"logo": "<string>",
"metadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"logo": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "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>"
}
}Organizations
Update organization
Update organization details. Only admins can update organizations.
PATCH
/
api
/
v1
/
organizations
/
{id}
Update organization
const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', logo: '<string>', metadata: {}})
};
fetch('http://localhost:8000/api/v1/organizations/{id}', 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:8000/api/v1/organizations/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"logo\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", 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 PATCH \
--url http://localhost:8000/api/v1/organizations/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"logo": "<string>",
"metadata": {}
}
'import requests
url = "http://localhost:8000/api/v1/organizations/{id}"
payload = {
"name": "<string>",
"logo": "<string>",
"metadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"logo": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "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>"
}
}Path Parameters
Minimum string length:
1Body
application/json
Was this page helpful?