API referenceSlack

Update a Slack app's ambient mode

Updates a Slack app's ambientMode, the only mutable field; ambientMode is required in the body and must be off or store.

Endpoint
PATCH https://api.dairo.app/v1/slack/apps/{appId}

Updates a Slack app's ambientMode, the only mutable field; ambientMode is required in the body and must be off or store. store captures ambient channel chatter into the mailbox for later query without firing message.received, and is valid only on a contextMode='ambient' app — sending store to a mentions-only app is a 400, since it receives no ambient message stream to store. Any other field in the body is rejected so a caller never believes it patched an immutable credential. Returns appId, contextMode, and ambientMode; an app the caller does not own is a 404. 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 PATCH "https://api.dairo.app/v1/slack/apps/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
  -H "Authorization: Bearer $DAIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ambientMode": "off"
  }'

Path parameters

NameTypeRequiredDescription
appIdstringyesThe Slack app id (e.g. A012ABCD0A0).

Body

Required, application/json: SlackAppPatchRequest.

The only mutable field on a Slack app.

FieldTypeRequiredDescription
ambientMode"off", "store"yes'store' requires a context_mode='ambient' app.

Response

200 Success. Body: application/json, SlackAppAmbientResponse.

FieldTypeRequiredDescription
appIdstringyes
contextMode"mentions", "ambient"yes
ambientMode"off", "store"yes
200
{
  "appId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "contextMode": "mentions",
  "ambientMode": "off"
}

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).
404No such resource in this account (resource_not_found).
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