---
title: "Create a component"
method: POST
path: "/components/"
tags: ["components"]
---

# Create a component

`POST /components/`

Create a component

## Request body

- MutableComponent
  - `name` string, required
  - `description` string
  - `id` string — Unique component ID
  - `access` 'private' | 'public'
  - `applicationUid` string — Unique application ID
  - `logo` string — Component Logo URL
  - `descriptor` object — Component descriptor (component.json) which contains a component meta information.
  - `distribution` union, required
    - object
      - `type` 'docker' | 'slug', required
      - `image` string, required — Docker image
      - `registrySecretId` string — ID of a secret, which contains Docker registry credentials
    - object
      - `type` 'docker' | 'slug', required
      - `slugUrl` string, required — URL to a slug, containing a compomponent source code
  - `isGlobal` boolean
  - `active` boolean
  - `owners` Owner[]
    - `id` string, required — External id of the owner
    - `type` string, required — Type to discriminate owner's type

## Response `201`

successful operation

- object
  - `data` MutableComponent
    - `name` string, required
    - `description` string
    - `id` string — Unique component ID
    - `access` 'private' | 'public'
    - `applicationUid` string — Unique application ID
    - `logo` string — Component Logo URL
    - `descriptor` object — Component descriptor (component.json) which contains a component meta information.
    - `distribution` union, required
      - object
        - `type` 'docker' | 'slug', required
        - `image` string, required — Docker image
        - `registrySecretId` string — ID of a secret, which contains Docker registry credentials
      - object
        - `type` 'docker' | 'slug', required
        - `slugUrl` string, required — URL to a slug, containing a compomponent source code
    - `isGlobal` boolean
    - `active` boolean
    - `owners` Owner[]
      - `id` string, required — External id of the owner
      - `type` string, required — Type to discriminate owner's type

## Other responses

- `401` — Access token is missing or invalid

---

[API](https://skmtc.net/openintegrationhub/apis/component-repository.md) · [All operations](https://skmtc.net/openintegrationhub/apis/component-repository/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openintegrationhub/component-repository/revisions/a2db333b03c8/schema)
