---
title: "Connect a messaging integration"
method: POST
path: "/messaging/connect"
tags: ["Messaging"]
---

# Connect a messaging integration

`POST /messaging/connect`

## Request

- Base URL: `https://api.xfa.tech`
- URL: `https://api.xfa.tech/messaging/connect`
- Auth: HTTP bearer

## Request body

- object
  - `organization_id` string, required: The ID of the organization to connect
  - `type` 'slack' | 'teams', required: Messaging provider to connect
  - `code` string: The OAuth authorization code from the messaging platform
  - `tenant_id` string: Microsoft tenant ID for Teams
  - `state` string: The OAuth state value returned by the Teams consent flow
  - `redirect_uri` string: The redirect URI used during the OAuth authorization request

## Response `200`

Successfully connected messaging integration

- object
  - `connection_id` string: The ID of the created connection
  - `connection_status` string: Provider-neutral connection status, such as connected or tentative

## Other responses

- `400`: Invalid request
- `403`: Not authorized

---

[API](https://skmtc.dev/xfa/apis/xfa-api.md) · [All operations](https://skmtc.dev/xfa/apis/xfa-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xfa/apis/xfa-api/revisions/1a1be0e8972b?raw)
