> ## Documentation Index
> Fetch the complete documentation index at: https://loops.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a component

> Retrieve a single component by ID.

<Warning>
  Content API endpoints are currently in an open alpha and are subject to
  change.
</Warning>

## Request

### Path parameters

<ParamField path="componentId" type="string" required>
  The ID of the component.
</ParamField>

## Response

### Success

<ResponseField name="success" type="boolean" required />

<ResponseField name="componentId" type="string" required>
  The component ID.
</ResponseField>

<ResponseField name="name" type="string" required>
  The component name.
</ResponseField>

<ResponseField name="lmx" type="string" required>
  The component body serialized as LMX.
</ResponseField>

### Error

A `400 Bad Request` is returned if `componentId` is invalid.

A `404 Not Found` is returned if the component does not exist.

If the API key is invalid (or content API is not enabled for your team), a
`401 Unauthorized` is returned.

<ResponseField name="success" type="boolean" required />

<ResponseField name="message" type="string" required />

<ResponseExample>
  ```json Response theme={"dark"}
  {
    "success": true,
    "componentId": "cmpn_01hxyz",
    "name": "Hero header",
    "lmx": "<Section><Heading>Welcome</Heading></Section>"
  }
  ```

  ```json Error response theme={"dark"}
  {
    "success": false,
    "message": "Component not found."
  }
  ```
</ResponseExample>
