> ## Documentation index
>
> Fetch the complete documentation index at: https://andesine.app/docs/llms.txt
> Use it to find all pages before you explore further.

# List custom elements

`GET https://api.andesine.app/extensions/elements`

The custom elements that the workspace's active extensions draw in the editor, e.g. Tabs: their props, whether they have content, which child blocks their content accepts, and the elements that belong inside them. Write them in MDX as <Name prop="value">content</Name>. The editor guides edits by these rules and offers a clean-up; the API doesn't enforce them.

Required API key permissions: read:entries. Write permissions also grant read access for the same resource.

## Authentication

Use one of:

- `apiKey` (http, bearer, Andesine API key)
- `oauth` (http, bearer, Andesine OAuth access token)

## Parameters

### Header

- `x-workspace-id` (string, optional): Required for OAuth: ID of the workspace to access. API keys use their own workspace.

## Responses

### 200

OK

Content type: `application/json`

Type: array of object.

- `element` (string, required)
- `name` (string, required)
- `description` (string, optional)
- `content` (boolean, required): False for an element without content, written as <Name />.
- `accepts` (object, optional): The direct child blocks that its content accepts; without it, any blocks.
  - `elements` (array of string, optional)
  - `blocks` (array of string, optional)
- `rejects` (object, optional): The direct child blocks that its content doesn't accept, even if `accepts` lists them.
  - `elements` (array of string, optional)
  - `blocks` (array of string, optional)
- `props` (array of any of, optional): The props, with their defaults, which a new element gets.
  - Any of: Option 1 (object)
    - `name` (string, required)
    - `title` (string, optional)
    - `description` (string, optional)
    - `type` (constant, required): Value: `"string"`.
    - `enum` (array of string, optional)
    - `control` (string, optional): One of: `"input"`, `"textarea"`, `"icon"`, `"link"`, `"select"`, `"toggle"`.
    - `placeholder` (string, optional)
    - `minLength` (number, optional)
    - `maxLength` (number, optional)
    - `default` (string, optional)
  - Any of: Option 2 (object)
    - `name` (string, required)
    - `title` (string, optional)
    - `description` (string, optional)
    - `type` (string, required): One of: `"number"`, `"integer"`.
    - `minimum` (number, optional)
    - `maximum` (number, optional)
    - `default` (number, optional)
  - Any of: Option 3 (object)
    - `name` (string, required)
    - `title` (string, optional)
    - `description` (string, optional)
    - `type` (constant, required): Value: `"boolean"`.
    - `default` (boolean, optional)
- `extension` (string, required): The extension that renders it, e.g. andesine/pages.
- `children` (array of object, required): Elements that belong inside this one, e.g. Tab in Tabs.
  - `element` (string, required)
  - `name` (string, optional)
  - `description` (string, optional)
  - `content` (boolean, required): False for an element without content, written as <Name />.
  - `accepts` (object, optional): The direct child blocks that its content accepts; without it, any blocks.
    - `elements` (array of string, optional)
    - `blocks` (array of string, optional)
  - `rejects` (object, optional): The direct child blocks that its content doesn't accept, even if `accepts` lists them.
    - `elements` (array of string, optional)
    - `blocks` (array of string, optional)
  - `props` (array of any of, optional): The props, with their defaults, which a new element gets.
    - Any of: Option 1 (object)
      - `name` (string, required)
      - `title` (string, optional)
      - `description` (string, optional)
      - `type` (constant, required): Value: `"string"`.
      - `enum` (array of string, optional)
      - `control` (string, optional): One of: `"input"`, `"textarea"`, `"icon"`, `"link"`, `"select"`, `"toggle"`.
      - `placeholder` (string, optional)
      - `minLength` (number, optional)
      - `maxLength` (number, optional)
      - `default` (string, optional)
    - Any of: Option 2 (object)
      - `name` (string, required)
      - `title` (string, optional)
      - `description` (string, optional)
      - `type` (string, required): One of: `"number"`, `"integer"`.
      - `minimum` (number, optional)
      - `maximum` (number, optional)
      - `default` (number, optional)
    - Any of: Option 3 (object)
      - `name` (string, required)
      - `title` (string, optional)
      - `description` (string, optional)
      - `type` (constant, required): Value: `"boolean"`.
      - `default` (boolean, optional)

### 400

400

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"BAD_REQUEST"`.
  - `status` (constant, required): Value: `400`.
  - `message` (string, required): Default: `"Bad Request"`.
  - `data` (`ValidationErrorData`, optional)
    - `hints` (array of string, optional): Suggested next steps. Wording can change; use error codes and structured data for program logic.
    - `issues` (array of `ValidationIssue`, optional)
      - `message` (string, required)
      - `code` (string, optional)
      - `path` (array of any of, optional)
        - Any of: Option 1 (string)
        - Any of: Option 2 (number)
        - Any of: Option 3 (object)
          - `key` (any of, required)
            - Any of: Option 1 (string)
            - Any of: Option 2 (number)
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 401

401

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"UNAUTHORIZED"`.
  - `status` (constant, required): Value: `401`.
  - `message` (string, required): Default: `"Unauthorized"`.
  - `data` (`ErrorData`, optional)
    - `hints` (array of string, optional): Suggested next steps. Wording can change; use error codes and structured data for program logic.
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 403

403

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"FORBIDDEN"`.
  - `status` (constant, required): Value: `403`.
  - `message` (string, required): Default: `"Forbidden"`.
  - `data` (`ForbiddenErrorData`, optional)
    - `hints` (array of string, optional): Suggested next steps. Wording can change; use error codes and structured data for program logic.
    - `missingPermissions` (array of string, optional)
    - `requiredPlan` (constant, optional): Value: `"pro"`.
    - `action` (string, optional): The requested action that was denied.
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 404

404

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"NOT_FOUND"`.
  - `status` (constant, required): Value: `404`.
  - `message` (string, required): Default: `"Not Found"`.
  - `data` (`ErrorData`, optional)
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 409

409

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"CONFLICT"`.
  - `status` (constant, required): Value: `409`.
  - `message` (string, required): Default: `"Conflict"`.
  - `data` (`ErrorData`, optional)
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 429

429

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"TOO_MANY_REQUESTS"`.
  - `status` (constant, required): Value: `429`.
  - `message` (string, required): Default: `"Too Many Requests"`.
  - `data` (`RateLimitErrorData`, optional)
    - `hints` (array of string, optional): Suggested next steps. Wording can change; use error codes and structured data for program logic.
    - `limit` (string, optional): The limit that was reached: a short-term rate limit, or a monthly API call, AI credit, or spending limit. One of: `"rate"`, `"api-calls"`, `"ai-credits"`, `"spending"`.
    - `retryAfterSeconds` (number, optional): Minimum delay before another attempt, in seconds. Also sent in Retry-After.
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 500

500

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"INTERNAL_SERVER_ERROR"`.
  - `status` (constant, required): Value: `500`.
  - `message` (string, required): Default: `"Internal Server Error"`.
  - `data` (`ErrorData`, optional)
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)

### 503

503

Content type: `application/json`

Type: one of.

- One of: Option 1 (object)
  - `defined` (constant, required): Value: `true`.
  - `code` (constant, required): Value: `"SERVICE_UNAVAILABLE"`.
  - `status` (constant, required): Value: `503`.
  - `message` (string, required): Default: `"Service Unavailable"`.
  - `data` (`ErrorData`, optional)
- One of: Option 2 (object)
  - `defined` (constant, required): Value: `false`.
  - `code` (string, required)
  - `status` (number, required)
  - `message` (string, required)
  - `data` (any, optional)
