API Referencev1

Connections API

Store provider credentials, create and test connections, discover capabilities, rotate credentials and run entity syncs.

Updated 07/10/2026

On this page

All paths start with /api/console/connect and need a session token. The required workspace permission is shown for each endpoint.

Credentials

MethodPathPermissionDescription
GET/credential-setupconnect.connection.create{available, providers: {<connectorKey>: [{key, label, description, optional}]}}: the credential fields each connector needs
POST/credential-referencesconnect.connection.createStores credentials in Key Vault and returns {secretReference, stored: true}
json
POST /api/console/connect/credential-references
{
  "connectorKey": "hubspot",
  "credentials": { "accessToken": "<private app token>" }
}

Only the fields declared for the connector are accepted. Each value must be non-empty, at most 4,096 characters, with no line breaks. Returns 503 if the workspace has no managed vault.

Create a connection

POST /connections (connect.connection.create)

FieldTypeNotes
connectorKeystringA connector with an operational runtime, for example xero or jira
projectIdstringMust belong to the workspace
namestring3–100 characters, unique in the workspace
environmentsandbox or productionDefault sandbox
slugstringOptional
configurationobjectProvider settings (below)

configuration accepts the connector's declared settings plus:

secretReference: the Key Vault secret URI, which must sit in the managed vault under connect-<workspaceId>-…;

baseUrl: only where the connector allows a customer-specific host;

allowedWriteOperations: an array of write operation keys this connection may run;

authentication, accountReference, organisationReference.

Unknown settings and secret-like keys (password, apiKey, token, clientSecret, authorization, credential) return 400. A base URL outside the provider's documented origin also returns 400.

json
POST /api/console/connect/connections
{
  "connectorKey": "jira",
  "projectId": "proj_123",
  "name": "Jira operations",
  "environment": "sandbox",
  "configuration": {
    "site": "acme",
    "allowedWriteOperations": ["issues.create"],
    "secretReference": "https://<vault>.vault.azure.net/secrets/connect-<workspace>-jira"
  }
}

The response is the connection with status: "draft", healthStatus: "unknown" and the derived providerBaseUrl. The secret reference is never returned in configuration.

Manage connections

MethodPathPermissionDescription
GET/connectionsconnect.connection.readAll connections, newest first, with connector, secret status and the latest health check
GET/connections/:idconnect.connection.readOne connection with its last 20 health checks
PATCH/connections/:idconnect.connection.update{name?, configuration?}. Returns the connection to draft.
POST/connections/:id/testconnect.connection.testRuns the health check. Success: {status: "healthy", latencyMs, detail}, and the connection becomes active.
POST/connections/:id/rotate-credentialsconnect.connection.rotate_secret{secretReference}. Returns the connection to draft.
POST/connections/:id/disableconnect.connection.updateDisables the connection
GET/connections/:id/healthconnect.connection.readHealth check history
GET/connections/:id/capabilitiesconnect.connection.readCapability manifest; add ?refresh=true to rediscover
GET/connections/:id/account-contextconnect.connection.readCached capability manifest

Capability manifest

Each operation in the manifest includes:

its key, display name, mode (read or write) and entity;

input and output schemas, required permissions and pagination;

idempotency, approvalRequired and risk level;

availability.state: available or permission_required.

If discovery is not possible, the reason is one of CONNECTION_NOT_ACTIVE, CAPABILITY_DISCOVERY_EMPTY, CAPABILITY_DISCOVERY_FAILED or ADAPTER_UNAVAILABLE. Successful discoveries are cached for 60 seconds, failures for 15 seconds.

Entity sync (commerce connectors)

MethodPathPermissionDescription
POST/connections/:id/syncconnect.flow.executeStarts a sync run
GET/connections/:id/sync-runsconnect.connection.readThe 50 most recent runs
GET/connections/:id/sync-records?entity=connect.connection.readUp to 1,000 synced records

The sync body:

environment: must match the connection's environment;

entities[]: any of products, prices, customers, orders, deliveries and inventory (default all);

idempotencyKey and correlationId: required;

pageSize: 1–100, default 100.

Replaying a key returns the existing run with replayed: true.

Xero authorisation

GET /xero/connections/:id/oauth/start (connect.connection.update) returns {provider, authorizeUrl, expiresInSeconds: 600}. Send the user to authorizeUrl; Xero redirects back to Nexra, which completes the connection.

Need a hand?

Ask Nexra AI for implementation steps or error guidance.

Ask Nexra AI