Connections

List the apps your workspace is connected to, connect an app with an API key or other credentials, test a connection, remove one, and find out how an app connects.

A connection is one account or saved key for an app: the workspace's Stripe key, or someone's own Gmail. A key sees the connections the member who created it can use, as they see them on the Apps page, and never their credentials.

The connection endpoints need their own scopes, connections:read and connections:write, which only API keys can hold: tick See connected apps or Connect and remove apps when you create the key. See Scopes.

The connection object

{
  "id": "66a2c4e6f8a0b2c4d6e8f0a1",
  "app_id": "stripe",
  "app_name": "Stripe",
  "name": "Live key",
  "status": "connected",
  "sharing": "workspace",
  "in_use": true,
  "connected_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" },
  "last_test": null,
  "expires_at": null,
  "created_at": "2026-10-20T15:02:11+00:00",
  "updated_at": "2026-10-20T15:02:11+00:00"
}

Fields

idstring
The connection's ID.
app_idstring
The ID of the app it connects, such as stripe. GET /apps/:app_id says how that app connects.
app_namestring
The app's name, as Lodol shows it.
namestring
The connection's name, as the Apps page shows it.
statusstring
connected; needs_sign_in, for one that was added but never signed in to, or whose sign-in has lapsed; or failing.
sharingstring
Whose runs can use it: personal (only the member who connected it), workspace (everyone's), or roles (members with the roles chosen on the Apps page).
in_useboolean
Whether it's the connection the key's member's runs use for this app. A workspace can have several connections to one app.
connected_byobject or null
The member who added it: their id and name.
last_testobject or null
What the last test of it found, or null if it hasn't been tested. outcome is working, failed, or unknown for an app with no safe way to test an account; message says it in words; tested_at is when, in ISO 8601.
expires_atstring or null
When the connection stops working, in ISO 8601, for an app whose sign-in expires; otherwise null.
created_atstring or null
When it was added, in ISO 8601.
updated_atstring or null
When it was last changed, in ISO 8601.

List connections

GET/api/v1/connections

Returns the connections the member who created the key can use, newest first. A teammate's personal connection isn't listed. Requires the connections:read scope.

Query parameters

app_idstring
Only connections to this app, such as stripe.
limitinteger
How many to return, from 1 to 100.Default: 50.
cursorstring
For the next page: the next_cursor of the page you have.
curl "https://api-prod.lodol.com/api/v1/connections?app_id=stripe" \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200: the connection objects. Here the member has a personal Stripe key and can use the workspace's; their runs use their own, so it's the one in_use:

{
  "connections": [
    {
      "id": "66a2c4e6f8a0b2c4d6e8f0a2",
      "app_id": "stripe",
      "app_name": "Stripe",
      "name": "Test mode key",
      "status": "connected",
      "sharing": "personal",
      "in_use": true,
      "connected_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" },
      "last_test": null,
      "expires_at": null,
      "created_at": "2026-11-01T11:30:00+00:00",
      "updated_at": "2026-11-01T11:30:00+00:00"
    },
    {
      "id": "66a2c4e6f8a0b2c4d6e8f0a1",
      "app_id": "stripe",
      "app_name": "Stripe",
      "name": "Live key",
      "status": "connected",
      "sharing": "workspace",
      "in_use": false,
      "connected_by": { "id": "665f1a2b3c4d5e6f7a8b9c0f", "name": "Grace Hopper" },
      "last_test": null,
      "expires_at": null,
      "created_at": "2026-10-20T15:02:11+00:00",
      "updated_at": "2026-10-20T15:02:11+00:00"
    }
  ],
  "next_cursor": null
}

Get a connection

GET/api/v1/connections/:id

Returns one connection object. Requires the connections:read scope. A connection that doesn't exist, or that the key's member can't use, such as a teammate's personal one, returns 404 with the code not_found.

curl https://api-prod.lodol.com/api/v1/connections/66a2c4e6f8a0b2c4d6e8f0a1 \
  -H "Authorization: Bearer $LODOL_API_KEY"

How an app connects

GET/api/v1/apps/:app_id

Says how an app connects, and for one that takes credentials, which ones to send to Connect an app. Any valid key can call it; it needs no scope. :app_id is the app's ID, which Search apps finds.

curl https://api-prod.lodol.com/api/v1/apps/slack \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200:

{
  "id": "slack",
  "name": "Slack",
  "description": "Send messages, share files and manage channels in Slack.",
  "connects": "with_credentials",
  "credentials": [
    { "id": "botToken", "label": "Bot User OAuth Token", "required": true, "hint": "" },
    {
      "id": "signingSecret",
      "label": "Signing Secret",
      "required": false,
      "hint": "For instant triggers. It's under **Basic Information > App Credentials** in your Slack app."
    }
  ]
}

Fields

idstring
The app's ID.
namestring
The app's name.
descriptionstring
What Lodol can do with it.
connectsstring
with_credentials, for an app you connect through this API; or by_signing_in, for one you connect by signing in to it in a browser, on the Apps page.
credentialsarray
For an app that connects with credentials, the fields to send in credentials, each with its id, the label the Apps page shows, whether it's required, and a hint. A field with a fixed set of choices has options too. Empty for an app you sign in to, and for one that needs no credentials.
connect_urlstring
For an app you sign in to: the Apps page, where to connect it.

