Skip to Content
Configuration

Update an assistant provider connection

Omit `apiKey` to keep this connection’s stored key while the provider type and server origin stay the same; pass `null` to remove it. Changing provider or server origin clears the stored key.

PUT
/api/settings/assistant/connections/{id}

Authorization

headerAuthorizationBearer <Postdot API key>

A user-owned Postdot API key sent as Authorization: Bearer <token>. Its project scope is limited by the creator’s current access.

Path Parameters

id*string
Length1 <= length <= 100

Request Body

  1. body
provider*string
Value in"openai-compatible""openai""anthropic""google""openrouter"
label?string
Lengthlength <= 80
baseUrl?string
Lengthlength <= 2048
enabled*boolean
models*array<>

Enabled models on this provider connection. Each model has an ID, an optional short note and, on OpenAI-compatible servers, whether it accepts images.

Itemsitems <= 50
contextWindow?|null
apiKey?|null

Response Body

Response for status 200

application/json
  1. response
connection*
settings*
Example Request
curl -X PUT 'https://postdot.example/api/settings/assistant/connections/string' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "openai-compatible",
  "enabled": true,
  "models": [
    {
      "id": "string"
    }
  ]
}'
Example Response
{
  "connection": {
    "id": "string",
    "provider": "openai-compatible",
    "label": "string",
    "baseUrl": "string",
    "enabled": true,
    "models": [
      {
        "id": "string",
        "note": "string",
        "images": true
      }
    ],
    "contextWindow": 4000,
    "hasApiKey": true,
    "conversationCount": 0,
    "createdAt": 0,
    "updatedAt": 0
  },
  "settings": {
    "enabled": true,
    "defaultConnectionId": "string",
    "defaultModel": "string",
    "limits": {
      "maxRunning": 1,
      "maxTurns": 1,
      "answerTimeoutSeconds": 10,
      "retentionDays": 1
    },
    "connections": [
      {
        "id": "string",
        "provider": "openai-compatible",
        "label": "string",
        "baseUrl": "string",
        "enabled": true,
        "models": [
          {
            "id": "string",
            "note": "string",
            "images": true
          }
        ],
        "contextWindow": 4000,
        "hasApiKey": true,
        "conversationCount": 0,
        "createdAt": 0,
        "updatedAt": 0
      }
    ],
    "source": "database",
    "provider": "openai-compatible",
    "baseUrl": "string",
    "model": "string",
    "models": [
      {
        "id": "string",
        "note": "string",
        "images": true
      }
    ],
    "contextWindow": 4000,
    "hasApiKey": true,
    "memory": {
      "enabled": true,
      "maxEntriesAllProjects": 5,
      "maxEntriesPerProject": 5,
      "maxCharactersAllProjects": 400,
      "maxCharactersPerProject": 400,
      "entryCount": 0
    }
  }
}

Was this page helpful?