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



## OpenAPI

````yaml /api-reference/openapi.json post /components
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:8001/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
  - name: Subscribers
paths:
  /components:
    post:
      tags:
        - Components
      summary: Create Component
      operationId: cachet.api.components.store
      requestBody:
        description: '`CreateComponentRequestData`'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateComponentRequestData'
      responses:
        '200':
          description: '`Component`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Component'
                  included:
                    type: array
                    items:
                      anyOf:
                        - $ref: '#/components/schemas/ComponentGroup'
                        - $ref: '#/components/schemas/Incident'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/MissingAbilityException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    CreateComponentRequestData:
      type: object
      properties:
        name:
          type: string
          maxLength: 255
        description:
          type:
            - string
            - 'null'
        status:
          anyOf:
            - $ref: '#/components/schemas/ComponentStatusEnum'
            - type: 'null'
        link:
          type:
            - string
            - 'null'
        order:
          type:
            - integer
            - 'null'
          minimum: 0
        enabled:
          type: boolean
          default: true
        component_group_id:
          type:
            - integer
            - 'null'
          minimum: 0
      required:
        - name
      title: CreateComponentRequestData
    Component:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - components
        attributes:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            description:
              type:
                - string
                - 'null'
            link:
              type:
                - string
                - 'null'
            order:
              type:
                - integer
                - 'null'
            status:
              type: object
              properties:
                human:
                  type:
                    - string
                    - 'null'
                  enum:
                    - Operational
                    - Performance issues
                    - Partial outage
                    - Major outage
                    - Under maintenance
                    - Unknown
                    - null
                value:
                  type:
                    - integer
                    - 'null'
              required:
                - human
                - value
            enabled:
              type: boolean
            meta:
              type:
                - array
                - 'null'
              items: {}
            created:
              type: object
              properties:
                human:
                  type:
                    - string
                    - 'null'
                string:
                  type:
                    - string
                    - 'null'
              required:
                - human
                - string
            updated:
              type: object
              properties:
                human:
                  type:
                    - string
                    - 'null'
                string:
                  type:
                    - string
                    - 'null'
              required:
                - human
                - string
            pivot:
              type: object
              properties:
                component_status:
                  type: object
                  properties:
                    human:
                      type:
                        - string
                        - 'null'
                    value:
                      type:
                        - string
                        - 'null'
                  required:
                    - human
                    - value
              required:
                - component_status
          required:
            - id
            - name
            - description
            - link
            - order
            - status
            - enabled
            - meta
            - created
            - updated
        relationships:
          type: object
          properties:
            group:
              type: object
              properties:
                data:
                  anyOf:
                    - $ref: '#/components/schemas/ComponentGroupIdentifier'
                    - type: 'null'
              required:
                - data
            incidents:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/IncidentIdentifier'
              required:
                - data
      required:
        - id
        - type
      title: Component
    ComponentGroup:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - componentGroups
        attributes:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            order:
              type: integer
            order_column:
              anyOf:
                - $ref: '#/components/schemas/ResourceOrderColumnEnum'
                - type: 'null'
            order_direction:
              anyOf:
                - $ref: '#/components/schemas/ResourceOrderDirectionEnum'
                - type: 'null'
            collapsed:
              $ref: '#/components/schemas/ComponentGroupVisibilityEnum'
            visible:
              $ref: '#/components/schemas/ResourceVisibilityEnum'
            created:
              type: object
              properties:
                human:
                  type:
                    - string
                    - 'null'
                string:
                  type:
                    - string
                    - 'null'
              required:
                - human
                - string
            updated:
              type: object
              properties:
                human:
                  type:
                    - string
                    - 'null'
                string:
                  type:
                    - string
                    - 'null'
              required:
                - human
                - string
          required:
            - id
            - name
            - order
            - order_column
            - order_direction
            - collapsed
            - visible
            - created
            - updated
        relationships:
          type: object
          properties:
            components:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/ComponentIdentifier'
              required:
                - data
      required:
        - id
        - type
      title: ComponentGroup
    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
                    - 'null'
                value:
                  type:
                    - string
                    - 'null'
              required:
                - human
                - value
            occurred:
              type: object
              properties:
                human:
                  type:
                    - string
                    - 'null'
                string:
                  type:
                    - string
                    - 'null'
              required:
                - human
                - string
            created:
              type: object
              properties:
                human:
                  type:
                    - string
                    - 'null'
                string:
                  type:
                    - string
                    - 'null'
              required:
                - human
                - string
            updated:
              type: object
              properties:
                human:
                  type:
                    - string
                    - 'null'
                string:
                  type:
                    - string
                    - 'null'
              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
    ComponentStatusEnum:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      title: ComponentStatusEnum
    ComponentGroupIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - componentGroups
        id:
          type: string
      required:
        - type
        - id
      title: ComponentGroupIdentifier
    IncidentIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - incidents
        id:
          type: string
      required:
        - type
        - id
      title: IncidentIdentifier
    ResourceOrderColumnEnum:
      type: string
      enum:
        - id
        - last_updated
        - name
        - manual
        - status
      title: ResourceOrderColumnEnum
    ResourceOrderDirectionEnum:
      type: string
      enum:
        - asc
        - desc
      title: ResourceOrderDirectionEnum
    ComponentGroupVisibilityEnum:
      type: integer
      enum:
        - 0
        - 1
        - 2
      title: ComponentGroupVisibilityEnum
    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

````