# Zilfu — Bio blocks

5 operations. Schemas referenced below are documented at https://zilfu.app/docs/api/schemas.md.

## Servers

- `https://zilfu.app/api`

## Operations

### List bio blocks

- **Method:** `GET`
- **Path:** `/spaces/{space}/bio/blocks`
- **Tags:** BioBlock

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

#### Responses

##### Status: 200 Array of items

###### Content-Type: application/json

- **`data` (required)**

  `array`

  **Items:**

  `string`

**Example:**

```json
{
  "data": [
    ""
  ]
}
```

##### Status: 401 Unauthenticated

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 403 Authorization error

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 404 Not found

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

### Create a bio block

- **Method:** `POST`
- **Path:** `/spaces/{space}/bio/blocks`
- **Tags:** BioBlock

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

#### Request Body

##### Content-Type: application/json

- **`content` (required)**

  `array`

  **Items:**

  `string`

- **`type` (required)**

  `string`, possible values: `"link", "header", "social_icons", "text", "image", "embed"`

- **`is_visible`**

  `boolean`

**Example:**

```json
{
  "type": "link",
  "content": [
    ""
  ],
  "is_visible": true
}
```

#### Responses

##### Status: 200

###### Content-Type: application/json

**Example:**

```json
{}
```

##### Status: 401 Unauthenticated

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 403 Authorization error

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 404 Not found

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 422 Validation error

###### Content-Type: application/json

- **`errors` (required)**

  `object` — A detailed description of each field that failed validation.

- **`message` (required)**

  `string` — Errors overview.

**Example:**

```json
{
  "message": "",
  "errors": {
    "additionalProperty": [
      ""
    ]
  }
}
```

### Update a bio block

- **Method:** `PUT`
- **Path:** `/spaces/{space}/bio/blocks/{block}`
- **Tags:** BioBlock

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

##### `block` required

- **In:** `path`

The block ID

`integer`

#### Request Body

##### Content-Type: application/json

- **`content`**

  `array`

  **Items:**

  `string`

- **`is_visible`**

  `boolean`

**Example:**

```json
{
  "content": [
    ""
  ],
  "is_visible": true
}
```

#### Responses

##### Status: 200 \`BioBlockResource\`

###### Content-Type: application/json

**Any of:**

- **`data` (required)**

  `object`

  - **`content` (required)**

    `array`

    **Items:**

  - **`id` (required)**

    `integer`

  - **`is_visible` (required)**

    `boolean`

  - **`sort_order` (required)**

    `integer`

  - **`type` (required)**

    `string`

  - **`embed`**

    `string`

  - **`image_url`**

    `string`

**Example:**

```json
{
  "data": {
    "id": 1,
    "type": "",
    "content": [],
    "sort_order": 1,
    "is_visible": true,
    "image_url": "",
    "embed": ""
  }
}
```

##### Status: 401 Unauthenticated

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 403 Authorization error

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 404 Not found

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 422 Validation error

###### Content-Type: application/json

- **`errors` (required)**

  `object` — A detailed description of each field that failed validation.

- **`message` (required)**

  `string` — Errors overview.

**Example:**

```json
{
  "message": "",
  "errors": {
    "additionalProperty": [
      ""
    ]
  }
}
```

### Delete a bio block

- **Method:** `DELETE`
- **Path:** `/spaces/{space}/bio/blocks/{block}`
- **Tags:** BioBlock

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

##### `block` required

- **In:** `path`

The block ID

`integer`

#### Responses

##### Status: 200

###### Content-Type: application/json

**Example:**

```json
{}
```

##### Status: 401 Unauthenticated

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 403 Authorization error

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 404 Not found

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

### Reorder the bio page's content blocks

- **Method:** `POST`
- **Path:** `/spaces/{space}/bio/blocks/reorder`
- **Tags:** BioBlock

Writes each block's sort\_order to match its position in the given id list. Ids that do not belong to the space's bio page are ignored.

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

#### Request Body

##### Content-Type: application/json

- **`blocks` (required)**

  `array`

  **Items:**

  `integer`

**Example:**

```json
{
  "blocks": [
    1
  ]
}
```

#### Responses

##### Status: 200

###### Content-Type: application/json

**Example:**

```json
{}
```

##### Status: 401 Unauthenticated

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 403 Authorization error

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 404 Not found

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 422 Validation error

###### Content-Type: application/json

- **`errors` (required)**

  `object` — A detailed description of each field that failed validation.

- **`message` (required)**

  `string` — Errors overview.

**Example:**

```json
{
  "message": "",
  "errors": {
    "additionalProperty": [
      ""
    ]
  }
}
```
