openapi: 3.1.0
info:
  title: Superconductor API
  version: "1"
  description: >-
    Read the projects, tickets, implementations, and chats you can see in
    Superconductor, create tickets, and send

    messages to implementations and chats.


    Every endpoint returns JSON. Lists return a page of records in `data`; when
    `next_cursor` isn't `null`, pass it

    back as `cursor` to get the next page. Errors return an `error` object with
    a machine-readable `code` and a

    human-readable `message`.
tags:
  - name: Users
    description: The user a personal access token belongs to.
  - name: Chats
    description: List a project's chats, read their conversations, and send them messages.
  - name: Ticket implementations
    description: Read an implementation's status, conversation, and code changes,
      send it messages, and run QA checks on it.
  - name: Tickets
    description: List a project's tickets, and create tickets with attachments.
  - name: Projects
    description: The projects you can access, across all your workspaces.
paths:
  /projects:
    get:
      operationId: Projects_list
      summary: List projects
      description: The projects you can access, newest first.
      parameters:
        - $ref: "#/components/parameters/PageParameters.limit"
        - $ref: "#/components/parameters/PageParameters.cursor"
        - name: workspace_id
          in: query
          required: false
          description: Keep only the projects in this workspace. A workspace you don't
            belong to returns an empty list.
          schema:
            type: string
          explode: false
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - next_cursor
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Project"
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: "null"
                    description: Pass this as `cursor` to get the next page, or `null` on the last
                      page.
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Projects
  /projects/{project_id}/tickets:
    get:
      operationId: Tickets_list
      summary: List tickets
      description: A project's tickets.
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/PageParameters.limit"
        - $ref: "#/components/parameters/PageParameters.cursor"
        - $ref: "#/components/parameters/ActivityListParameters.sort"
        - $ref: "#/components/parameters/ActivityListParameters.since"
        - name: include
          in: query
          required: false
          description: Related records to add to each ticket, separated by commas.
            `implementations` adds its implementations.
          schema:
            type: array
            items:
              type: string
              enum:
                - implementations
            default: []
          explode: false
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - next_cursor
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Ticket"
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: "null"
                    description: Pass this as `cursor` to get the next page, or `null` on the last
                      page.
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Tickets
    post:
      operationId: Tickets_create
      summary: Create a ticket
      description: Create a ticket, attributed to the user the token belongs to, and
        optionally start an implementation.
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "201":
          description: The request has succeeded and a new resource has been created as a
            result.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreatedTicket"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Access is forbidden.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "422":
          description: Client error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Tickets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TicketCreateRequest"
            example:
              ticket:
                title: Retry failed imports
                description: Retry an import up to three times before marking it failed.
                attachments: []
                base_branches:
                  backend: release-2.4
              implementations:
                - profile: default
  /projects/{project_id}/attachment_uploads/presign:
    get:
      operationId: AttachmentUploads_presign
      summary: Get an attachment upload form
      description: Get a form to upload a file to, for attaching to a new ticket.
        Files can be up to 100 MB.
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: filename
          in: query
          required: true
          description: The file's name, including its extension.
          schema:
            type: string
            minLength: 1
          explode: false
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AttachmentUpload"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Access is forbidden.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Tickets
  /ticket_implementations/{id}:
    get:
      operationId: TicketImplementations_show
      summary: Get a ticket implementation
      description: An implementation's status, agent, ticket, and pull requests.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TicketImplementation"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Ticket implementations
  /ticket_implementations/{id}/messages:
    get:
      operationId: TicketImplementations_messages
      summary: List a ticket implementation's messages
      description: An implementation's conversation, in order.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/PageParameters.limit"
        - $ref: "#/components/parameters/PageParameters.cursor"
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - next_cursor
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Message"
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: "null"
                    description: Pass this as `cursor` to get the next page, or `null` on the last
                      page.
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Ticket implementations
    post:
      operationId: TicketImplementations_createMessage
      summary: Send a message to a ticket implementation
      description: >-
        Post a message to an implementation's conversation as the user the token
        belongs to. Its coding agent picks the

        message up and responds, as it would to a message sent in
        Superconductor.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "201":
          description: The request has succeeded and a new resource has been created as a
            result.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Message"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Access is forbidden.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Ticket implementations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageCreateRequest"
  /ticket_implementations/{id}/diff:
    get:
      operationId: TicketImplementations_diff
      summary: Get a ticket implementation's diff
      description: An implementation's latest code changes, one git diff per repository.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Diff"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Ticket implementations
  /ticket_implementations/{id}/qa_checks:
    get:
      operationId: TicketImplementations_qaChecks
      summary: List a ticket implementation's QA checks
      description: An implementation's QA checks, newest first.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/PageParameters.limit"
        - $ref: "#/components/parameters/PageParameters.cursor"
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - next_cursor
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/QACheck"
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: "null"
                    description: Pass this as `cursor` to get the next page, or `null` on the last
                      page.
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Ticket implementations
    post:
      operationId: TicketImplementations_createQACheck
      summary: Run a QA check on a ticket implementation
      description: >-
        Start a QA check of an implementation's latest code changes, as the user
        the token belongs to, or the user a coding

        agent works for. That user must be an owner, admin, or collaborator in
        the workspace. It runs with the project's

        default QA check agent; poll `GET /qa_checks/{id}` for its report.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "201":
          description: The request has succeeded and a new resource has been created as a
            result.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/QACheck"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Access is forbidden.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "422":
          description: Client error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Ticket implementations
  /qa_checks/{id}:
    get:
      operationId: QAChecks_show
      summary: Get a QA check
      description: A QA check's status and, once it finishes, its report.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/QACheck"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Ticket implementations
  /projects/{project_id}/chats:
    get:
      operationId: ProjectChats_list
      summary: List chats
      description: A project's chats.
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/PageParameters.limit"
        - $ref: "#/components/parameters/PageParameters.cursor"
        - $ref: "#/components/parameters/ActivityListParameters.sort"
        - $ref: "#/components/parameters/ActivityListParameters.since"
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - next_cursor
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Chat"
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: "null"
                    description: Pass this as `cursor` to get the next page, or `null` on the last
                      page.
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Chats
  /chats/{id}:
    get:
      operationId: Chats_show
      summary: Get a chat
      description: A chat's details.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Chat"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Chats
  /chats/{id}/messages:
    get:
      operationId: Chats_messages
      summary: List a chat's messages
      description: A chat's conversation, in order.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/PageParameters.limit"
        - $ref: "#/components/parameters/PageParameters.cursor"
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - next_cursor
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Message"
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: "null"
                    description: Pass this as `cursor` to get the next page, or `null` on the last
                      page.
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Chats
    post:
      operationId: Chats_createMessage
      summary: Send a message to a chat
      description: >-
        Post a message to a chat's conversation as the user the token belongs
        to. Its coding agent picks the message up

        and responds, as it would to a message sent in Superconductor.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "201":
          description: The request has succeeded and a new resource has been created as a
            result.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Message"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "403":
          description: Access is forbidden.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Chats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MessageCreateRequest"
  /user:
    get:
      operationId: Users_show
      summary: Get the current user
      description: The user who owns the personal access token.
      parameters: []
      responses:
        "200":
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        "400":
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Access is unauthorized.
          headers:
            WWW-Authenticate:
              required: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      tags:
        - Users
