Update an existing connection
curl --request PATCH \
--url https://api.chift.eu/consumers/{consumer_id}/connections/{connectionid} \
--header 'Content-Type: application/json' \
--data '
{
"redirect": false,
"name": "<string>",
"credentials": [
{
"key": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/connections/{connectionid}"
payload = {
"redirect": False,
"name": "<string>",
"credentials": [
{
"key": "<string>",
"value": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
redirect: false,
name: '<string>',
credentials: [{key: '<string>', value: '<string>'}]
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/connections/{connectionid}', 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.chift.eu/consumers/{consumer_id}/connections/{connectionid}",
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([
'redirect' => false,
'name' => '<string>',
'credentials' => [
[
'key' => '<string>',
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.chift.eu/consumers/{consumer_id}/connections/{connectionid}"
payload := strings.NewReader("{\n \"redirect\": false,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.patch("https://api.chift.eu/consumers/{consumer_id}/connections/{connectionid}")
.header("Content-Type", "application/json")
.body("{\n \"redirect\": false,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/connections/{connectionid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirect\": false,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>"
}Connections
Update an existing connection
Returns the url that can be used by your client to update the connection
PATCH
/
consumers
/
{consumer_id}
/
connections
/
{connectionid}
Update an existing connection
curl --request PATCH \
--url https://api.chift.eu/consumers/{consumer_id}/connections/{connectionid} \
--header 'Content-Type: application/json' \
--data '
{
"redirect": false,
"name": "<string>",
"credentials": [
{
"key": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/connections/{connectionid}"
payload = {
"redirect": False,
"name": "<string>",
"credentials": [
{
"key": "<string>",
"value": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
redirect: false,
name: '<string>',
credentials: [{key: '<string>', value: '<string>'}]
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/connections/{connectionid}', 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.chift.eu/consumers/{consumer_id}/connections/{connectionid}",
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([
'redirect' => false,
'name' => '<string>',
'credentials' => [
[
'key' => '<string>',
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.chift.eu/consumers/{consumer_id}/connections/{connectionid}"
payload := strings.NewReader("{\n \"redirect\": false,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.patch("https://api.chift.eu/consumers/{consumer_id}/connections/{connectionid}")
.header("Content-Type", "application/json")
.body("{\n \"redirect\": false,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/connections/{connectionid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"redirect\": false,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>"
}Learn more:
Body
application/json
Indicates whether you want to return to the consumer's redirectUrl after update (true) or whether you want to return on the connection page (false)
Can be used to update the name of an existing connection
Maximum string length:
80Can be used to update the credentials of an existing connection. Please use the getIntegrations route to see the available credentials for each integration. Note: The preferred approach to let a consumer change their credentials is to call this endpoint without passing credentials in the body of the request, which will return a link that can be reshared with the consumer to update their credentials through the Chift UI.
Show child attributes
Show child attributes
Response
Successful Response