An app you connect by signing in, such as Gmail, has no credentials to send:

{
  "id": "gmail",
  "name": "Gmail",
  "description": "Send, read, and manage email from your Gmail account.",
  "connects": "by_signing_in",
  "credentials": [],
  "connect_url": "https://app.lodol.com/apps"
}

An app the workspace doesn't have returns 404 with the code not_found.


Connect an app

POST/api/v1/connections

Connects an app with an API key or other credentials, as connecting it on the Apps page does. Requires the connections:write scope. The member who created the key must be allowed to add it: a personal connection needs the Run workflows role permission, and one shared with the workspace needs Manage apps; otherwise the request gets 403 with the code permission_denied.

It always adds a new connection, even when the app already has one: it never replaces a connection. To replace one, connect the new one, then remove the old.

Before anything is saved, Lodol asks the app whether it accepts the credentials. If the app turns them down, the request gets 400 with the code credentials_rejected and nothing is saved. If the app can't be asked, or doesn't answer clearly, the connection is saved. An app you connect by signing in can't be connected through the API: the request gets 400 with the code connect_in_browser, and connect_url in the body gives the address of the Apps page, where a person connects it.

Headers

Idempotency-Keystring
Makes the request safe to retry: a repeat with the same key returns the first response instead of adding another connection. See Idempotency.

Body

app_idstring
The ID of the app to connect, such as stripe.Required.
credentialsobject
The app's credentials, by the field IDs How an app connects lists, such as secretKey for Stripe. Every required field needs a value.
namestring
What to call the connection. Left out, Lodol names it.
sharingstring
personal, so only the member who created the key runs with it, or workspace, so everyone's runs can. To share it with particular roles, change it on the Apps page.

Any other field is refused with 400.

curl -X POST https://api-prod.lodol.com/api/v1/connections \
  -H "Authorization: Bearer $LODOL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: connect-stripe-live" \
  -d '{
    "app_id": "stripe",
    "credentials": { "secretKey": "'"$STRIPE_SECRET_KEY"'" },
    "name": "Live key",
    "sharing": "workspace"
  }'

Response 201: the new connection object.

{
  "id": "66a2c4e6f8a0b2c4d6e8f0a1",
  "app_id": "stripe",
  "app_name": "Stripe",
  "name": "Live key",
  "status": "connected",
  "sharing": "workspace",
  "in_use": true,
  "connected_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" },
  "last_test": null,
  "expires_at": null,
  "created_at": "2026-10-20T15:02:11+00:00",
  "updated_at": "2026-10-20T15:02:11+00:00"
}

Response 400, when the app turns the credentials down:

{
  "error": "Stripe didn't accept these credentials: Stripe rejected this key. Nothing was saved.",
  "error_code": "credentials_rejected"
}

A required credential left out gets 400 with the code invalid_request and a message naming it:

{
  "error": "Stripe needs \"secretKey\" (API key) in \"credentials\". Nothing was saved.",
  "error_code": "invalid_request"
}

Test a connection

POST/api/v1/connections/:id/test

Asks the app whether it still accepts the connection, as Test connection on the Apps page does, and records the answer. The test only reads: it changes nothing in the app. Requires the connections:read scope.

curl -X POST https://api-prod.lodol.com/api/v1/connections/66a2c4e6f8a0b2c4d6e8f0a1/test \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200: the connection object, with the result in last_test. An app that has no safe way to test an account answers unknown:

{
  "id": "66a2c4e6f8a0b2c4d6e8f0a3",
  "app_id": "alienvault_otx",
  "app_name": "AlienVault OTX",
  "name": "Threat lookups",
  "status": "connected",
  "sharing": "personal",
  "in_use": true,
  "connected_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" },
  "last_test": {
    "outcome": "unknown",
    "message": "AlienVault OTX has no safe way to test an account. It will be checked the next time a workflow uses it.",
    "tested_at": "2026-11-30T20:01:14.754000+00:00"
  },
  "expires_at": null,
  "created_at": "2026-11-30T20:01:09.808000+00:00",
  "updated_at": "2026-11-30T20:01:09.808000+00:00"
}

Remove a connection

DELETE/api/v1/connections/:id

Removes a connection, as removing it on the Apps page does. This can't be undone. Requires the connections:write scope, and the same role permission as connecting it: Run workflows for a personal connection, Manage apps for a shared one. Otherwise the request gets 403 with the code permission_denied.

Removing a connection:

  • turns off any workflow that listens for its trigger through it
  • stops the steps that used it from working: they don't fall back to another connection to the same app
curl -X DELETE https://api-prod.lodol.com/api/v1/connections/66a2c4e6f8a0b2c4d6e8f0a1 \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200:

{ "id": "66a2c4e6f8a0b2c4d6e8f0a1", "deleted": true, "restorable_until": null }

restorable_until is always null: a removed connection can't be restored. A connection that doesn't exist, has already been removed, or that the key's member can't use returns 404.

On this page