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

# Create a new issue

> Creates a new issue and optionally starts an automated investigation. The issue is created from the provided details, with a seed generated internally. Investigation runs asynchronously - poll GET /issues/{id} to check status.



## OpenAPI

````yaml /assets/openapi.mintlify.json post /issues
openapi: 3.0.0
info:
  title: Antimetal External API
  description: >-
    Public-facing API for external integrations with Antimetal. Provides
    programmatic access to issue investigation, results, artifacts, and chat
    functionality.
  version: '2026-03-17'
  contact: {}
servers:
  - url: https://bff.antimetal.com/api/v2
    description: Production API
  - url: https://bff.dev.antimetal.com/api/v2
    description: Dev API
security:
  - bearer: []
tags: []
paths:
  /issues:
    post:
      tags:
        - Issues
      summary: Create a new issue
      description: >-
        Creates a new issue and optionally starts an automated investigation.
        The issue is created from the provided details, with a seed generated
        internally. Investigation runs asynchronously - poll GET /issues/{id} to
        check status.
      operationId: createIssue
      parameters:
        - $ref: '#/components/parameters/AntimetalVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateIssueDto'
      responses:
        '201':
          description: Issue created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateIssueResponseDto'
        '400':
          description: Validation error or bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '403':
          description: Insufficient permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Antimetal from '@antimetal/sdk';

            const client = new Antimetal({
              apiKey: process.env['ANTIMETAL_API_KEY'], // This is the default and can be omitted
            });

            const issue = await client.issues.create({
              description: 'x',
              environment: 'x',
              title: 'x',
            });

            console.log(issue.uuid);
components:
  parameters:
    AntimetalVersion:
      name: Antimetal-Version
      in: header
      required: false
      description: >-
        The API version to use. Defaults to the latest stable version if
        omitted. Pin to the version string in this document's `info.version`
        field to opt into exactly this version's schema.
      schema:
        type: string
        example: '2026-03-17'
        default: '2026-03-17'
  schemas:
    CreateIssueDto:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 500
          description: Issue title (human-readable summary)
        description:
          type: string
          minLength: 1
          description: Detailed description of the issue
        environment:
          type: string
          minLength: 1
          description: Environment where the issue occurred (e.g., production, staging)
        severity:
          description: Issue severity level (defaults to MEDIUM if not specified)
          type: string
          enum:
            - low
            - medium
            - high
        triggeredAt:
          description: >-
            ISO 8601 timestamp when the issue was triggered (defaults to current
            time)
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        context:
          description: Additional context metadata for enriching the investigation
          type: object
          properties:
            alertUrl:
              description: >-
                URL to the alert or incident in the source system (e.g.,
                Datadog, Sentry)
              type: string
              format: uri
            service:
              description: Service or application name where the issue occurred
              type: string
            traceId:
              description: Distributed trace ID for correlation
              type: string
            spanId:
              description: Span ID within the trace
              type: string
            errorType:
              description: >-
                Error classification or exception type (e.g., 'TimeoutError',
                'DatabaseConnectionError')
              type: string
            errorMessage:
              description: Error message or stack trace excerpt
              type: string
            host:
              description: Hostname or instance ID where the issue occurred
              type: string
            region:
              description: Cloud region or availability zone
              type: string
            version:
              description: Application version or deployment identifier
              type: string
            tags:
              description: >-
                Arbitrary tags for categorization (e.g., ['payment',
                'critical'])
              type: array
              items:
                type: string
            metadata:
              description: Additional provider-specific or custom metadata
              type: object
              additionalProperties: {}
      required:
        - title
        - description
        - environment
    CreateIssueResponseDto:
      type: object
      properties:
        uuid:
          type: string
          description: Issue unique identifier
        number:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 9007199254740991
          description: Issue number (scoped per-organization)
        status:
          type: string
          enum:
            - investigating
            - ready_to_fix
            - resolved
            - muted
          description: Current issue status
        title:
          type: string
          description: Issue title
        description:
          type: string
          description: Issue description
        environment:
          description: Environment where issue occurred
          type: string
        severity:
          type: string
          enum:
            - low
            - medium
            - high
          description: Issue severity level
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Date and time the issue was created
        updatedAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Date and time the issue was last updated
        triggeredAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: Timestamp when the issue was triggered
        latestVersion:
          type: integer
          minimum: 1
          maximum: 9007199254740991
          description: Most recent version of this issue
      required:
        - uuid
        - number
        - status
        - title
        - description
        - severity
        - createdAt
        - updatedAt
        - triggeredAt
        - latestVersion
    ErrorResponseDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - api_error
            - invalid_request_error
            - authentication_error
          description: Error type classification
        message:
          type: string
          description: Human-readable error message
        request_id:
          type: string
          description: Request correlation ID for tracing and support
        details:
          description: Detailed field-level validation errors (for 400/422 responses)
          type: object
          additionalProperties:
            type: string
      required:
        - type
        - message
        - request_id
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: API key authentication via Bearer token

````