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

## Changes

- **2021-11-03** `52b0a03f1868` — 6 info
  - added the new optional request property `active`
  - added the new optional request property `id`
  - added the new optional request property `isGlobal`
  - added the optional property `data/active` to the response with the `201` status
  - …2 more
- **2021-03-17** `d6ffebabd3db` — 2 breaking, 1 warning, 6 info
  - added the new required request property `distribution`
  - added the new required request property `name`
  - removed the request property `data`
  - added the new optional request property `access`
  - …5 more
- **2019-08-20** `a1efb09ed220` — 2 info
  - added the new optional request property `data/logo`
  - added the optional property `data/logo` to the response with the `201` status
- **2019-08-20** `566ed0364ce0` — 2 info
  - added the new optional request property `data/applicationUid`
  - added the optional property `data/applicationUid` to the response with the `201` status
- **2019-05-16** `77e6b7addc6e` — 1 breaking, 9 info
  - removed the success response with the status `200`
  - the endpoint scheme security `api_key` was removed from the API
  - the request property `data/access` became optional
  - the request property `data/description` became optional
  - …6 more

[Change history](https://skmtc.dev/openintegrationhub/apis/component-repository/changes/components/post.md)

---

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