Skip to Content

Prepare an integration connection

Prepare an integration connection. Request: POST /v1/integrations/catalog/prepare. Scope: agents:create.

POST
/v1/integrations/catalog/prepare

Resolves what connecting a catalog provider needs: the inputs and credentials it asks for, the hosts its API and OAuth credentials reach, and whether it can connect. Pass input for server inputs such as an API description URL. An unavailable provider carries a reason.

Authorization

apiKey
headerx-api-key<token>

Request Body

application/json
  1. body
provider*IntegrationKey
Match^[a-z0-9][a-z0-9_-]{0,63}$
input?

Response Body

Success

application/json
  1. response
connectSpec*
hosts*array<string>
connectState*string
Value in"ready""checkedAtConnect""unavailable"
reason*string|null
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.integrationCatalog.prepare({
  "provider": "example"
});
Example Response
{
  "connectSpec": {
    "provider": "string",
    "auth": "discover",
    "inputs": {
      "property1": {
        "label": "string",
        "description": "string",
        "pattern": "string",
        "maxLength": 1,
        "example": "string",
        "default": "string",
        "kind": "hostnameLabel"
      },
      "property2": {
        "label": "string",
        "description": "string",
        "pattern": "string",
        "maxLength": 1,
        "example": "string",
        "default": "string",
        "kind": "hostnameLabel"
      }
    },
    "credentials": {
      "property1": {
        "label": "string"
      },
      "property2": {
        "label": "string"
      }
    }
  },
  "hosts": [
    "string"
  ],
  "connectState": "ready",
  "reason": "string"
}

Related documentation