> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aitasker.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Link Channel Account

> Link a messaging platform identity to the current user.



## OpenAPI

````yaml /openapi.json post /api/v1/pa/chat/link
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/pa/chat/link:
    post:
      tags:
        - External Chat
      summary: Link Channel Account
      description: Link a messaging platform identity to the current user.
      operationId: link_channel_account_api_v1_pa_chat_link_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkAccountRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelAccountResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    LinkAccountRequest:
      properties:
        platform:
          type: string
          pattern: ^(slack|telegram|discord|teams)$
          title: Platform
        platform_user_id:
          type: string
          maxLength: 255
          minLength: 1
          title: Platform User Id
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Id
      type: object
      required:
        - platform
        - platform_user_id
      title: LinkAccountRequest
    ChannelAccountResponse:
      properties:
        id:
          type: string
          title: Id
        platform:
          type: string
          title: Platform
        platform_user_id:
          type: string
          title: Platform User Id
        platform_display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Platform Display Name
        platform_team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Platform Team Id
        verified:
          type: boolean
          title: Verified
        linked_at:
          type: string
          title: Linked At
      type: object
      required:
        - id
        - platform
        - platform_user_id
        - platform_display_name
        - platform_team_id
        - verified
        - linked_at
      title: ChannelAccountResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````