Skip to main content
PATCH
/
tenant
Update Tenant By Id
curl --request PATCH \
  --url https://api.pathstack.io/tenant \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "configuration": {
    "providers": [],
    "api_version": "2023-12-25"
  },
  "name": "<string>",
  "description": "<string>",
  "logo_url": "<string>",
  "toc_link": "<string>",
  "privacy_link": "<string>"
}
'
import requests

url = "https://api.pathstack.io/tenant"

payload = {
"configuration": {
"providers": [],
"api_version": "2023-12-25"
},
"name": "<string>",
"description": "<string>",
"logo_url": "<string>",
"toc_link": "<string>",
"privacy_link": "<string>"
}
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({
configuration: {providers: [], api_version: '2023-12-25'},
name: '<string>',
description: '<string>',
logo_url: '<string>',
toc_link: '<string>',
privacy_link: '<string>'
})
};

fetch('https://api.pathstack.io/tenant', 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://api.pathstack.io/tenant",
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([
'configuration' => [
'providers' => [

],
'api_version' => '2023-12-25'
],
'name' => '<string>',
'description' => '<string>',
'logo_url' => '<string>',
'toc_link' => '<string>',
'privacy_link' => '<string>'
]),
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://api.pathstack.io/tenant"

payload := strings.NewReader("{\n \"configuration\": {\n \"providers\": [],\n \"api_version\": \"2023-12-25\"\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"toc_link\": \"<string>\",\n \"privacy_link\": \"<string>\"\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://api.pathstack.io/tenant")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configuration\": {\n \"providers\": [],\n \"api_version\": \"2023-12-25\"\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"toc_link\": \"<string>\",\n \"privacy_link\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.pathstack.io/tenant")

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 \"configuration\": {\n \"providers\": [],\n \"api_version\": \"2023-12-25\"\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"toc_link\": \"<string>\",\n \"privacy_link\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "name": "<string>",
    "description": "<string>",
    "logo_url": "<string>",
    "toc_link": "<string>",
    "privacy_link": "<string>",
    "id": "<string>",
    "connection_url": "<string>",
    "configuration": {
      "providers": [],
      "api_version": "2023-12-25"
    }
  }
}
{
"error": {
"code": 400,
"message": "Invalid JWT format"
}
}
{
"error": {
"code": 401,
"message": "Authentication header is missing, or token is invalid/expired."
}
}
{
"error": {
"code": 403,
"message": "You do not have access to this resource"
}
}
{
"error": {
"code": 404,
"message": "Device with ID <device_id> not found"
}
}
{
"error": {
"code": 422,
"message": "Field required",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-version
string<date>
default:2024-03-27

Body

application/json
configuration
TenantConfiguration · object | null
required
name
string | null
description
string | null
logo_url
string | null

Response

Successful Response

data
TenantResponse · object
required

Successful response payload