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

# Attach a GitHub issue to a conversation

Attaches an existing GitHub issue to the specified conversation. The issue must exist in one of the repositories that the GitHub integration has access to. A comment is added to the issue with a link to the related conversation in Fernand. Returns a 404 error if the issue cannot be found.


## OpenAPI

````yaml https://api.getfernand.com/openapi.json put /integrations/github/{conversation_id}/tickets/{ticket_id}
openapi: 3.0.3
info:
  title: Fernand API Documentation
  version: '3.0'
  description: This is the documentation for the [Fernand](https://getfernand.com) API.
  termsOfService: https://getfernand.com/terms
  contact:
    name: Fernand Support
    url: https://getfernand.com
    email: support@getfernand.com
  x-logo:
    url: https://app.getfernand.com/images/favicon/icon_128.png
servers:
  - url: https://api.getfernand.com
    description: ''
    x-last-modified: 1764750693905
security:
  - apiKeyHeader: []
externalDocs:
  description: You can access our documentation online by visiting https://api.fernand.help
  url: https://api.fernand.help
paths:
  /integrations/github/{conversation_id}/tickets/{ticket_id}:
    put:
      tags:
        - GitHub Integration
      summary: Attach a GitHub issue to a conversation
      description: >-
        Attaches an existing GitHub issue to the specified conversation. The
        issue must exist in one of the repositories that the GitHub integration
        has access to. A comment is added to the issue with a link to the
        related conversation in Fernand. Returns a 404 error if the issue cannot
        be found.
      operationId: attachGithubTicket
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: integer
          description: ID of the conversation to attach the issue to.
          example: 12345
        - name: ticket_id
          in: path
          required: true
          schema:
            type: string
          description: ID of the GitHub issue to attach.
          example: I_kwDOABCDEF
      responses:
        '200':
          description: GitHub issue attached successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier of the GitHub issue.
                    example: I_kwDOABCDEF
                  number:
                    type: integer
                    description: Issue number within the repository.
                    example: 42
                  title:
                    type: string
                    description: Title of the issue.
                    example: Fix login bug
                  url:
                    type: string
                    description: URL to view the issue on GitHub.
                    example: https://github.com/piedpiper/www/issues/42
                  state_reason:
                    type: string
                    description: >-
                      Reason for the current state (COMPLETED, NOT_PLANNED,
                      REOPENED, or null if open).
                    example: null
                  updated_at:
                    type: string
                    description: ISO 8601 timestamp of last update.
                    example: '2024-01-15T10:30:00Z'
                  closed_at:
                    type: string
                    description: >-
                      ISO 8601 timestamp when the issue was closed (null if
                      open).
                    example: null
                  assignee:
                    type: object
                    description: Assigned user (null if unassigned).
                    properties:
                      id:
                        type: string
                        description: Unique identifier of the assignee.
                        example: U_kgDOABCDEF
                      login:
                        type: string
                        description: GitHub username of the assignee.
                        example: richard.hendricks
                      name:
                        type: string
                        description: Display name of the assignee.
                        example: Richard H.
                      avatar_url:
                        type: string
                        description: URL to the assignee's avatar image.
                        example: https://avatars.githubusercontent.com/u/123456
                  labels:
                    type: array
                    description: List of labels applied to the issue.
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier of the label.
                          example: LA_kwDOABCDEF
                        name:
                          type: string
                          description: Name of the label.
                          example: bug
                        color:
                          type: string
                          description: Color hex code of the label.
                          example: d73a4a
                  type:
                    type: object
                    description: Issue type (null if no type is set).
                    properties:
                      id:
                        type: string
                        description: Unique identifier of the issue type.
                        example: IT_kwDOABCDEF
                      name:
                        type: string
                        description: Name of the issue type.
                        example: Bug
                      color:
                        type: string
                        description: Color hex code of the issue type.
                        example: d73a4a
        '404':
          description: GitHub integration, conversation, or issue not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unable to find the given ticket at Github
components:
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      description: >-
        Authenticate your account by including your secret key in API requests.

        You can manage your API keys in the
        [Dashboard](https://app.getfernand.com/).


        Authentication to the API is performed by using the HTTP Header
        X-API-Key.
      name: X-API-Key
      in: header
      x-last-modified: 1764750344730

````