Skip to main content
PATCH
/
endpointConnections
/
{id}
Update endpoint connection
curl --request PATCH \
  --url https://api.galtea.ai/endpointConnections/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "productId": "prod_123",
  "name": "My API Connection",
  "url": "https://api.example.com/v1/chat/completions",
  "httpMethod": "POST",
  "authType": "BEARER",
  "inputTemplate": "{\"prompt\": \"{{ input }}\"}",
  "outputMapping": {
    "output": "$.choices[0].message.content"
  },
  "id": "ec_123",
  "userId": "user_123",
  "hasAuthToken": true,
  "username": "<string>",
  "hasPassword": true,
  "headers": {
    "Content-Type": "application/json"
  },
  "type": "CONVERSATION",
  "timeout": 60,
  "rateLimit": 60,
  "retryEnabled": false,
  "retryMaxAttempts": 3,
  "retryInitialDelayMs": 1000,
  "retryBackoffStrategy": "EXPONENTIAL",
  "retryMaxDelayMs": 30000,
  "retryableStatusCodes": [
    429,
    500,
    502,
    503,
    504
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z"
}
'
{
  "productId": "prod_123",
  "name": "My API Connection",
  "url": "https://api.example.com/v1/chat/completions",
  "httpMethod": "POST",
  "authType": "BEARER",
  "inputTemplate": "{\"prompt\": \"{{ input }}\"}",
  "outputMapping": {
    "output": "$.choices[0].message.content"
  },
  "id": "ec_123",
  "userId": "user_123",
  "hasAuthToken": true,
  "username": "<string>",
  "hasPassword": true,
  "headers": {
    "Content-Type": "application/json"
  },
  "type": "CONVERSATION",
  "timeout": 60,
  "rateLimit": 60,
  "retryEnabled": false,
  "retryMaxAttempts": 3,
  "retryInitialDelayMs": 1000,
  "retryBackoffStrategy": "EXPONENTIAL",
  "retryMaxDelayMs": 30000,
  "retryableStatusCodes": [
    429,
    500,
    502,
    503,
    504
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Path Parameters

id
string
required

EndpointConnection ID

Body

application/json
productId
string
required
Example:

"prod_123"

name
string
required
Example:

"My API Connection"

url
string
required
Example:

"https://api.example.com/v1/chat/completions"

httpMethod
enum<string>
required
Available options:
GET,
POST,
PUT,
PATCH,
DELETE
Example:

"POST"

authType
enum<string>
required
Available options:
NONE,
BEARER,
API_KEY,
BASIC,
OAUTH2
Example:

"BEARER"

inputTemplate
string | null
required

Jinja2/Nunjucks template for request body. Must contain {{ input }} placeholder.

Example:

"{\"prompt\": \"{{ input }}\"}"

outputMapping
object
required

JSONPath expressions to extract values from API response. Must include "output" key.

Example:
{ "output": "$.choices[0].message.content" }
id
string
Example:

"ec_123"

userId
string | null
Example:

"user_123"

hasAuthToken
boolean

Whether an auth token is configured (token value is not exposed)

username
string | null

Username for Basic auth

hasPassword
boolean

Whether a password is configured (password value is not exposed)

headers
object
Example:
{ "Content-Type": "application/json" }
type
enum<string>
Available options:
INITIALIZATION,
CONVERSATION,
FINALIZATION
Example:

"CONVERSATION"

timeout
integer | null
default:60

Timeout in seconds

Example:

60

rateLimit
integer | null

Maximum requests per minute

Example:

60

retryEnabled
boolean
default:false

Whether automatic retry is enabled for failed requests

retryMaxAttempts
integer | null
default:3

Maximum number of retry attempts (applied when retryEnabled is true)

Required range: 0 <= x <= 10
retryInitialDelayMs
integer | null
default:1000

Initial delay in milliseconds before first retry

Required range: x >= 0
retryBackoffStrategy
enum<string> | null
default:EXPONENTIAL

Strategy for increasing delay between retries

Available options:
FIXED,
EXPONENTIAL,
LINEAR
retryMaxDelayMs
integer | null
default:30000

Maximum delay cap in milliseconds

Required range: x >= 0
retryableStatusCodes
integer[]

HTTP status codes that should trigger a retry

Required range: 100 <= x <= 599
createdAt
string<date-time>
deletedAt
string<date-time> | null

Response

Endpoint connection updated successfully

productId
string
required
Example:

"prod_123"

name
string
required
Example:

"My API Connection"

url
string
required
Example:

"https://api.example.com/v1/chat/completions"

httpMethod
enum<string>
required
Available options:
GET,
POST,
PUT,
PATCH,
DELETE
Example:

"POST"

authType
enum<string>
required
Available options:
NONE,
BEARER,
API_KEY,
BASIC,
OAUTH2
Example:

"BEARER"

inputTemplate
string | null
required

Jinja2/Nunjucks template for request body. Must contain {{ input }} placeholder.

Example:

"{\"prompt\": \"{{ input }}\"}"

outputMapping
object
required

JSONPath expressions to extract values from API response. Must include "output" key.

Example:
{ "output": "$.choices[0].message.content" }
id
string
Example:

"ec_123"

userId
string | null
Example:

"user_123"

hasAuthToken
boolean

Whether an auth token is configured (token value is not exposed)

username
string | null

Username for Basic auth

hasPassword
boolean

Whether a password is configured (password value is not exposed)

headers
object
Example:
{ "Content-Type": "application/json" }
type
enum<string>
Available options:
INITIALIZATION,
CONVERSATION,
FINALIZATION
Example:

"CONVERSATION"

timeout
integer | null
default:60

Timeout in seconds

Example:

60

rateLimit
integer | null

Maximum requests per minute

Example:

60

retryEnabled
boolean
default:false

Whether automatic retry is enabled for failed requests

retryMaxAttempts
integer | null
default:3

Maximum number of retry attempts (applied when retryEnabled is true)

Required range: 0 <= x <= 10
retryInitialDelayMs
integer | null
default:1000

Initial delay in milliseconds before first retry

Required range: x >= 0
retryBackoffStrategy
enum<string> | null
default:EXPONENTIAL

Strategy for increasing delay between retries

Available options:
FIXED,
EXPONENTIAL,
LINEAR
retryMaxDelayMs
integer | null
default:30000

Maximum delay cap in milliseconds

Required range: x >= 0
retryableStatusCodes
integer[]

HTTP status codes that should trigger a retry

Required range: 100 <= x <= 599
createdAt
string<date-time>
deletedAt
string<date-time> | null