---
title: "Attach an agent to an integration conversation"
method: POST
path: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/subscriptions"
tags: ["Integrations"]
---

# Attach an agent to an integration conversation

`POST /orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/subscriptions`

## Request

- Base URL: `https://api.omnara.com/v1`
- URL: `https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/subscriptions`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-omnara_session` and API key in header `X-Omnara-Csrf`

Requires project management permission. Repeating an active attachment returns the same subscription. Subscriptions do not change the agent config or grant sending tools.

## Path parameters

- `orgID` string, required
- `projectID` string, required: Project ID (proj_...).
- `integrationID` string, required

## Request body

- CreateIntegrationSubscriptionRequest
  - `agent_id` string, required
  - `conversation` IntegrationConversation, required: One concrete provider address, validated by the integration's capabilities.subscription.conversation_schema. Slack uses channel_id and optional thread_ts; Discord uses channel_id for a channel or thread_id for a thread; GitHub uses repository_id and pull_request. Discord accepts optional parent channel_id and guild_id alongside thread_id and validates their ID format, but subscription creation does not verify them against Discord or retain them as routing restrictions. Only thread_id is retained in a canonical thread address and returned by create/list responses. No credentials or runtime state.

## Response `201`

Created or existing subscription.

- IntegrationSubscription
  - `id` string, required
  - `project_id` string, required: Project ID (proj_...).
  - `integration_id` string, required
  - `agent_id` string, required
  - `agent_name` string, required: Agent name. Empty means the agent is unnamed; non-empty values use the ResourceName policy.
  - `conversation` IntegrationConversation, required: One concrete provider address, validated by the integration's capabilities.subscription.conversation_schema. Slack uses channel_id and optional thread_ts; Discord uses channel_id for a channel or thread_id for a thread; GitHub uses repository_id and pull_request. Discord accepts optional parent channel_id and guild_id alongside thread_id and validates their ID format, but subscription creation does not verify them against Discord or retain them as routing restrictions. Only thread_id is retained in a canonical thread address and returned by create/list responses. No credentials or runtime state.
  - `conversation_name` string: Saved display name for the conversation, when available.
  - `created_at` string, date-time, required

## Other responses

- `400`: The request was invalid.
- `401`: Authentication is required or invalid.
- `403`: The authenticated principal is not authorized.
- `404`: The requested resource was not found or is not visible.
- `409`: The request conflicts with current resource state or idempotency history.
- `4XX`: Any other client error. The body carries the shared Error envelope restricted to client error codes; statuses with a dedicated response above are documented precisely.
- `5XX`: Any other server error. The body carries the shared Error envelope restricted to server error codes.

## Changes

- **2026-10-07** `680248a0ba72`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnara/apis/omnara-api-2/changes/orgs/:orgID/projects/:projectID/integrations/:integrationID/subscriptions/post.md)

---

[API](https://skmtc.dev/omnara/apis/omnara-api-2.md) - [All operations](https://skmtc.dev/omnara/apis/omnara-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/omnara/apis/omnara-api-2/revisions/343aebb1dff1?raw)
