# Zilfu — Accounts

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

## Servers

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

## Operations

### List accounts

- **Method:** `GET`
- **Path:** `/spaces/{space}/accounts`
- **Tags:** Account

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

#### Responses

##### Status: 200 Array of \`AccountResource\`

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

- **`data` (required)**

  `array`

  **Items:**

  - **`avatar` (required)**

    `string | null`

  - **`disconnected_at` (required)**

    `string`

  - **`display_name` (required)**

    `string`

  - **`handler` (required)**

    `string`

  - **`id` (required)**

    `integer`

  - **`is_active` (required)**

    `boolean`

  - **`profile_url` (required)**

    `string`

  - **`quota_parked_at` (required)**

    `string` — When the account was parked because the plan no longer covers it. Null when the account is active, and null when the user deactivated it themselves.

  - **`social` (required)**

    `string`

  - **`unavailable_capabilities` (required)**

    `array` — Features unavailable on this connection until it is reconnected.

    **Items:**

**Example:**

```json
{
  "data": [
    {
      "id": 1,
      "social": "",
      "display_name": "",
      "handler": "",
      "profile_url": "",
      "avatar": null,
      "is_active": true,
      "quota_parked_at": "",
      "disconnected_at": "",
      "unavailable_capabilities": []
    }
  ]
}
```

##### 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": ""
}
```

### List Pinterest boards

- **Method:** `GET`
- **Path:** `/spaces/{space}/accounts/{account}/boards`
- **Tags:** Account

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

##### `account` required

- **In:** `path`

The account ID

`integer`

#### Responses

##### Status: 200

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

- **`data` (required)**

  `array`

  **Items:**

  - **`description` (required)**

    `string | null`

  - **`id` (required)**

    `string`

  - **`image` (required)**

    `string | null`

  - **`name` (required)**

    `string`

**Example:**

```json
{
  "data": [
    {
      "id": "",
      "name": "",
      "description": null,
      "image": null
    }
  ]
}
```

##### 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": ""
}
```

### Activate or deactivate an account

- **Method:** `PATCH`
- **Path:** `/spaces/{space}/accounts/{account}`
- **Tags:** Account

Deactivating parks the account: it stops publishing and disappears from the composer and the bio page, while the connection itself, its posts and its analytics stay intact. Activating one again is refused when your plan has no free slot left, since a parked account still occupies one.

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

##### `account` required

- **In:** `path`

The account ID

`integer`

#### Request Body

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

- **`is_active` (required)**

  `boolean` — Whether the account is active. An inactive account is parked, not disconnected: it publishes nothing and disappears from the composer and the bio page, while its connection, posts and analytics survive untouched.

**Example:**

```json
{
  "is_active": true
}
```

#### Responses

##### Status: 200 \`AccountResource\`

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

**Any of:**

- **`data` (required)**

  `object`

  - **`avatar` (required)**

    `string | null`

  - **`disconnected_at` (required)**

    `string`

  - **`display_name` (required)**

    `string`

  - **`handler` (required)**

    `string`

  - **`id` (required)**

    `integer`

  - **`is_active` (required)**

    `boolean`

  - **`profile_url` (required)**

    `string`

  - **`quota_parked_at` (required)**

    `string` — When the account was parked because the plan no longer covers it. Null when the account is active, and null when the user deactivated it themselves.

  - **`social` (required)**

    `string`

  - **`unavailable_capabilities` (required)**

    `array` — Features unavailable on this connection until it is reconnected.

    **Items:**

**Example:**

```json
{
  "data": {
    "id": 1,
    "social": "",
    "display_name": "",
    "handler": "",
    "profile_url": "",
    "avatar": null,
    "is_active": true,
    "quota_parked_at": "",
    "disconnected_at": "",
    "unavailable_capabilities": []
  }
}
```

##### 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": [
      ""
    ]
  }
}
```

### Disconnect an account

- **Method:** `DELETE`
- **Path:** `/spaces/{space}/accounts/{account}`
- **Tags:** Account

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

##### `account` required

- **In:** `path`

The account 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": ""
}
```
