> ## 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.

# Create a new GitHub issue and attach it to a conversation

Creates a new GitHub issue with the provided details and automatically attaches it to the specified conversation. The issue is created in the specified repository. A comment is added to the issue with a link to the related conversation in Fernand.


## OpenAPI

````yaml https://api.getfernand.com/openapi.json post /integrations/github/{conversation_id}/tickets
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:
    post:
      tags:
        - GitHub Integration
      summary: Create a new GitHub issue and attach it to a conversation
      description: >-
        Creates a new GitHub issue with the provided details and automatically
        attaches it to the specified conversation. The issue is created in the
        specified repository. A comment is added to the issue with a link to the
        related conversation in Fernand.
      operationId: createGithubTicket
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: integer
          description: ID of the conversation to attach the issue to.
          example: 12345
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: Title of the GitHub issue (required, max 250 characters).
                  example: Fix login authentication bug
                description:
                  type: string
                  description: >-
                    Description/body of the issue (optional, max 250,000
                    characters).
                  example: >-
                    Users are unable to log in with their credentials. The
                    authentication service returns a 500 error.
                repository:
                  type: string
                  description: ID of the repository to create the issue in (required).
                  example: R_kgDOABCDEF
                assignee:
                  type: string
                  description: ID of the user to assign the issue to (optional).
                  example: U_kgDOABCDEF
                milestone:
                  type: string
                  description: ID of the milestone to associate the issue with (optional).
                  example: M_kwDOABCDEF
                type:
                  type: string
                  description: ID of the issue type (optional).
                  example: IT_kwDOABCDEF
                labels:
                  type: array
                  description: Array of label IDs to apply to the issue (optional).
                  items:
                    type: string
                  example:
                    - LA_kwDOABCDEF
                    - LA_kwDOXYZ123
                projects:
                  type: array
                  description: Array of project IDs to add the issue to (optional).
                  items:
                    type: string
                  example:
                    - PVT_kwDOABCDEF
              required:
                - title
                - repository
      responses:
        '200':
          description: GitHub issue created and attached successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier of the created 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 authentication 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 (null for newly created
                      issues).
                    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 for
                      open issues).
                    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
        '400':
          description: Invalid input or error creating issue at GitHub.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Github response errors: Invalid repository ID'
        '404':
          description: GitHub integration or conversation not found.
        '502':
          description: Error occurred at GitHub while creating the issue.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: An error occured 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

````