security:
  - PersonalAccessToken: []
components:
  parameters:
    ActivityListParameters.since:
      name: since
      in: query
      required: false
      description: Keep only records active at or after this time, such as
        `2026-10-30T19:00:00Z`.
      schema:
        type: string
        format: date-time
      explode: false
    ActivityListParameters.sort:
      name: sort
      in: query
      required: false
      description: "`created` lists the newest first; `last_activity` lists the most
        recently active first."
      schema:
        type: string
        enum:
          - created
          - last_activity
        default: created
      explode: false
    PageParameters.cursor:
      name: cursor
      in: query
      required: false
      description: The `next_cursor` of the previous page.
      schema:
        type: string
      explode: false
    PageParameters.limit:
      name: limit
      in: query
      required: false
      description: How many records to return.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 1000
        default: 100
      explode: false
  schemas:
    AttachmentUpload:
      type: object
      required:
        - upload_id
        - url
        - fields
      properties:
        upload_id:
          type: string
          description: Pass this in the ticket's `attachments` once the file is uploaded.
            It expires after a day.
        url:
          type: string
          format: uri
          description: POST the file here as `multipart/form-data`.
        fields:
          type: object
          additionalProperties:
            type: string
          description: Send these form fields before the `file` field.
    BranchName:
      type: string
      minLength: 1
    Chat:
      type: object
      required:
        - id
        - url
        - title
        - status
        - profile_name
        - model
        - created_at
        - last_activity_at
        - creator
      properties:
        id:
          type: string
        url:
          type: string
          format: uri
        title:
          anyOf:
            - type: string
            - type: "null"
        status:
          type: string
          description: Such as `idle`, `running`, `pending_user`, or `failed`.
        profile_name:
          anyOf:
            - type: string
            - type: "null"
          description: The coding agent in the chat.
        model:
          anyOf:
            - type: string
            - type: "null"
        created_at:
          type: string
          format: date-time
        last_activity_at:
          type: string
          format: date-time
        creator:
          anyOf:
            - $ref: "#/components/schemas/Creator"
            - type: "null"
    CreatedTicket:
      type: object
      required:
        - id
        - friendly_id
        - url
        - title
        - status
        - implementation_launches
      properties:
        id:
          type: string
        friendly_id:
          type: string
          description: The ticket's number within its project.
        url:
          type: string
          format: uri
        title:
          anyOf:
            - type: string
            - type: "null"
        status:
          type: string
          description: Such as `idle`, `running`, `pending_user`, `failed`, or `completed`.
        implementation_launches:
          type: array
          items:
            $ref: "#/components/schemas/ImplementationLaunch"
    Creator:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          description: "`user`, or the kind of record that created it, such as
            `automation_run` or `ticket_implementation`."
        id:
          anyOf:
            - type: string
            - type: "null"
        name:
          anyOf:
            - type: string
            - type: "null"
          description: Only for users.
        email:
          type: string
          description: Only for users.
      description: "Who created a record: a user, or a non-user creator such as an
        automation run or another implementation."
    Diff:
      type: object
      required:
        - repositories
      properties:
        repositories:
          type: array
          items:
            $ref: "#/components/schemas/RepositoryDiff"
          description: One entry per repository, by name.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          $ref: "#/components/schemas/ErrorBody"
    ErrorBody:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Such as `invalid_parameter`, `unauthorized`, `forbidden`,
            `not_found`, or `invalid_ticket`.
        message:
          type: string
        details:
          type: array
          items:
            $ref: "#/components/schemas/ErrorDetail"
          description: For `invalid_parameter`, each invalid value in the request.
    ErrorDetail:
      type: object
      required:
        - pointer
        - message
      properties:
        pointer:
          type: string
          description: A JSON pointer to the invalid value, such as `/ticket/attachments`
            or `/limit`.
        message:
          type: string
    ImplementationLaunch:
      type: object
      required:
        - profile
      properties:
        profile:
          type: string
        launch_error:
          type: string
          description: Why the implementation couldn't start.
    ImplementationRequest:
      type: object
      required:
        - profile
      properties:
        profile:
          type: string
          enum:
            - default
          description: Only `default`, the default coding agent of the user the ticket is
            created for, for now.
    Message:
      type: object
      required:
        - id
        - url
        - created_at
        - author
        - text
      properties:
        id:
          type: string
        url:
          type: string
          format: uri
          description: Opens the message in its implementation's or chat's conversation.
        created_at:
          type: string
          format: date-time
        author:
          $ref: "#/components/schemas/MessageAuthor"
        text:
          anyOf:
            - type: string
            - type: "null"
    MessageAttributes:
      type: object
      required:
        - text
      properties:
        text:
          type: string
          pattern: \S
          description: The message, in Markdown.
    MessageAuthor:
      type: object
      required:
        - type
        - name
      properties:
        type:
          type: string
          description: "`user`, `coding_agent`, or `agent` for Superconductor's other
            agents."
        name:
          anyOf:
            - type: string
            - type: "null"
        id:
          anyOf:
            - type: string
            - type: "null"
          description: Only for users; `null` when the user no longer exists.
        email:
          anyOf:
            - type: string
            - type: "null"
          description: Only for users; `null` when the user no longer exists.
    MessageCreateRequest:
      type: object
      required:
        - message
      properties:
        message:
          $ref: "#/components/schemas/MessageAttributes"
    Project:
      type: object
      required:
        - id
        - name
        - url
        - created_at
        - workspace
      properties:
        id:
          type: string
        name:
          anyOf:
            - type: string
            - type: "null"
        url:
          type: string
          format: uri
        created_at:
          type: string
          format: date-time
        workspace:
          $ref: "#/components/schemas/Workspace"
    PullRequest:
      type: object
      required:
        - id
        - number
        - url
        - status
        - provider
        - created_at
        - last_pushed_at
      properties:
        id:
          type: string
        number:
          type: integer
          format: int32
        url:
          type: string
          format: uri
        status:
          type: string
          description: "`open`, `closed`, `merged`, or `draft`."
        provider:
          type: string
          description: "`github`."
        created_at:
          type: string
          format: date-time
        last_pushed_at:
          type: string
          format: date-time
    QACheck:
      type: object
      required:
        - id
        - url
        - status
        - created_at
        - overall_score
        - complete
        - report
      properties:
        id:
          type: string
        url:
          type: string
          format: uri
          description: Opens the QA check on its implementation's page.
        status:
          type: string
          description: "`idle` or `running` until the check finishes, then `pending_user`
            with a `report`, or `failed`."
        created_at:
          type: string
          format: date-time
        overall_score:
          anyOf:
            - type: number
              format: double
            - type: "null"
          description: The average of the check's feature, code quality, and tests scores,
            from 0 to 5.
        complete:
          anyOf:
            - type: boolean
            - type: "null"
          description: Whether the check found that the implementation meets the ticket's
            requirements.
        report:
          anyOf:
            - type: object
              additionalProperties: {}
            - type: "null"
          description: >-
            The QA agent's findings, such as `summary`, `feature_score`,
            `feature_notes`, `code_quality_score`,

            `tests_quality_score`, and `improvements_needed`, or `null` until
            the check finishes. The agent writes it, so its

            fields can change.
    RepositoryDiff:
      type: object
      required:
        - name
        - merge_base
        - diff
        - error
      properties:
        name:
          type: string
        merge_base:
          anyOf:
            - type: string
            - type: "null"
        diff:
          anyOf:
            - type: string
            - type: "null"
          description: A git diff, or `null` when the agent couldn't produce one.
        error:
          anyOf:
            - type: string
            - type: "null"
          description: Why there's no diff.
    Ticket:
      type: object
      required:
        - id
        - friendly_id
        - url
        - title
        - status
        - description
        - created_at
        - last_activity_at
        - creator
      properties:
        id:
          type: string
        friendly_id:
          type: string
          description: The ticket's number within its project.
        url:
          type: string
          format: uri
        title:
          anyOf:
            - type: string
            - type: "null"
        status:
          type: string
          description: Such as `idle`, `running`, `pending_user`, `failed`, or `completed`.
        description:
          anyOf:
            - type: string
            - type: "null"
        created_at:
          type: string
          format: date-time
        last_activity_at:
          type: string
          format: date-time
          description: The latest change to the ticket or any of its implementations.
        creator:
          anyOf:
            - $ref: "#/components/schemas/Creator"
            - type: "null"
        implementations:
          type: array
          items:
            $ref: "#/components/schemas/TicketImplementationSummary"
          description: Only with `include=implementations`.
    TicketAttributes:
      type: object
      properties:
        title:
          type: string
          description: Leave it out to have Superconductor write one from the description.
        description:
          type: string
          description: What the ticket should accomplish, in Markdown. A ticket needs a
            description or an attachment.
        attachments:
          type: array
          items:
            type: string
          maxItems: 10
          description: Upload ids from `GET
            /projects/{project_id}/attachment_uploads/presign`, after uploading
            each file.
          default: []
        base_branches:
          type: object
          additionalProperties:
            $ref: "#/components/schemas/BranchName"
          description: >-
            The branch to start from in each repository, keyed by repository
            name, such as `{ "api": "release-2.4" }`.

            Each branch must already exist. Repositories you leave out start
            from their default branch.
          default: {}
    TicketCreateRequest:
      type: object
      required:
        - ticket
      properties:
        ticket:
          $ref: "#/components/schemas/TicketAttributes"
        implementations:
          type: array
          items:
            $ref: "#/components/schemas/ImplementationRequest"
          maxItems: 1
          description: Implementations to start right away. Without one, the ticket waits
            for someone to start it.
          default: []
    TicketImplementation:
      type: object
      required:
        - id
        - friendly_id
        - url
        - status
        - created_at
        - creator
        - pull_requests
        - profile_name
        - model
        - ticket
      properties:
        id:
          type: string
        friendly_id:
          type: string
        url:
          type: string
          format: uri
        status:
          type: string
          description: Such as `idle`, `running`, `pending_user`, or `failed`.
        created_at:
          type: string
          format: date-time
        creator:
          anyOf:
            - $ref: "#/components/schemas/Creator"
            - type: "null"
        pull_requests:
          type: array
          items:
            $ref: "#/components/schemas/PullRequest"
        profile_name:
          anyOf:
            - type: string
            - type: "null"
          description: The coding agent working on it.
        model:
          anyOf:
            - type: string
            - type: "null"
        ticket:
          $ref: "#/components/schemas/TicketSummary"
    TicketImplementationSummary:
      type: object
      required:
        - id
        - friendly_id
        - url
        - status
        - created_at
        - creator
        - pull_requests
      properties:
        id:
          type: string
        friendly_id:
          type: string
        url:
          type: string
          format: uri
        status:
          type: string
          description: Such as `idle`, `running`, `pending_user`, or `failed`.
        created_at:
          type: string
          format: date-time
        creator:
          anyOf:
            - $ref: "#/components/schemas/Creator"
            - type: "null"
        pull_requests:
          type: array
          items:
            $ref: "#/components/schemas/PullRequest"
    TicketSummary:
      type: object
      required:
        - id
        - friendly_id
        - url
        - title
        - status
      properties:
        id:
          type: string
        friendly_id:
          type: string
          description: The ticket's number within its project.
        url:
          type: string
          format: uri
        title:
          anyOf:
            - type: string
            - type: "null"
        status:
          type: string
          description: Such as `idle`, `running`, `pending_user`, `failed`, or `completed`.
    User:
      type: object
      required:
        - id
        - name
        - email
      properties:
        id:
          type: string
        name:
          anyOf:
            - type: string
            - type: "null"
        email:
          type: string
    Workspace:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
        name:
          type: string
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: Bearer
      description: A personal access token, created under Account Settings → Developer
        → Personal access tokens.
servers:
  - url: https://www.superconductor.com/api/v1
    description: Superconductor
    variables: {}
