# Attributes

Source: https://docs.arcweave.com/rest-api/attributes
Section: REST API
Description: REST API endpoints for board, element, and component attributes

Attributes belong to a board, element, or component. Use the endpoint matching the attribute's owner when listing, creating, updating, reordering, or deleting them. Board and component folders cannot host attributes.

Boards and components have attribute list endpoints; elements do not. To read an element's attributes, get the `attributes` ID list from [Get element](https://docs.arcweave.com/rest-api/elements#get-element), then retrieve each attribute with [Get attribute](https://docs.arcweave.com/rest-api/attributes#get-attribute).

## Attribute values

Context: Arcweave docs > REST API > Attributes > Attribute values

Element attributes support `string`, `rich-text`, `component-list`, and `asset-list` values. Board and component attributes also support `boolean`, `integer`, and `float` values.

| Value type       | `value.data`                                                                                            | Default when omitted on creation or a type change |
| ---------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| `string`         | String or `null`. `plain: true` means plain text; `plain: false` means HTML.                            | `null`                                            |
| `rich-text`      | [Rich text HTML](https://docs.arcweave.com/rest-api/rich-text#supported-html) or `null`. Stored as `string` with `plain: false`. | `null`                                            |
| `component-list` | Array of `{ "id": "reference_id", "component": "component_id" }` objects, or `null`.                    | `null`                                            |
| `asset-list`     | Array of `{ "id": "reference_id", "asset": "asset_id" }` objects, or `null`.                            | `null`                                            |
| `boolean`        | JSON `true` or `false`.                                                                                 | `false`                                           |
| `integer`        | JSON integer.                                                                                           | `0`                                               |
| `float`          | Finite JSON number.                                                                                     | `0.0`                                             |

`value.plain` is accepted only when the same request sets `value.type` to `string` or `rich-text`. `rich-text` requires `plain: false`; `type: "string"` defaults to `plain: true`, including on update. To retain the existing text format while updating only data, omit both `value.type` and `value.plain`.

Reference lists contain objects, not bare IDs. Each reference must have exactly `id` and its target field, both strings. Reference IDs must be unique within the list; each target must exist in the same project and cannot be a folder. Empty reference lists and empty text are normalized to `null`.

### Variable attributes

Context: Arcweave docs > REST API > Attributes > Attribute values > Variable attributes

On boards and components, plain `string` values (`plain: true`), booleans, integers, and floats are variable attributes usable in Arcscript. They require a `customId` unique within their owner, and the owner must already have its own `customId`. Attribute custom IDs must match `^[A-Za-z$_][0-9A-Za-z_]*$` and cannot be Arcscript reserved identifiers such as `if`, `true`, or `random`.

`customId` is not accepted for rich text, reference lists, or element attributes. Creating a board/component attribute with `type: "string"` defaults to plain text, so it requires `customId`. Use `rich-text` for formatted descriptive content.

When updating a variable attribute, its existing `customId` cannot be changed. Converting an existing variable attribute with a custom ID to rich text or a reference list is also unsupported. You can convert a non-variable attribute to a variable type by supplying a valid `customId`.

## Endpoints

Context: Arcweave docs > REST API > Attributes > Endpoints

### Get attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Get attribute

`GET /api/v1/{hash}/attribute/{attributeID}`

**Request**

```http title="HTTP"
GET /api/v1/{hash}/attribute/{attributeID}
```

```bash title="curl"
curl --request GET \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/attribute/{attributeID}"
```

**Response**

Returns `200 OK` with the stored attribute:

```json
{
  "id": "a1",
  "name": "Description",
  "size": "full",
  "value": {
    "type": "string",
    "data": "<p>Attribute content</p>",
    "plain": false
  },
  "cId": "c1",
  "cType": "components"
}
```

`cId` identifies the owner. `cType` is `boards`, `elements`, or `components`. Variable attributes also include their `customId`.

### Get board attributes

Context: Arcweave docs > REST API > Attributes > Endpoints > Get board attributes

`GET /api/v1/{hash}/board/{boardID}/attributes`

**Request**

```http title="HTTP"
GET /api/v1/{hash}/board/{boardID}/attributes
```

```bash title="curl"
curl --request GET \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/board/{boardID}/attributes"
```

**Response**

Returns `200 OK` with the board's stored attributes in their display order. An owner with no attributes returns `[]`.

```json
[
  {
    "id": "a1",
    "name": "Health",
    "customId": "health",
    "size": "full",
    "value": {
      "type": "integer",
      "data": 100
    },
    "cId": "b1",
    "cType": "boards"
  }
]
```

Board folders return `400 Bad Request`. A missing owner returns `404 Not Found`.

### Get board attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Get board attribute

`GET /api/v1/{hash}/board/{boardID}/attribute/{attributeID}`

**Request**

```http title="HTTP"
GET /api/v1/{hash}/board/{boardID}/attribute/{attributeID}
```

```bash title="curl"
curl --request GET \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/board/{boardID}/attribute/{attributeID}"
```

**Response**

Returns `200 OK` with the stored attribute. The attribute must belong to the board identified in the route.

```json
{
  "id": "a1",
  "name": "Health",
  "customId": "health",
  "size": "full",
  "value": {
    "type": "integer",
    "data": 100
  },
  "cId": "b1",
  "cType": "boards"
}
```

Board folders return `400 Bad Request`. A missing owner or attribute returns `404 Not Found`.

### Get component attributes

Context: Arcweave docs > REST API > Attributes > Endpoints > Get component attributes

`GET /api/v1/{hash}/component/{componentID}/attributes`

**Request**

```http title="HTTP"
GET /api/v1/{hash}/component/{componentID}/attributes
```

```bash title="curl"
curl --request GET \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/component/{componentID}/attributes"
```

**Response**

Returns `200 OK` with the component's stored attributes in their display order. An owner with no attributes returns `[]`.

```json
[
  {
    "id": "a1",
    "name": "Health",
    "customId": "health",
    "size": "full",
    "value": {
      "type": "integer",
      "data": 100
    },
    "cId": "c1",
    "cType": "components"
  }
]
```

Component folders return `400 Bad Request`. A missing owner returns `404 Not Found`.

### Get component attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Get component attribute

`GET /api/v1/{hash}/component/{componentID}/attribute/{attributeID}`

**Request**

```http title="HTTP"
GET /api/v1/{hash}/component/{componentID}/attribute/{attributeID}
```

```bash title="curl"
curl --request GET \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/component/{componentID}/attribute/{attributeID}"
```

**Response**

Returns `200 OK` with the stored attribute. The attribute must belong to the component identified in the route.

```json
{
  "id": "a1",
  "name": "Health",
  "customId": "health",
  "size": "full",
  "value": {
    "type": "integer",
    "data": 100
  },
  "cId": "c1",
  "cType": "components"
}
```

Component folders return `400 Bad Request`. A missing owner or attribute returns `404 Not Found`.

### Create element attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Create element attribute

`POST /api/v1/{hash}/element/{elementID}/attribute`

**Request**

```http title="HTTP"
POST /api/v1/{hash}/element/{elementID}/attribute
```

```bash title="curl"
curl --request POST \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/attribute"
```

```json
{
  "name": "Description",
  "size": "half",
  "value": {
    "type": "rich-text",
    "data": "<p>Attribute content</p>"
  },
  "index": 0
}
```

Request fields:

| Property      | Required | Type                                   | Description                                                                                                      |
| ------------- | -------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `name`        | No       | String or `null`                       | Attribute label. Defaults to `null`.                                                                             |
| `size`        | No       | String                                 | Attribute width: `full` or `half`. Defaults to `full`.                                                           |
| `value`       | Yes      | Object                                 | Attribute value object.                                                                                          |
| `value.type`  | Yes      | String                                 | `string`, `rich-text`, `component-list`, or `asset-list`.                                                        |
| `value.data`  | No       | String, array, or `null`               | Text or reference objects as described in [Attribute values](https://docs.arcweave.com/rest-api/attributes#attribute-values). Defaults to `null`.             |
| `value.plain` | No       | Boolean                                | Indicates whether a text value contains plain text. Defaults to `true` for `string` and `false` for `rich-text`. |
| `index`       | No       | Non-negative integer or the string `-` | Position within the owner's attribute list. Defaults to `-`, which appends the attribute.                        |

For `rich-text` attributes, provide `value.data` using the [rich-text attribute formatting rules](https://docs.arcweave.com/rest-api/rich-text#supported-html). Blockquotes are supported; code blocks and inline code are not. Plain `string` attributes with `plain: true` should contain unwrapped text. Rich-text input is normalized to Arcweave's internal string representation with `plain: false`, and empty string data is normalized to `null`.

**Response**

Returns `201 Created` with the new attribute ID and project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"],
  "id": "65139ea3-331f-4b25-88b4-ea7a65ff106c"
}
```

### Create board attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Create board attribute

`POST /api/v1/{hash}/board/{boardID}/attribute`

**Request**

```http title="HTTP"
POST /api/v1/{hash}/board/{boardID}/attribute
```

```bash title="curl"
curl --request POST \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/board/{boardID}/attribute"
```

```json
{
  "name": "Description",
  "size": "half",
  "value": {
    "type": "rich-text",
    "data": "<p>Attribute content</p>"
  },
  "index": 0
}
```

Request fields:

| Property      | Required                | Type                                   | Description                                                                                                      |
| ------------- | ----------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `name`        | No                      | String or `null`                       | Attribute label. Defaults to `null`.                                                                             |
| `customId`    | For variable attributes | String                                 | Required for plain text, boolean, integer, and float values. See [Variable attributes](https://docs.arcweave.com/rest-api/attributes#variable-attributes).    |
| `size`        | No                      | String                                 | Attribute width: `full` or `half`. Defaults to `full`.                                                           |
| `value`       | Yes                     | Object                                 | Attribute value object.                                                                                          |
| `value.type`  | Yes                     | String                                 | `string`, `rich-text`, `component-list`, `asset-list`, `boolean`, `integer`, or `float`.                         |
| `value.data`  | No                      | Type-dependent                         | Data and defaults depend on the type; see [Attribute values](https://docs.arcweave.com/rest-api/attributes#attribute-values).                                 |
| `value.plain` | No                      | Boolean                                | Indicates whether a text value contains plain text. Defaults to `true` for `string` and `false` for `rich-text`. |
| `index`       | No                      | Non-negative integer or the string `-` | Position within the board's attribute list. Defaults to `-`, which appends the attribute.                        |

For `rich-text` attributes, provide `value.data` using the [rich-text attribute formatting rules](https://docs.arcweave.com/rest-api/rich-text#supported-html). Blockquotes are supported; code blocks and inline code are not. Plain `string` attributes with `plain: true` should contain unwrapped text. Rich-text input is normalized to Arcweave's internal string representation with `plain: false`, and empty string data is normalized to `null`.

Board folders cannot host attributes.

For example, create a board variable attribute with:

```json
{
  "name": "Health",
  "customId": "health",
  "value": {
    "type": "integer",
    "data": 100
  }
}
```

**Response**

Returns `201 Created` with the new attribute ID and project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"],
  "id": "65139ea3-331f-4b25-88b4-ea7a65ff106c"
}
```

### Create component attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Create component attribute

`POST /api/v1/{hash}/component/{componentID}/attribute`

**Request**

```http title="HTTP"
POST /api/v1/{hash}/component/{componentID}/attribute
```

```bash title="curl"
curl --request POST \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/component/{componentID}/attribute"
```

```json
{
  "name": "Description",
  "size": "half",
  "value": {
    "type": "rich-text",
    "data": "<p>Attribute content</p>"
  },
  "index": 0
}
```

Request fields:

| Property      | Required                | Type                                   | Description                                                                                                      |
| ------------- | ----------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `name`        | No                      | String or `null`                       | Attribute label. Defaults to `null`.                                                                             |
| `customId`    | For variable attributes | String                                 | Required for plain text, boolean, integer, and float values. See [Variable attributes](https://docs.arcweave.com/rest-api/attributes#variable-attributes).    |
| `size`        | No                      | String                                 | Attribute width: `full` or `half`. Defaults to `full`.                                                           |
| `value`       | Yes                     | Object                                 | Attribute value object.                                                                                          |
| `value.type`  | Yes                     | String                                 | `string`, `rich-text`, `component-list`, `asset-list`, `boolean`, `integer`, or `float`.                         |
| `value.data`  | No                      | Type-dependent                         | Data and defaults depend on the type; see [Attribute values](https://docs.arcweave.com/rest-api/attributes#attribute-values).                                 |
| `value.plain` | No                      | Boolean                                | Indicates whether a text value contains plain text. Defaults to `true` for `string` and `false` for `rich-text`. |
| `index`       | No                      | Non-negative integer or the string `-` | Position within the component's attribute list. Defaults to `-`, which appends the attribute.                    |

For `rich-text` attributes, provide `value.data` using the [rich-text attribute formatting rules](https://docs.arcweave.com/rest-api/rich-text#supported-html). Blockquotes are supported; code blocks and inline code are not. Plain `string` attributes with `plain: true` should contain unwrapped text. Rich-text input is normalized to Arcweave's internal string representation with `plain: false`, and empty string data is normalized to `null`.

Component folders cannot host attributes.

For example, create a component variable attribute with:

```json
{
  "name": "Health",
  "customId": "health",
  "value": {
    "type": "integer",
    "data": 100
  }
}
```

**Response**

Returns `201 Created` with the new attribute ID and project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"],
  "id": "65139ea3-331f-4b25-88b4-ea7a65ff106c"
}
```

### Update element attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Update element attribute

`PATCH /api/v1/{hash}/element/{elementID}/attribute/{attributeID}`

**Request**

```http title="HTTP"
PATCH /api/v1/{hash}/element/{elementID}/attribute/{attributeID}
```

```bash title="curl"
curl --request PATCH \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/attribute/{attributeID}"
```

```json
{
  "name": "Updated description",
  "size": "half",
  "value": {
    "type": "string",
    "data": "Updated value",
    "plain": true
  }
}
```

Request fields:

| Property      | Required | Type                     | Description                                                                                             |
| ------------- | -------- | ------------------------ | ------------------------------------------------------------------------------------------------------- |
| `name`        | No       | String or `null`         | Updated attribute label. If omitted, the current value is retained.                                     |
| `size`        | No       | String                   | Updated width: `full` or `half`. If omitted, the current value is retained.                             |
| `value`       | No       | Object                   | Updated value properties. If omitted, the current value is retained.                                    |
| `value.type`  | No       | String                   | `string`, `rich-text`, `component-list`, or `asset-list`. If omitted, the current type is retained.     |
| `value.data`  | No       | String, array, or `null` | Updated data compatible with the selected type. If omitted during a type change, it defaults to `null`. |
| `value.plain` | No       | Boolean                  | Text only. Omit together with `value.type` to retain the current text format.                           |

At least one of `name`, `size`, or `value` is required. If the value type changes and `value.data` is omitted, stale data from the old type is cleared.

When updating a `rich-text` attribute, provide `value.data` using the [rich-text attribute formatting rules](https://docs.arcweave.com/rest-api/rich-text#supported-html). Blockquotes are supported; code blocks and inline code are not. Do not add HTML tags to plain `string` attributes with `plain: true`.

An attribute can only be updated through the element that owns it.

**Response**

Returns `200 OK` with the updated project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}
```

### Update board attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Update board attribute

`PATCH /api/v1/{hash}/board/{boardID}/attribute/{attributeID}`

**Request**

```http title="HTTP"
PATCH /api/v1/{hash}/board/{boardID}/attribute/{attributeID}
```

```bash title="curl"
curl --request PATCH \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/board/{boardID}/attribute/{attributeID}"
```

```json
{
  "name": "Updated description",
  "size": "half",
  "value": {
    "type": "rich-text",
    "data": "<p>Updated value</p>"
  }
}
```

Request fields:

| Property      | Required                                 | Type             | Description                                                                                                                        |
| ------------- | ---------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `name`        | No                                       | String or `null` | Updated attribute label. If omitted, the current value is retained.                                                                |
| `customId`    | For a conversion to a variable attribute | String           | Supply when converting to a variable type. An existing custom ID cannot be changed.                                                |
| `size`        | No                                       | String           | Updated width: `full` or `half`. If omitted, the current value is retained.                                                        |
| `value`       | No                                       | Object           | Updated value properties. If omitted, the current value is retained.                                                               |
| `value.type`  | No                                       | String           | `string`, `rich-text`, `component-list`, `asset-list`, `boolean`, `integer`, or `float`. If omitted, the current type is retained. |
| `value.data`  | No                                       | Type-dependent   | Updated data compatible with the selected type. If omitted during a type change, the new type default is used.                     |
| `value.plain` | No                                       | Boolean          | Text only. Omit together with `value.type` to retain the current text format.                                                      |

At least one of `name`, `customId`, `size`, or `value` is required. If the value type changes and `value.data` is omitted, stale data from the old type is cleared.

When updating a `rich-text` attribute, provide `value.data` using the [rich-text attribute formatting rules](https://docs.arcweave.com/rest-api/rich-text#supported-html). Blockquotes are supported; code blocks and inline code are not. Do not add HTML tags to plain `string` attributes with `plain: true`.

An attribute can only be updated through the board that owns it. [Variable attribute restrictions](https://docs.arcweave.com/rest-api/attributes#variable-attributes) apply to type and custom ID changes.

**Response**

Returns `200 OK` with the updated project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}
```

### Update component attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Update component attribute

`PATCH /api/v1/{hash}/component/{componentID}/attribute/{attributeID}`

**Request**

```http title="HTTP"
PATCH /api/v1/{hash}/component/{componentID}/attribute/{attributeID}
```

```bash title="curl"
curl --request PATCH \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/component/{componentID}/attribute/{attributeID}"
```

```json
{
  "name": "Updated description",
  "size": "half",
  "value": {
    "type": "rich-text",
    "data": "<p>Updated value</p>"
  }
}
```

Request fields:

| Property      | Required                                 | Type             | Description                                                                                                                        |
| ------------- | ---------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `name`        | No                                       | String or `null` | Updated attribute label. If omitted, the current value is retained.                                                                |
| `customId`    | For a conversion to a variable attribute | String           | Supply when converting to a variable type. An existing custom ID cannot be changed.                                                |
| `size`        | No                                       | String           | Updated width: `full` or `half`. If omitted, the current value is retained.                                                        |
| `value`       | No                                       | Object           | Updated value properties. If omitted, the current value is retained.                                                               |
| `value.type`  | No                                       | String           | `string`, `rich-text`, `component-list`, `asset-list`, `boolean`, `integer`, or `float`. If omitted, the current type is retained. |
| `value.data`  | No                                       | Type-dependent   | Updated data compatible with the selected type. If omitted during a type change, the new type default is used.                     |
| `value.plain` | No                                       | Boolean          | Text only. Omit together with `value.type` to retain the current text format.                                                      |

At least one of `name`, `customId`, `size`, or `value` is required. If the value type changes and `value.data` is omitted, stale data from the old type is cleared.

When updating a `rich-text` attribute, provide `value.data` using the [rich-text attribute formatting rules](https://docs.arcweave.com/rest-api/rich-text#supported-html). Blockquotes are supported; code blocks and inline code are not. Do not add HTML tags to plain `string` attributes with `plain: true`.

An attribute can only be updated through the component that owns it. [Variable attribute restrictions](https://docs.arcweave.com/rest-api/attributes#variable-attributes) apply to type and custom ID changes.

**Response**

Returns `200 OK` with the updated project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}
```

### Reorder element attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Reorder element attribute

`PATCH /api/v1/{hash}/element/{elementID}/attribute/{attributeID}/index`

**Request**

```http title="HTTP"
PATCH /api/v1/{hash}/element/{elementID}/attribute/{attributeID}/index
```

```bash title="curl"
curl --request PATCH \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/attribute/{attributeID}/index"
```

```json
{
  "index": 0
}
```

Request fields:

| Property | Required | Type                 | Description                                       |
| -------- | -------- | -------------------- | ------------------------------------------------- |
| `index`  | Yes      | Non-negative integer | New position within the element's attribute list. |

Attributes can only be reordered within their current element.

**Response**

Returns `200 OK` with the updated project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}
```

### Reorder board attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Reorder board attribute

`PATCH /api/v1/{hash}/board/{boardID}/attribute/{attributeID}/index`

**Request**

```http title="HTTP"
PATCH /api/v1/{hash}/board/{boardID}/attribute/{attributeID}/index
```

```bash title="curl"
curl --request PATCH \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/board/{boardID}/attribute/{attributeID}/index"
```

```json
{
  "index": 0
}
```

Request fields:

| Property | Required | Type                 | Description                                     |
| -------- | -------- | -------------------- | ----------------------------------------------- |
| `index`  | Yes      | Non-negative integer | New position within the board's attribute list. |

Attributes can only be reordered within their current board.

**Response**

Returns `200 OK` with the updated project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}
```

### Reorder component attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Reorder component attribute

`PATCH /api/v1/{hash}/component/{componentID}/attribute/{attributeID}/index`

**Request**

```http title="HTTP"
PATCH /api/v1/{hash}/component/{componentID}/attribute/{attributeID}/index
```

```bash title="curl"
curl --request PATCH \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/component/{componentID}/attribute/{attributeID}/index"
```

```json
{
  "index": 0
}
```

Request fields:

| Property | Required | Type                 | Description                                         |
| -------- | -------- | -------------------- | --------------------------------------------------- |
| `index`  | Yes      | Non-negative integer | New position within the component's attribute list. |

Attributes can only be reordered within their current component.

**Response**

Returns `200 OK` with the updated project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}
```

### Delete element attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Delete element attribute

`DELETE /api/v1/{hash}/element/{elementID}/attribute/{attributeID}`

**Request**

```http title="HTTP"
DELETE /api/v1/{hash}/element/{elementID}/attribute/{attributeID}
```

```bash title="curl"
curl --request DELETE \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/element/{elementID}/attribute/{attributeID}"
```

**Response**

Returns `200 OK` with the updated project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}
```

### Delete board attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Delete board attribute

`DELETE /api/v1/{hash}/board/{boardID}/attribute/{attributeID}`

**Request**

```http title="HTTP"
DELETE /api/v1/{hash}/board/{boardID}/attribute/{attributeID}
```

```bash title="curl"
curl --request DELETE \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/board/{boardID}/attribute/{attributeID}"
```

**Response**

Returns `200 OK` with the updated project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}
```

### Delete component attribute

Context: Arcweave docs > REST API > Attributes > Endpoints > Delete component attribute

`DELETE /api/v1/{hash}/component/{componentID}/attribute/{attributeID}`

**Request**

```http title="HTTP"
DELETE /api/v1/{hash}/component/{componentID}/attribute/{attributeID}
```

```bash title="curl"
curl --request DELETE \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/component/{componentID}/attribute/{attributeID}"
```

**Response**

Returns `200 OK` with the updated project version:

```json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}
```

## Attribute lifecycle

Context: Arcweave docs > REST API > Attributes > Attribute lifecycle

Attributes cannot exist independently from their owner:

- Deleting a [board](https://docs.arcweave.com/rest-api/boards#delete-board), including a folder subtree, deletes its owned attributes.
- Deleting an [element](https://docs.arcweave.com/rest-api/elements#delete-element) automatically deletes all attributes owned by that element.
- Deleting a [component](https://docs.arcweave.com/rest-api/components#delete-component) automatically deletes all attributes owned by that component.
- Deleting a component folder also deletes the attributes owned by every component in the deleted subtree.

## Common errors

Context: Arcweave docs > REST API > Attributes > Common errors

| Status | Meaning                                                                                                        |
| ------ | -------------------------------------------------------------------------------------------------------------- |
| `400`  | Invalid value, reference, custom ID, type conversion, size, index, empty update, or an owner that is a folder. |
| `403`  | Project permission denied.                                                                                     |
| `404`  | Project, owner, or attribute not found, or the attribute does not belong to the owner in the route.            |
