Create a new integration
curl --request POST \
--url https://api.matia.io/v1/integrations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"destinationId": "<string>",
"destinationSchema": "<string>",
"replicationFrequency": "<string>",
"onSchemaUpdate": "<string>",
"enabled": true,
"sourceConfig": {
"type": "postgres",
"name": "<string>",
"authMethod": "<string>",
"connection": {
"username": "<string>",
"password": "<string>",
"hostname": "<string>",
"port": 123,
"database": "<string>",
"slot": "<string>",
"publication": "<string>"
},
"connectionType": "<string>",
"owners": [
"<string>"
]
},
"sourceSettings": {
"max_clients": 123,
"incremental_mode": "<string>"
}
}
'import requests
url = "https://api.matia.io/v1/integrations"
payload = {
"destinationId": "<string>",
"destinationSchema": "<string>",
"replicationFrequency": "<string>",
"onSchemaUpdate": "<string>",
"enabled": True,
"sourceConfig": {
"type": "postgres",
"name": "<string>",
"authMethod": "<string>",
"connection": {
"username": "<string>",
"password": "<string>",
"hostname": "<string>",
"port": 123,
"database": "<string>",
"slot": "<string>",
"publication": "<string>"
},
"connectionType": "<string>",
"owners": ["<string>"]
},
"sourceSettings": {
"max_clients": 123,
"incremental_mode": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destinationId: '<string>',
destinationSchema: '<string>',
replicationFrequency: '<string>',
onSchemaUpdate: '<string>',
enabled: true,
sourceConfig: {
type: 'postgres',
name: '<string>',
authMethod: '<string>',
connection: {
username: '<string>',
password: '<string>',
hostname: '<string>',
port: 123,
database: '<string>',
slot: '<string>',
publication: '<string>'
},
connectionType: '<string>',
owners: ['<string>']
},
sourceSettings: {max_clients: 123, incremental_mode: '<string>'}
})
};
fetch('https://api.matia.io/v1/integrations', 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.matia.io/v1/integrations",
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([
'destinationId' => '<string>',
'destinationSchema' => '<string>',
'replicationFrequency' => '<string>',
'onSchemaUpdate' => '<string>',
'enabled' => true,
'sourceConfig' => [
'type' => 'postgres',
'name' => '<string>',
'authMethod' => '<string>',
'connection' => [
'username' => '<string>',
'password' => '<string>',
'hostname' => '<string>',
'port' => 123,
'database' => '<string>',
'slot' => '<string>',
'publication' => '<string>'
],
'connectionType' => '<string>',
'owners' => [
'<string>'
]
],
'sourceSettings' => [
'max_clients' => 123,
'incremental_mode' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.matia.io/v1/integrations"
payload := strings.NewReader("{\n \"destinationId\": \"<string>\",\n \"destinationSchema\": \"<string>\",\n \"replicationFrequency\": \"<string>\",\n \"onSchemaUpdate\": \"<string>\",\n \"enabled\": true,\n \"sourceConfig\": {\n \"type\": \"postgres\",\n \"name\": \"<string>\",\n \"authMethod\": \"<string>\",\n \"connection\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"slot\": \"<string>\",\n \"publication\": \"<string>\"\n },\n \"connectionType\": \"<string>\",\n \"owners\": [\n \"<string>\"\n ]\n },\n \"sourceSettings\": {\n \"max_clients\": 123,\n \"incremental_mode\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.matia.io/v1/integrations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"destinationId\": \"<string>\",\n \"destinationSchema\": \"<string>\",\n \"replicationFrequency\": \"<string>\",\n \"onSchemaUpdate\": \"<string>\",\n \"enabled\": true,\n \"sourceConfig\": {\n \"type\": \"postgres\",\n \"name\": \"<string>\",\n \"authMethod\": \"<string>\",\n \"connection\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"slot\": \"<string>\",\n \"publication\": \"<string>\"\n },\n \"connectionType\": \"<string>\",\n \"owners\": [\n \"<string>\"\n ]\n },\n \"sourceSettings\": {\n \"max_clients\": 123,\n \"incremental_mode\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.matia.io/v1/integrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destinationId\": \"<string>\",\n \"destinationSchema\": \"<string>\",\n \"replicationFrequency\": \"<string>\",\n \"onSchemaUpdate\": \"<string>\",\n \"enabled\": true,\n \"sourceConfig\": {\n \"type\": \"postgres\",\n \"name\": \"<string>\",\n \"authMethod\": \"<string>\",\n \"connection\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"slot\": \"<string>\",\n \"publication\": \"<string>\"\n },\n \"connectionType\": \"<string>\",\n \"owners\": [\n \"<string>\"\n ]\n },\n \"sourceSettings\": {\n \"max_clients\": 123,\n \"incremental_mode\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"code": "<string>",
"message": "<string>",
"data": {
"id": "<string>"
}
}{
"message": "<string>",
"code": "<string>"
}Integrations
Create Integration
Create a new integration with any supported connector
POST
/
integrations
Create a new integration
curl --request POST \
--url https://api.matia.io/v1/integrations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"destinationId": "<string>",
"destinationSchema": "<string>",
"replicationFrequency": "<string>",
"onSchemaUpdate": "<string>",
"enabled": true,
"sourceConfig": {
"type": "postgres",
"name": "<string>",
"authMethod": "<string>",
"connection": {
"username": "<string>",
"password": "<string>",
"hostname": "<string>",
"port": 123,
"database": "<string>",
"slot": "<string>",
"publication": "<string>"
},
"connectionType": "<string>",
"owners": [
"<string>"
]
},
"sourceSettings": {
"max_clients": 123,
"incremental_mode": "<string>"
}
}
'import requests
url = "https://api.matia.io/v1/integrations"
payload = {
"destinationId": "<string>",
"destinationSchema": "<string>",
"replicationFrequency": "<string>",
"onSchemaUpdate": "<string>",
"enabled": True,
"sourceConfig": {
"type": "postgres",
"name": "<string>",
"authMethod": "<string>",
"connection": {
"username": "<string>",
"password": "<string>",
"hostname": "<string>",
"port": 123,
"database": "<string>",
"slot": "<string>",
"publication": "<string>"
},
"connectionType": "<string>",
"owners": ["<string>"]
},
"sourceSettings": {
"max_clients": 123,
"incremental_mode": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destinationId: '<string>',
destinationSchema: '<string>',
replicationFrequency: '<string>',
onSchemaUpdate: '<string>',
enabled: true,
sourceConfig: {
type: 'postgres',
name: '<string>',
authMethod: '<string>',
connection: {
username: '<string>',
password: '<string>',
hostname: '<string>',
port: 123,
database: '<string>',
slot: '<string>',
publication: '<string>'
},
connectionType: '<string>',
owners: ['<string>']
},
sourceSettings: {max_clients: 123, incremental_mode: '<string>'}
})
};
fetch('https://api.matia.io/v1/integrations', 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.matia.io/v1/integrations",
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([
'destinationId' => '<string>',
'destinationSchema' => '<string>',
'replicationFrequency' => '<string>',
'onSchemaUpdate' => '<string>',
'enabled' => true,
'sourceConfig' => [
'type' => 'postgres',
'name' => '<string>',
'authMethod' => '<string>',
'connection' => [
'username' => '<string>',
'password' => '<string>',
'hostname' => '<string>',
'port' => 123,
'database' => '<string>',
'slot' => '<string>',
'publication' => '<string>'
],
'connectionType' => '<string>',
'owners' => [
'<string>'
]
],
'sourceSettings' => [
'max_clients' => 123,
'incremental_mode' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.matia.io/v1/integrations"
payload := strings.NewReader("{\n \"destinationId\": \"<string>\",\n \"destinationSchema\": \"<string>\",\n \"replicationFrequency\": \"<string>\",\n \"onSchemaUpdate\": \"<string>\",\n \"enabled\": true,\n \"sourceConfig\": {\n \"type\": \"postgres\",\n \"name\": \"<string>\",\n \"authMethod\": \"<string>\",\n \"connection\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"slot\": \"<string>\",\n \"publication\": \"<string>\"\n },\n \"connectionType\": \"<string>\",\n \"owners\": [\n \"<string>\"\n ]\n },\n \"sourceSettings\": {\n \"max_clients\": 123,\n \"incremental_mode\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.matia.io/v1/integrations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"destinationId\": \"<string>\",\n \"destinationSchema\": \"<string>\",\n \"replicationFrequency\": \"<string>\",\n \"onSchemaUpdate\": \"<string>\",\n \"enabled\": true,\n \"sourceConfig\": {\n \"type\": \"postgres\",\n \"name\": \"<string>\",\n \"authMethod\": \"<string>\",\n \"connection\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"slot\": \"<string>\",\n \"publication\": \"<string>\"\n },\n \"connectionType\": \"<string>\",\n \"owners\": [\n \"<string>\"\n ]\n },\n \"sourceSettings\": {\n \"max_clients\": 123,\n \"incremental_mode\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.matia.io/v1/integrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destinationId\": \"<string>\",\n \"destinationSchema\": \"<string>\",\n \"replicationFrequency\": \"<string>\",\n \"onSchemaUpdate\": \"<string>\",\n \"enabled\": true,\n \"sourceConfig\": {\n \"type\": \"postgres\",\n \"name\": \"<string>\",\n \"authMethod\": \"<string>\",\n \"connection\": {\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"slot\": \"<string>\",\n \"publication\": \"<string>\"\n },\n \"connectionType\": \"<string>\",\n \"owners\": [\n \"<string>\"\n ]\n },\n \"sourceSettings\": {\n \"max_clients\": 123,\n \"incremental_mode\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"code": "<string>",
"message": "<string>",
"data": {
"id": "<string>"
}
}{
"message": "<string>",
"code": "<string>"
}This endpoint allows you to create a new integration between a source and destination. The integration configuration varies based on the connector type you’re using.


Connector-Specific Configuration
Select your connector type to see its specific configuration requirements:PostgreSQL
Connect to PostgreSQL databases
Google Analytics 4
Connect to Google Analytics 4
Connector Library
View all supported connectors
Authorizations
Body
application/json