Update an owner
curl --request PATCH \
--url https://{region}.api.plerion.com/v1/tenant/owners/{ownerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Payments Platform",
"email": "payments@example.com"
}
'import requests
url = "https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}"
payload = {
"name": "Payments Platform",
"email": "payments@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Payments Platform', email: 'payments@example.com'})
};
fetch('https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}', 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://{region}.api.plerion.com/v1/tenant/owners/{ownerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Payments Platform',
'email' => 'payments@example.com'
]),
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://{region}.api.plerion.com/v1/tenant/owners/{ownerId}"
payload := strings.NewReader("{\n \"name\": \"Payments Platform\",\n \"email\": \"payments@example.com\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Payments Platform\",\n \"email\": \"payments@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Payments Platform\",\n \"email\": \"payments@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"kind": "team",
"name": "<string>",
"email": "<string>",
"updatedBy": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"emailAlias": {
"status": "added",
"alias": "jane.doe@example.com",
"ownerId": "<string>"
}
}
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"message": "Forbidden"
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"message": "Internal server error"
}Update an owner
Renames an owner, sets its email, or switches it between team and person. Send only the fields to change.
name: the new name also becomes a name the owner goes by. A name another owner goes by is refused (409 NameTaken); merge them instead.email: for a person, the email also becomes a name they go by.kind: sending the current kind confirms one Plerion guessed. Switching kind moves the owner’s assets to the other kind and drops owners set by hand as the old kind.
When someone leaves or a team is gone, merge them into whoever owns their assets now. Requires Owner:Modify.
PATCH
/
v1
/
tenant
/
owners
/
{ownerId}
Update an owner
curl --request PATCH \
--url https://{region}.api.plerion.com/v1/tenant/owners/{ownerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Payments Platform",
"email": "payments@example.com"
}
'import requests
url = "https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}"
payload = {
"name": "Payments Platform",
"email": "payments@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Payments Platform', email: 'payments@example.com'})
};
fetch('https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}', 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://{region}.api.plerion.com/v1/tenant/owners/{ownerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Payments Platform',
'email' => 'payments@example.com'
]),
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://{region}.api.plerion.com/v1/tenant/owners/{ownerId}"
payload := strings.NewReader("{\n \"name\": \"Payments Platform\",\n \"email\": \"payments@example.com\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Payments Platform\",\n \"email\": \"payments@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Payments Platform\",\n \"email\": \"payments@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"kind": "team",
"name": "<string>",
"email": "<string>",
"updatedBy": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"emailAlias": {
"status": "added",
"alias": "jane.doe@example.com",
"ownerId": "<string>"
}
}
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"message": "Forbidden"
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"message": "Internal server error"
}Authorizations
Headers
Path Parameters
Owner ID. Use List owners to get the IDs.
Example:
"3f0c2a7e-1b8d-4c55-9a61-0d2f7e9b4c11"
Body
application/json
Was this page helpful?