<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/online-api/forms/list-form-fields

# List Form Fields

`GET https://online.99digital.co.il/api/v1/accounts/{account_id}/forms/{form_id}/fields`

Returns the form's fields in a normalised format, as used by automation rules.

This is the format of the "Form response" conditions of automation rules, for
the `form_response_submitted` event. For the fields as the form defines them,
use [Get a Form](https://docs.99digital.co.il/online-api/forms/get-a-form). How forms work, and the errors
every Forms endpoint can return, are explained in
[List Forms](https://docs.99digital.co.il/online-api/forms/list-forms).

| Setting | Value |
| --- | --- |
| **Method** | `GET` |
| **Path** | `/api/v1/accounts/{account_id}/forms/{form_id}/fields` |

**Permissions:**

- User token: on accounts with the new rules system, **Forms → read**.
  Accounts on the legacy role system are not restricted.
- Agent-bot token: allowed.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | integer | Yes | Account ID. |
| `form_id` | string | Yes | Form `publicId`. |

**Example request**

```bash
curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/forms/45/fields' \
  -H 'api_access_token: <YOUR_API_ACCESS_TOKEN>'
```

**Example response** (`200 OK`)

```json
{
  "fields": [
    { "key": "text", "name": "Full name", "type": "plain_text", "options": [] },
    { "key": "number", "name": "Age", "type": "number", "options": [] },
    { "key": "email", "name": "Email", "type": "plain_text", "options": [] }
  ]
}
```

`type` is the automation-condition type (`plain_text`, `number`, `list`, ...);
`options` lists the choices of select-type fields.

**Error responses**: the common Forms errors (`403`, `404`, `500`, `502`,
`503`) listed in [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms).

## Authentication

`api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication).

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. |
| `form_id` | path | string | Yes | The form's `publicId`, as returned by [List Forms](https://docs.99digital.co.il/online-api/forms/list-forms). Example: `45`. |

## Responses

### 200 — The form's fields.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `fields` | array of object | The form's fields. |
| `fields[].key` | string | The field's ID — the `id` of the field in [Get a Form](https://docs.99digital.co.il/online-api/forms/get-a-form). |
| `fields[].name` | string | The field's label, as shown on the form. |
| `fields[].type` | string | The automation-condition type, for example `plain_text`, `number` or `list`. |
| `fields[].options` | array | The choices of a select-type field; empty for other fields. |

#### Example

```json
{
  "fields": [
    {
      "key": "text",
      "name": "Full name",
      "type": "plain_text",
      "options": []
    },
    {
      "key": "number",
      "name": "Age",
      "type": "number",
      "options": []
    },
    {
      "key": "email",
      "name": "Email",
      "type": "plain_text",
      "options": []
    }
  ]
}
```

### 401 — The access token is missing or wrong, or its user does not belong to this account.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message. |

#### Example: Invalid token

The api_access_token header is missing or wrong.

```json
{
  "error": "Invalid Access Token"
}
```

#### Example: Another account

A valid token, for a user who is not in this account.

```json
{
  "error": "You are not authorized to access this account"
}
```

### 403 — Forms is not enabled for the account, or (new rules system) the role lacks **Forms → read**.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message: `Forms is not enabled for this account`, or `You are not authorized to do this action` when the role lacks the permission. |

#### Example: Forms not enabled

The account does not have Forms.

```json
{
  "error": "Forms is not enabled for this account"
}
```

#### Example: No permission

The role lacks Forms → read.

```json
{
  "error": "You are not authorized to do this action"
}
```

### 404 — The form was not found in the Forms app.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message from the Forms app: `Not found`. |

#### Example

```json
{
  "error": "Not found"
}
```

### 500 — An unexpected error while talking to the Forms app.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | What failed, as `<context>: <details>`. |

#### Example

```json
{
  "error": "<context>: <details>"
}
```

### 502 — The Forms app returned an error. `error` describes it.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message, which says what failed. |

### 503 — The Forms integration is not configured on the server.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message: `Forms is not configured on this server`. |

#### Example

```json
{
  "error": "Forms is not configured on this server"
}
```
