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

# Create a component

`POST /v1/components`

Create a new email component from an LMX body.

## Request body

- CreateComponentBody
  - `name` string, required — The component name.
  - `lmx` string, required — The component body as an LMX string.

## Response `201`

Component created.

- ComponentResponse
  - `id` string, required — The ID of the component.
  - `name` string, required — The name of the component.
  - `lmx` string, required — The component body serialized as LMX.

## Other responses

- `400` — Invalid request body.
- `401` — Invalid API key or content API not enabled for this team.
- `405` — Wrong HTTP request method.
- `413` — LMX body exceeds the size limit.
- `422` — Invalid LMX.

---

[API](https://skmtc.net/loops/apis/loops-openapi-spec.md) · [All operations](https://skmtc.net/loops/apis/loops-openapi-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loops/loops-openapi-spec/revisions/9cc087257f0d/schema)
