API referenceSlack

Create a Slack app

Registers a Slack app so the "Add to Slack" button, bot identity, and app icon carry your brand, and returns its secret-free summary.

Endpoint
POST https://api.dairo.app/v1/slack/apps

Registers a Slack app so the "Add to Slack" button, bot identity, and app icon carry your brand, and returns its secret-free summary. Dairo mints the app from your configToken (a Slack app-configuration token used once to call the manifest APIs, then dropped — never stored); origin may be omitted or managed, and any other value — including the former byo import of an existing app's credentials, which cannot prove you own the app — is a 400. contextMode is mentions (@mentions and DMs only, the default) or ambient (also subscribes to channel message events); an unknown value is a 400. Both app secrets are sealed at rest, so the response returns only id, appId, clientId, name, origin, and contextMode, and a new app starts with ambientMode off. Requires the inboxes:write scope.

Scope: inboxes:write. Send the API key as a bearer token; Scopes lists what each one reaches.

Request

cURL
curl -X POST "https://api.dairo.app/v1/slack/apps" \
  -H "Authorization: Bearer $DAIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "configToken": "string"
  }'

Body

Required, application/json: SlackAppCreateRequest.

Create a Slack app that Dairo mints from your app-configuration token (configToken).

FieldTypeRequiredDescription
origin"managed"noOptional; 'managed' is the only origin (Dairo mints the app from configToken).
contextMode"mentions", "ambient"noDefault 'mentions'. 'ambient' also subscribes the app to channel message events.
namestringnoDisplay name for the app and bot (optional).
configTokenstringyesYour Slack app-configuration access token (xoxe...). Used once to mint the app, then dropped - never stored.

Response

200 Success. Body: application/json, SlackApp.

FieldTypeRequiredDescription
idstringyesDairo record id.
appIdstringyesThe Slack app id (e.g. A012ABCD0A0).
clientIdstringyesThe OAuth client id (public; it appears in the install URL).
namestring or nullnoDisplay name the app was created with.
origin"managed"yes'managed': Dairo minted it via the App Manifest APIs.
contextMode"mentions", "ambient"yes'mentions' (@mentions + DMs only) or 'ambient' (also channel message events).
ambientMode"off", "store"no'off' (drop ambient chatter) or 'store' (persist it silently, no message.received). Present on list reads; absent on the create response.
statusstringno'active' | 'deleted'. Present on list reads; absent on the create response.
createdAtstringnoISO 8601 creation timestamp. Present on list reads; absent on the create response.
200
{
  "id": "string",
  "appId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "clientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "Ada Lovelace",
  "origin": "managed",
  "contextMode": "mentions",
  "ambientMode": "off",
  "status": "string",
  "createdAt": "string"
}

Errors

Every error has the same body, {"error": {"type", "code", "message", "param"}}; branch on code. Errors lists every code.

StatusMeaning
400The request is malformed or a value is invalid (invalid_request, invalid_domain, idempotency_key_mismatch).
401The API key is missing or invalid.
403The key lacks the scope this endpoint needs (scope_missing) or may not do this (not_permitted).
409The resource already exists or its state does not allow this (duplicate_resource or a condition-specific code).
429Rate limit, plan limit, budget or spend cap reached (rate_limited, plan_limit_reached, budget_exceeded, spend_cap_reached).
500An unexpected error; retry with backoff, then contact support (internal_error).

On this page