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

# Create Incident



## OpenAPI

````yaml api-reference/openapi.json post /incidents
openapi: 3.1.0
info:
  title: Cachet
  version: 0.0.1
  description: >-
    API documentation for Cachet, the open-source, self-hosted status page
    system.
servers:
  - url: http://localhost/api
  - url: https://v3.cachethq.io/api
    description: The Cachet v3 demo server.
security:
  - http: []
tags:
  - name: Cachet
  - name: Components
  - name: Component Groups
  - name: Incidents
  - name: Incident Updates
  - name: Incident Templates
  - name: Metrics
  - name: Metric Points
  - name: Schedules
  - name: Schedule Updates
paths:
  /incidents:
    post:
      tags:
        - Incidents
      summary: Create Incident
      operationId: cachet.api.incidents.store
      requestBody:
        description: '`CreateIncidentRequestData`'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateIncidentRequestData'
      responses:
        '200':
          description: '`Incident`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Incident'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/MissingAbilityException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    CreateIncidentRequestData:
      type: object
      properties:
        name:
          type: string
          maxLength: 255
        status:
          anyOf:
            - $ref: '#/components/schemas/IncidentStatusEnum'
            - type: 'null'
        message:
          type:
            - string
            - 'null'
        template:
          type:
            - string
            - 'null'
        visible:
          type: boolean
          default: false
        stickied:
          type: boolean
          default: false
        notifications:
          type: boolean
          default: false
        occurred_at:
          type:
            - string
            - 'null'
        template_vars:
          type: array
          default: []
          items:
            type: string
        component_id:
          type:
            - integer
            - 'null'
        component_status:
          anyOf:
            - $ref: '#/components/schemas/ComponentStatusEnum'
            - type: 'null'
        components:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/IncidentComponentRequestData'
      required:
        - name
      title: CreateIncidentRequestData
    Incident:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - incidents
        attributes:
          type: object
          properties:
            id:
              type: integer
            guid:
              type: string
            name:
              type: string
            message:
              type: string
            visible:
              $ref: '#/components/schemas/ResourceVisibilityEnum'
            stickied:
              type: boolean
            notifications:
              type: integer
            components_count:
              type: string
            status:
              type: object
              properties:
                human:
                  type: string
                value:
                  type: string
              required:
                - human
                - value
            occurred:
              type: object
              properties:
                human:
                  type: string
                string:
                  type: string
              required:
                - human
                - string
            created:
              type: object
              properties:
                human:
                  type: string
                string:
                  type: string
              required:
                - human
                - string
            updated:
              type: object
              properties:
                human:
                  type: string
                string:
                  type: string
              required:
                - human
                - string
          required:
            - id
            - guid
            - name
            - message
            - visible
            - stickied
            - notifications
            - status
            - occurred
            - created
            - updated
        relationships:
          type: object
          properties:
            components:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/ComponentIdentifier'
              required:
                - data
            updates:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/UpdateIdentifier'
              required:
                - data
            user:
              type: object
              properties:
                data:
                  anyOf:
                    - $ref: '#/components/schemas/UserIdentifier'
                    - type: 'null'
              required:
                - data
      required:
        - id
        - type
      title: Incident
    IncidentStatusEnum:
      type: integer
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
      title: IncidentStatusEnum
    ComponentStatusEnum:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      title: ComponentStatusEnum
    IncidentComponentRequestData:
      type: object
      properties:
        id:
          type: integer
        status:
          $ref: '#/components/schemas/ComponentStatusEnum'
      required:
        - id
        - status
      title: IncidentComponentRequestData
    ResourceVisibilityEnum:
      type: integer
      enum:
        - 0
        - 1
        - 2
      title: ResourceVisibilityEnum
    ComponentIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - components
        id:
          type: string
      required:
        - type
        - id
      title: ComponentIdentifier
    UpdateIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - updates
        id:
          type: string
      required:
        - type
        - id
      title: UpdateIdentifier
    UserIdentifier:
      type: object
      properties:
        type:
          type: string
        id:
          type: string
      required:
        - type
        - id
      title: UserIdentifier
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    MissingAbilityException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer

````