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

# Merge issues into this one

> Merges up to 50 issues into this one (D102): their fingerprints, and the ones already merged into them, become this issue's, which keeps its id, state and assignee; their own states are dropped. Any id of an issue names it, a merged-away fingerprint included. No occurrence is rewritten: every read maps fingerprints to issues, and unmerge gives one back. Same callers as state changes (issues:write), audited as issue.merge. Send `Content-Type: application/json`.



## OpenAPI

````yaml /api-reference/openapi.json post /projects/{projectId}/issues/{issueId}/merge
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}/merge:
    post:
      summary: Merge issues into this one
      description: >-
        Merges up to 50 issues into this one (D102): their fingerprints, and the
        ones already merged into them, become this issue's, which keeps its id,
        state and assignee; their own states are dropped. Any id of an issue
        names it, a merged-away fingerprint included. No occurrence is
        rewritten: every read maps fingerprints to issues, and unmerge gives one
        back. Same callers as state changes (issues:write), audited as
        issue.merge. 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 fingerprint.
          required: true
          description: The issue fingerprint.
          name: issueId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                issue_ids:
                  type: array
                  items:
                    type: string
                    pattern: ^[A-Za-z0-9._:-]{1,128}$
                  minItems: 1
                  maxItems: 50
              required:
                - issue_ids
              additionalProperties: false
      responses:
        '200':
          description: The issue now.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueMerge'
        '400':
          description: 'Not valid: an issue id, or no other issue to merge.'
          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 allowed: the sandbox, a project token without the issues:write
            scope, or an agent without its issues:write grant (grant_required,
            grant_expired, with grant_url).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WriteRefusal'
        '404':
          description: No such project, or an issue it has not seen.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Past the caps: an issue owns at most 100 fingerprints, a project at
            most 2,000 merged ones.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: The body is not JSON.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Resolving in a release of an app that is not in this project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too many changes; try again shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Merging issues is not available here.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
        - session: []
components:
  schemas:
    IssueMerge:
      type: object
      properties:
        id:
          type: string
          description: 'The issue: the one merged into, its id unchanged.'
        fingerprints:
          type: array
          items:
            type: string
          description: >-
            The issue's fingerprints now: its id first, then the ones merged
            into it.
        merged:
          type: array
          items:
            type: string
          description: The issues merged into it.
        states_dropped:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              status:
                type: string
            required:
              - id
              - status
          description: 'The merged issues'' states, dropped: the target''s state wins.'
      required:
        - id
        - fingerprints
        - merged
        - states_dropped
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
    WriteRefusal:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: grant_required
            message:
              type: string
            grant_url:
              type: string
              description: >-
                grant_required and grant_expired for an OAuth client: the
                console page (Agents > Agent access) where the user gives this
                client the capability.
          required:
            - code
            - message
      required:
        - error
  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.