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
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
      • POSTCreate Shared Connection
      • GETList Shared Connections
Logo
Log inBook a demo
API ReferenceConnections

Update Connection

PUT
https://app.polytomic.com/api/connections/:id
PUT
/api/connections/:id
$curl -X PUT https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d \
> -H "X-Polytomic-Version: X-Polytomic-Version" \
> -H "Content-Type: application/json" \
> -u "<username>:<password>" \
> -d '{
> "configuration": {
> "database": "example",
> "hostname": "postgres.example.com",
> "password": "********",
> "port": 5432,
> "username": "user"
> },
> "name": "My Postgres Connection"
>}'
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}
Updates a connection's configuration. Updating a connection is a **full replacement** of its configuration. Any `configuration` field you omit is cleared. To make a partial change, fetch the current connection with [`GET /api/connections/{id}`](../../../api-reference/connections/get), apply your edits, and send the complete object back. > 📘 The connection is re-validated against the upstream service after every > update. The request will fail if the new credentials or endpoint cannot be > reached. Syncs that are already running when the update is submitted are not interrupted; the updated configuration takes effect on their next execution.
Was this page helpful?
Previous

Delete Connection

Next

Updates a connection’s configuration.

Updating a connection is a full replacement of its configuration. Any configuration field you omit is cleared. To make a partial change, fetch the current connection with GET /api/connections/{id}, apply your edits, and send the complete object back.

📘 The connection is re-validated against the upstream service after every update. The request will fail if the new credentials or endpoint cannot be reached.

Syncs that are already running when the update is submitted are not interrupted; the updated configuration takes effect on their next execution.

Authentication

AuthorizationBasic

This is the Polytomic deployment key (on-premises only)

OR
AuthorizationBearer
This is the Polytomic API key

Path parameters

idstringRequiredformat: "uuid"

Headers

X-Polytomic-VersionstringRequired

Request

This endpoint expects an object.
configurationmap from strings to anyRequired
namestringRequired
healthcheck_intervalstringOptional
Override interval for connection health checking.
organization_idstring or nullOptionalformat: "uuid"
policieslist of strings or nullOptional
reconnectbooleanOptional
typestringOptional
validatebooleanOptionalDefaults to true
Validate connection configuration.

Response

OK
dataobject

Errors

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