POST
/
v1
/
components
curl --request POST \
  --url https://api.edgee.app/v1/components \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My Component",
  "slug": "my-component",
  "category": "data_collection",
  "subcategory": "analytics",
  "documentation_link": "<string>",
  "repo_link": "<string>",
  "description": "<string>",
  "public": true
}'
{
  "object": "component",
  "id": "<string>",
  "name": "<string>",
  "slug": "<string>",
  "avatar_url": "<string>",
  "category": "<string>",
  "subcategory": "<string>",
  "description": "<string>",
  "latest_version": "<string>",
  "versions": {},
  "repo_link": "<string>",
  "documentation_link": "<string>",
  "created_at": "2022-03-01T00:00:00Z",
  "updated_at": "2022-03-01T00:00:00Z",
  "is_public": false,
  "is_archived": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token. More info here

Body

application/json
name
string
required

Name of the component.

Example:

"My Component"

category
enum<string>
required

Category of the component.

Available options:
data_collection
subcategory
enum<string>
required

Subcategory of the component.

Available options:
analytics,
warehouse,
attribution
slug
string

Slug of the component.

Example:

"my-component"

Link to the documentation of the component.

Link to the repository of the component.

description
string

Description of the component.

public
boolean

Whether the created component is public or not.

Response

200
application/json
The created Component

A component is a reusable piece of code that can be used in multiple projects.

object
string

String representing the object's type. Objects of the same type share the same value

Example:

"component"

id
string

Unique identifier for the component

name
string

Name of the component

slug
string

Slug of the component

avatar_url
string

Avatar of the component

category
string

Category of the component

subcategory
string

Subcategory of the component

description
string

Description of the component

latest_version
string

Latest version of the component

versions
object

List of versions of the component

Link to the repository of the component

Link to the documentation of the component

created_at
string

Time at which the project was created

Example:

"2022-03-01T00:00:00Z"

updated_at
string

Time at which the project was last updated

Example:

"2022-03-01T00:00:00Z"

is_public
boolean

Whether the component is public or not

Example:

false

is_archived
boolean

Whether the component is archived or not

Example:

false