For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inBook a demo
GuidesAPI Reference
Logo
GuidesAPI Reference
  • API Reference
      • GETGet Connection Types
      • GETGet Connection Type
      • POSTConnection Type Parameter Values
      • GETList Connections
      • POSTCreate Connection
      • POSTConnect
      • POSTTest Connection
      • GETGet Connection
      • PUTUpdate Connection
      • DELDelete Connection
      • GETConnection Parameter Values
      • POSTExecute Connection Proxy
      • GETGet Connection Proxy Info
      • GETList Current Org Shared Connections
      • GETList Partner Shared Connections
      • POSTCreate Partner Shared Connection
Log inBook a demo
API ReferenceConnections

Create Connection

POST
https://app.polytomic.com/api/connections
POST
/api/connections
$curl -X POST https://app.polytomic.com/api/connections \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "configuration": {
> "database": "example",
> "hostname": "postgres.example.com",
> "password": "********",
> "port": 5432,
> "username": "user"
> },
> "name": "My Postgres Connection",
> "type": "postgresql"
>}'
1{
2 "data": {
3 "auth_code": "string",
4 "auth_url": "string",
5 "configuration": {
6 "database": "example",
7 "hostname": "postgres.example.com",
8 "password": "********",
9 "port": 5432,
10 "username": "user"
11 },
12 "healthcheck_interval": "3h30m",
13 "id": "248df4b7-aa70-47b8-a036-33ac447e668d",
14 "name": "My Postgres Connection",
15 "organization_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
16 "policies": [
17 "248df4b7-aa70-47b8-a036-33ac447e668d"
18 ],
19 "saved": true,
20 "status": "healthy",
21 "status_error": "error message",
22 "type": {
23 "id": "postgresql",
24 "logo_url": "https://connect-assets.polytomic.com/logos/postgresql.svg",
25 "name": "PostgreSQL",
26 "operations": [
27 "bulksyncsource"
28 ]
29 }
30 }
31}
Creates a new connection of the specified type. Use [`GET /api/connection_types`](../../api-reference/connections/get-types) to retrieve the list of available types and their parameter schemas. The `configuration` object is type-specific; consult the [integration guides](../../guides/configuring-your-connections/overview) for the required and optional fields for each type. > 📘 Polytomic validates the connection against the upstream service > immediately on creation. The request will fail if the credentials or > endpoint cannot be reached.
Was this page helpful?
Previous

Connect

Next

Creates a new connection of the specified type.

Use GET /api/connection_types to retrieve the list of available types and their parameter schemas. The configuration object is type-specific; consult the integration guides for the required and optional fields for each type.

📘 Polytomic validates the connection against the upstream service immediately on creation. The request will fail if the credentials or endpoint cannot be reached.

Authentication

AuthorizationBearer
Bearer user API key
OR
AuthorizationBasic

Basic organization-scoped API key

Headers

X-Polytomic-VersionstringOptional

Request

This endpoint expects an object.
configurationmap from strings to anyRequired
namestringRequired
typestringRequired
healthcheck_intervalstringOptional
Override interval for connection health checking.
organization_idstring or nullOptionalformat: "uuid"
policieslist of strings or nullOptional
redirect_urlstringOptional
URL to redirect to after completing OAuth flow.
validatebooleanOptionalDefaults to true
Validate connection configuration.

Response

OK
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error
500
Internal Server Error