API reference

Base URL: https://openwire.rails-agent.com

Auth (except health + Slack hooks/callback): Authorization: Bearer ow_…

GET /api/v1/health

Public health + Slack OAuth readiness.

POST /api/v1/oauth/slack/start

Creates a pendinginstallation and returns Slack's authorize URL.

{
  "webhook_url": "https://cloud…/agents/{id}/open-wire/inbound",
  "webhook_secret": "ows_…",
  "return_url": "https://cloud…/dashboard/agents/…",
  "branding": { "display_name": "Rails Agent" },
  "meta": { "agent_id": "…" }
}

Response includes authorize_url — open this in the browser for workspace install.

GET /api/v1/oauth/slack/callback

Slack redirect target. Exchanges code for a bot token, activates the installation, redirects to return_url.

POST /api/v1/installations

Create an active installation with an existing bot token (custom / sandbox path). Prefer OAuth start for customer installs.

GET /api/v1/installations

List installations.

GET /api/v1/installations/:id

Fetch one installation (poll until status: active).

DELETE /api/v1/installations/:id

Remove an installation.

POST /api/v1/messages

Send an outbound message through an active installation.

POST /api/v1/hooks/slack

Slack Events API Request URL. Verifies signature when SLACK_SIGNING_SECRET is set, then delivers message.inbound to the agent webhook.

POST /api/v1/keys

Create additional API keys (platform key required).