Integrations
Outbound webhooks, the Slack bot and its channel mappings, and document-source connectors.
13 endpoints. 1 are reachable without a dashboard session — they are listed in the Integration API — and the other 12 require a Cognito JWT. The badge under each path says which.
/v1/companies/me/slack-bot Slack Events bot install (sanitized; botTokenConfigured flags)
Auth Cognito JWT admin · Growth+
Path parameters
None.
Query parameters
None.Scoped by the calling credential, so there is nothing in the URL to narrow.
Body parameters
None.GET requests carry no body.
Response
Status codes
| Status | Meaning |
|---|---|
| 200 | Success. |
| 401 | Missing or expired JWT. |
| 403 | The signed-in user's role does not allow this. |
| 429 | Rate limited. See rate limits. |
curl
curl -X GET 'https://api.dev.oprag.ai/v1/companies/me/slack-bot' \
-H 'Authorization: Bearer <Cognito JWT>' /v1/companies/me/slack-bot Install or update Slack bot (encrypts tokens at rest)
Auth Cognito JWT admin · Growth+
Path parameters
None.
Query parameters
None.Everything it needs is in the request body.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
teamId | string | Required | Slack workspace id. |
botToken | string | Required | Slack bot token. Encrypted at rest. |
signingSecret | string | Required | Slack signing secret, used to verify inbound events. |
defaultProjectId | string | Required | Project used for channels with no explicit mapping. |
Response
Status codes
curl
curl -X PUT 'https://api.dev.oprag.ai/v1/companies/me/slack-bot' \
-H 'Authorization: Bearer <Cognito JWT>' /v1/companies/me/slack-bot Uninstall the Slack bot and delete its stored tokens.
Auth Cognito JWT admin · Growth+
Before you call it
- Idempotent. The body is
{ deleted: true }, or{ deleted: false }when no bot was installed.
Path parameters
None.
Query parameters
None.Acts on the resource named in the path; there is nothing to choose.
Body parameters
None.DELETE requests carry no body.
Response
200 Success
{
"deleted": true
} Status codes
curl
curl -X DELETE 'https://api.dev.oprag.ai/v1/companies/me/slack-bot' \
-H 'Authorization: Bearer <Cognito JWT>' /v1/companies/me/slack-bot/channels/{channelId} Map a Slack channel to a project so it answers from that project's documents.
Auth Cognito JWT admin · Growth+
Before you call it
- Messages in that Slack channel then answer from the mapped project's documents.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
channelId | string | Required | Slack channel id, e.g. C0123456789. |
Query parameters
None.Everything it needs is in the request body.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string | Required | Project this channel should answer from. |
Request
{
"projectId": "proj_abc123"
} Response
200 Success
{
"channelMapping": {
"channelId": "C0123456789",
"projectId": "proj_abc123"
}
} Status codes
curl
curl -X PUT 'https://api.dev.oprag.ai/v1/companies/me/slack-bot/channels/{channelId}' \
-H 'Authorization: Bearer <Cognito JWT>' \
-H 'Content-Type: application/json' \
-d '{"projectId": "proj_abc123"}' /v1/companies/me/slack-bot/channels/{channelId} Remove a channel-to-project mapping. The bot stays installed. 404 when the bot is not installed.
Auth Cognito JWT admin · Growth+
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
channelId | string | Required | Slack channel id, e.g. C0123456789. |
Query parameters
None.Acts on the resource named in the path; there is nothing to choose.
Body parameters
None.DELETE requests carry no body.
Response
200 Success
{
"deleted": true
} Status codes
curl
curl -X DELETE 'https://api.dev.oprag.ai/v1/companies/me/slack-bot/channels/{channelId}' \
-H 'Authorization: Bearer <Cognito JWT>' /v1/companies/me/integrations List outbound integrations (http_webhook, slack notify)
Auth Cognito JWT admin · Growth+
Path parameters
None.
Query parameters
None.Scoped by the calling credential, so there is nothing in the URL to narrow.
Body parameters
None.GET requests carry no body.
Response
Status codes
| Status | Meaning |
|---|---|
| 200 | Success. |
| 401 | Missing or expired JWT. |
| 403 | The signed-in user's role does not allow this. |
| 429 | Rate limited. See rate limits. |
curl
curl -X GET 'https://api.dev.oprag.ai/v1/companies/me/integrations' \
-H 'Authorization: Bearer <Cognito JWT>' /v1/companies/me/integrations Create outbound integration (HTTPS webhook URL required)
Auth Cognito JWT admin · Growth+
Path parameters
None.
Query parameters
None.Everything it needs is in the request body.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | Display name. |
driverType | "http_webhook" | "slack" | Required | http_webhook posts JSON to your endpoint; slack posts into Slack. |
subscribedEvents | enum[] | Required | Which events to deliver, e.g. lead.created. |
webhookUrl | string | Required | HTTPS only, and validated against SSRF rules before it is stored. |
webhookSecret | string | Optional | Shared secret used to sign deliveries. |
projectId | string | Optional | Project this belongs to. Must be in the calling workspace. |
enabled | boolean | Optional | Whether the feature is active. |
Response
Status codes
curl
curl -X POST 'https://api.dev.oprag.ai/v1/companies/me/integrations' \
-H 'Authorization: Bearer <Cognito JWT>' /v1/companies/me/integrations/{integrationId} Update an outbound integration. Body accepts webhookUrl (must be HTTPS and pass SSRF checks), projectId, events, and enabled. 404 when the integration or project is not in this workspace.
Auth Cognito JWT admin · Growth+
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
integrationId | string | Required | Outbound integration within the workspace. |
Query parameters
None.Everything it needs is in the request body.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Optional | Display name. |
subscribedEvents | enum[] | Optional | Replaces the current subscription list. |
webhookUrl | string | Optional | HTTPS only, re-validated on every change. |
webhookSecret | string | Optional | Replaces the stored secret. |
projectId | string | Optional | Project this belongs to. Must be in the calling workspace. |
enabled | boolean | Optional | Whether the feature is active. |
Request
{
"webhookUrl": "https://hooks.example.com/oprag",
"enabled": false
} Response
200 Success
{
"integration": {
"integrationId": "int_abc123",
"type": "http_webhook",
"projectId": "proj_abc123",
"enabled": false,
"events": ["lead.created"]
}
} Status codes
curl
curl -X PATCH 'https://api.dev.oprag.ai/v1/companies/me/integrations/{integrationId}' \
-H 'Authorization: Bearer <Cognito JWT>' \
-H 'Content-Type: application/json' \
-d '{"webhookUrl": "https://hooks.example.com/oprag","enabled": false}' /v1/companies/me/integrations/{integrationId} Delete an outbound integration.
Auth Cognito JWT admin · Growth+
Before you call it
- The body is
{ deleted: true }.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
integrationId | string | Required | Outbound integration within the workspace. |
Query parameters
None.Acts on the resource named in the path; there is nothing to choose.
Body parameters
None.DELETE requests carry no body.
Response
200 Success
{
"deleted": true
} Status codes
curl
curl -X DELETE 'https://api.dev.oprag.ai/v1/companies/me/integrations/{integrationId}' \
-H 'Authorization: Bearer <Cognito JWT>' /v1/slack/events Slack Events API callback (url_verification, app_mention, DM)
Auth Public — no credential
Path parameters
None.
Query parameters
None.The provider signs and posts the whole payload; nothing is read from the URL.
Body parameters
Defined by the caller.Event callback envelope from the Slack Events API.
Response
Status codes
| Status | Meaning |
|---|---|
| 200 | Success. |
| 400 | The request body failed validation. |
| 429 | Rate limited. See rate limits. |
curl
curl -X POST 'https://api.dev.oprag.ai/v1/slack/events' \
-H 'X-Oprag-Key: sk_live_...' /v1/connectors/{provider}/connect Store an access token for a connector provider so projects can sync from it.
Auth Cognito JWT admin
Before you call it
accessTokenis a GitHub PAT, a Notion integration secret, or a Google OAuth access token, depending on the provider.- Requires the Growth plan or above, and
CONNECTOR_TOKEN_SECRETconfigured on the API.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
provider | string | Required | Connector provider name. |
Query parameters
None.Everything it needs is in the request body.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
accessToken | string | Required | OAuth access token for the provider. Encrypted at rest. |
label | string | Optional | Human-readable label, shown in the dashboard. |
Request
{
"accessToken": "ghp_xxxxxxxx",
"label": "GitHub docs repo"
} Response
200 Success
{
"connectionId": "conn_abc123",
"provider": "github",
"label": "GitHub docs repo",
"status": "active",
"createdAt": "2026-06-28T12:00:00.000Z",
"updatedAt": "2026-06-28T12:00:00.000Z"
} Status codes
curl
curl -X POST 'https://api.dev.oprag.ai/v1/connectors/{provider}/connect' \
-H 'Authorization: Bearer <Cognito JWT>' \
-H 'Content-Type: application/json' \
-d '{"accessToken": "ghp_xxxxxxxx","label": "GitHub docs repo"}' /v1/connectors List workspace connector connections (tokens are never returned)
Auth Cognito JWT admin
Path parameters
None.
Query parameters
None.Scoped by the calling credential, so there is nothing in the URL to narrow.
Body parameters
None.GET requests carry no body.
Response
200 Success
{
"connections": [
{
"connectionId": "conn_abc123",
"provider": "github",
"label": "GitHub docs repo",
"status": "active",
"createdAt": "2026-06-28T12:00:00.000Z",
"updatedAt": "2026-06-28T12:00:00.000Z"
}
]
} Status codes
| Status | Meaning |
|---|---|
| 200 | Success. |
| 401 | Missing or expired JWT. |
| 403 | The signed-in user's role does not allow this. |
| 429 | Rate limited. See rate limits. |
curl
curl -X GET 'https://api.dev.oprag.ai/v1/connectors' \
-H 'Authorization: Bearer <Cognito JWT>' /v1/connectors/{connectionId} Revoke a connector connection (soft status revoked)
Auth Cognito JWT admin
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
connectionId | string | Required | Connector connection within the workspace. |
Query parameters
None.Acts on the resource named in the path; there is nothing to choose.
Body parameters
None.DELETE requests carry no body.
Response
200 Success
{
"connectionId": "conn_abc123",
"provider": "github",
"status": "revoked",
"createdAt": "2026-06-28T12:00:00.000Z",
"updatedAt": "2026-06-28T12:05:00.000Z"
} Status codes
curl
curl -X DELETE 'https://api.dev.oprag.ai/v1/connectors/{connectionId}' \
-H 'Authorization: Bearer <Cognito JWT>' Ready to ship?
Get started free