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

# Hand the issue off to the team's coding agent

> Opens a GitHub or Linear issue for it through one of the organization's handoff destinations, as an alert's handoff would (the destination must be on; its daily cap counts), audited as issue.handoff. Once per destination: handing it off again answers the handoff made before. From a console session only. Send `Content-Type: application/json`.



## OpenAPI

````yaml /api-reference/openapi.json post /projects/{projectId}/issues/{issueId}/handoff
openapi: 3.1.0
info:
  title: Apsio API
  version: 0.1.0
  description: >-
    Read API v0: your projects, release health and comparisons, missing symbols,
    issues, sessions, vitals, cohort comparisons, performance (app start,
    screens, hangs, MetricKit) and network endpoints and traces for one project.
    Authenticate with a project token as a bearer token, with an OAuth access
    token from Apsio's authorization server (MCP clients), or, from the console,
    with the session cookie of a member of the project's organization.
servers:
  - url: https://api.apsio.io/v1
security: []
paths:
  /projects/{projectId}/issues/{issueId}/handoff:
    post:
      summary: Hand the issue off to the team's coding agent
      description: >-
        Opens a GitHub or Linear issue for it through one of the organization's
        handoff destinations, as an alert's handoff would (the destination must
        be on; its daily cap counts), audited as issue.handoff. Once per
        destination: handing it off again answers the handoff made before. From
        a console session only. Send `Content-Type: application/json`.
      parameters:
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a101
          required: true
          name: projectId
          in: path
        - schema:
            type: string
            pattern: ^[A-Za-z0-9._:-]{1,128}$
            description: The issue id.
          required: true
          description: The issue id.
          name: issueId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                destination_id:
                  type: string
                  pattern: >-
                    ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
              required:
                - destination_id
              additionalProperties: false
      responses:
        '200':
          description: The handoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueHandoff'
        '400':
          description: The request is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No valid bearer token or console session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not from a console session, or the sandbox.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such project, destination or issue with occurrences left.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The destination is off or disconnected, or the project reached its
            daily cap.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: The body is not JSON.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Over a rate limit (the caller's, the client address's, or the
            plan's); Retry-After says when to retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Handoffs are not available here, or the provider did not answer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
        - session: []
components:
  schemas:
    IssueHandoff:
      type: object
      properties:
        id:
          type: string
        destination_id:
          type: string
        provider:
          type: string
          enum:
            - github
            - linear
        state:
          type: string
          enum:
            - claimed
            - opened
            - failed
          description: 'claimed: being opened; opened; failed (`error_code`).'
        ref:
          type:
            - string
            - 'null'
          description: 'What people call it: `#12`, `ENG-12`.'
        url:
          type:
            - string
            - 'null'
        error_code:
          type:
            - string
            - 'null'
        rule_id:
          type:
            - string
            - 'null'
          description: The alert rule that handed it off; null from the issue page.
        created_by:
          type:
            - string
            - 'null'
        created_at:
          type: string
          description: RFC 3339 time in UTC with up to nanosecond precision.
          example: '2026-10-04T10:15:00.431000000Z'
        opened_at:
          type:
            - string
            - 'null'
          description: RFC 3339 time in UTC with up to nanosecond precision.
          example: '2026-10-04T10:15:00.431000000Z'
        pull_request:
          $ref: '#/components/schemas/HandoffPullRequest'
      required:
        - id
        - destination_id
        - provider
        - state
        - ref
        - url
        - error_code
        - rule_id
        - created_by
        - created_at
        - opened_at
        - pull_request
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
    HandoffPullRequest:
      type:
        - object
        - 'null'
      properties:
        number:
          type: integer
        url:
          type: string
        state:
          type: string
          enum:
            - draft
            - in_review
            - merged
            - closed
      required:
        - number
        - url
        - state
      description: >-
        GitHub: the pull request of the same repository that references the
        issue last, from its timeline (refreshed at most every 10 minutes); null
        when none, and for Linear.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        A project token (apsio_pt_v0...), which reads exactly one project, or an
        OAuth access token issued for the API, which reads what its user can.
        Access tokens issued for Apsio's MCP server are accepted only from the
        MCP server itself.
    session:
      type: apiKey
      in: cookie
      name: apsio_session
      description: >-
        The console session, set by /v1/auth/callback (`__Host-apsio_session`
        when host-only).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.