curl --request POST \
--url https://api.devic.ai/v1/integrations/{app}/connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authScheme": "API_KEY",
"appCredentials": {
"client_id": "…",
"client_secret": "…"
},
"accountFields": {
"generic_api_key": "pplx-…"
}
}
'import requests
url = "https://api.devic.ai/v1/integrations/{app}/connect"
payload = {
"authScheme": "API_KEY",
"appCredentials": {
"client_id": "…",
"client_secret": "…"
},
"accountFields": { "generic_api_key": "pplx-…" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
authScheme: 'API_KEY',
appCredentials: {client_id: '…', client_secret: '…'},
accountFields: {generic_api_key: 'pplx-…'}
})
};
fetch('https://api.devic.ai/v1/integrations/{app}/connect', 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.devic.ai/v1/integrations/{app}/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'authScheme' => 'API_KEY',
'appCredentials' => [
'client_id' => '…',
'client_secret' => '…'
],
'accountFields' => [
'generic_api_key' => 'pplx-…'
]
]),
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.devic.ai/v1/integrations/{app}/connect"
payload := strings.NewReader("{\n \"authScheme\": \"API_KEY\",\n \"appCredentials\": {\n \"client_id\": \"…\",\n \"client_secret\": \"…\"\n },\n \"accountFields\": {\n \"generic_api_key\": \"pplx-…\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.devic.ai/v1/integrations/{app}/connect")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"authScheme\": \"API_KEY\",\n \"appCredentials\": {\n \"client_id\": \"…\",\n \"client_secret\": \"…\"\n },\n \"accountFields\": {\n \"generic_api_key\": \"pplx-…\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devic.ai/v1/integrations/{app}/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authScheme\": \"API_KEY\",\n \"appCredentials\": {\n \"client_id\": \"…\",\n \"client_secret\": \"…\"\n },\n \"accountFields\": {\n \"generic_api_key\": \"pplx-…\"\n }\n}"
response = http.request(request)
puts response.read_body{
"connected": true,
"authorizationUrl": "<string>"
}Connect an account
Connects the account, either outright or by returning a URL to authorise in a browser — connected says which happened. API-key apps are connected in this one call; OAuth apps need the round trip. A 400 with code INTEGRATION_SETUP_REQUIRED names the fields still missing (see GET /integrations/:app/auth). Once connected, call POST /integrations/:app/servers to build the tool server.
curl --request POST \
--url https://api.devic.ai/v1/integrations/{app}/connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authScheme": "API_KEY",
"appCredentials": {
"client_id": "…",
"client_secret": "…"
},
"accountFields": {
"generic_api_key": "pplx-…"
}
}
'import requests
url = "https://api.devic.ai/v1/integrations/{app}/connect"
payload = {
"authScheme": "API_KEY",
"appCredentials": {
"client_id": "…",
"client_secret": "…"
},
"accountFields": { "generic_api_key": "pplx-…" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
authScheme: 'API_KEY',
appCredentials: {client_id: '…', client_secret: '…'},
accountFields: {generic_api_key: 'pplx-…'}
})
};
fetch('https://api.devic.ai/v1/integrations/{app}/connect', 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.devic.ai/v1/integrations/{app}/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'authScheme' => 'API_KEY',
'appCredentials' => [
'client_id' => '…',
'client_secret' => '…'
],
'accountFields' => [
'generic_api_key' => 'pplx-…'
]
]),
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.devic.ai/v1/integrations/{app}/connect"
payload := strings.NewReader("{\n \"authScheme\": \"API_KEY\",\n \"appCredentials\": {\n \"client_id\": \"…\",\n \"client_secret\": \"…\"\n },\n \"accountFields\": {\n \"generic_api_key\": \"pplx-…\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.devic.ai/v1/integrations/{app}/connect")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"authScheme\": \"API_KEY\",\n \"appCredentials\": {\n \"client_id\": \"…\",\n \"client_secret\": \"…\"\n },\n \"accountFields\": {\n \"generic_api_key\": \"pplx-…\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devic.ai/v1/integrations/{app}/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authScheme\": \"API_KEY\",\n \"appCredentials\": {\n \"client_id\": \"…\",\n \"client_secret\": \"…\"\n },\n \"accountFields\": {\n \"generic_api_key\": \"pplx-…\"\n }\n}"
response = http.request(request)
puts response.read_body{
"connected": true,
"authorizationUrl": "<string>"
}Authorizations
An API key from your Devic console, sent as Authorization: Bearer <key>. An embedded front end sends a tenant-session token instead, so no API key reaches the browser, and an OAuth integration sends its access token. Missing, invalid or expired credentials get a 401. See Authentication.
Path Parameters
App slug
Body
Which scheme to connect through, from GET /integrations/:app/auth. Defaults to the one asking for least setup
"API_KEY"
Credentials of your own application with the provider, keyed by the scheme's appFields. Needed once per workspace for apps the integration provider holds no credentials for; ignored afterwards
{ "client_id": "…", "client_secret": "…" }
What this account supplies, keyed by the scheme's accountFields — an API key, the subdomain of your instance
{ "generic_api_key": "pplx-…" }