# List choices for a node field (/docs/api-reference/workflows/listWorkflowFieldOptions)

> The choices for one `ref` field of a node type, such as the phone numbers, agents or integrations in your account. Call it for every `ref` field and never guess an id. If it returns `400 no_options`, the field is not chosen from a list, so ask the user for the value.


> **Workflow builder.** Included from the Jump Starter plan. [See plans](https://omnidim.io/pricing).

**GET** `/workflow-node-types/{node_type}/options/{field}`

The choices for one `ref` field of a node type, such as the phone numbers, agents or integrations in your account. Call it for every `ref` field and never guess an id. If it returns `400 no_options`, the field is not chosen from a list, so ask the user for the value.

```yaml
operationId: listWorkflowFieldOptions
parameters:
  - in: path
    name: node_type
    required: true
    schema:
      type: string
    description: A node type from `listWorkflowNodeTypes`, such as `whatsapp`.
  - in: path
    name: field
    required: true
    schema:
      type: string
    description: A field name from `getWorkflowNodeType`.
  - in: query
    name: user_id
    required: false
    description: |
      Reseller keys only: the id of one of your direct client users. The
      call then acts as that client, on that client's agents, numbers,
      campaigns and balance. Calls, sessions and bulk campaigns spend that
      client's balance and concurrency. Omit it to act on your own account.
      An empty value, `0`, `false` or your own user id also means your own
      account. Any other value that is not a positive integer id is
      refused with `400 invalid_request`. A key that is not a reseller's
      gets `403` when it names someone else. A user who is not your
      direct client gets `404`.
    schema:
      type: integer
      description: |
        Reseller keys only: the id of one of your direct client users. The
        call then acts as that client, on that client's agents, numbers,
        campaigns and balance. Calls, sessions and bulk campaigns spend that
        client's balance and concurrency. Omit it to act on your own account.
        Send it as a JSON integer in the body. `null`, `0`, `false` or your
        own user id also means your own account. Any other value that is not
        a positive integer id is refused with `400 invalid_request`. A key
        that is not a reseller's gets `403` when it names someone else. A
        user who is not your direct client gets `404`.
      example: 1234
  - in: query
    name: depends
    schema:
      type: integer
    description: >-
      The value of the field this one depends on (`depends_on` in the node type), such as the chosen
      phone number id.
responses:
  '200':
    description: Up to 100 choices.
    content:
      application/json:
        schema:
          type: object
          properties:
            options:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: integer
                    description: The value to put in the field.
                  label:
                    type: string
  '400':
    description: The field is not chosen from a list (`no_options`), or `depends` is not an id.
    content:
      application/json:
        schema:
          type: object
          description: |
            The v1 error envelope. Some errors add keys: `errors` (validation
            issues), `op_index` and `hint` (a refused op), `revision` (the current
            revision after a conflict).
          properties:
            error:
              type: string
              description: Machine-readable error code, such as `revision_conflict`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason. Present on 400 errors and auth errors.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            errors:
              type: array
              description: On `validation_failed`, the issues that blocked the request.
              items:
                type: object
                description: One problem found in a draft.
                properties:
                  code:
                    type: string
                    description: >
                      Stable issue code. `not_found`: an id is not in this workspace, pick one with

                      `listWorkflowFieldOptions`. `templated_ref`: an id field holds a `{{ }}`
                      template; ids

                      must be literal. Others include `missing_field`, `bad_option`, `bad_handle`,

                      `unreachable`, `trigger_count`, `unknown_type`, `unknown_reference` and
                      `malformed`.
                  message:
                    type: string
                  node:
                    type: string
                    nullable: true
                    description: Id of the node the issue is about, if any.
                  field:
                    type: string
                    nullable: true
                    description: Config field the issue is about, if any.
                  hint:
                    type: string
                    nullable: true
                    description: What to do to fix it.
            op_index:
              type: integer
              description: On `invalid_op`, the zero-based position of the op that failed.
            hint:
              type: string
              description: On `invalid_op`, what to do next.
            revision:
              type: string
              description: On `revision_conflict`, the current revision of the draft.
        example:
          error: no_options
          error_description: '''to_number'' is not chosen from a list here. Ask the user for the value.'
          request_id: req_5d9a1f3e8b02
  '401':
    description: Missing or invalid API key.
    content:
      application/json:
        schema:
          type: object
          description: |
            The v1 error envelope. Some errors add keys: `errors` (validation
            issues), `op_index` and `hint` (a refused op), `revision` (the current
            revision after a conflict).
          properties:
            error:
              type: string
              description: Machine-readable error code, such as `revision_conflict`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason. Present on 400 errors and auth errors.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            errors:
              type: array
              description: On `validation_failed`, the issues that blocked the request.
              items:
                type: object
                description: One problem found in a draft.
                properties:
                  code:
                    type: string
                    description: >
                      Stable issue code. `not_found`: an id is not in this workspace, pick one with

                      `listWorkflowFieldOptions`. `templated_ref`: an id field holds a `{{ }}`
                      template; ids

                      must be literal. Others include `missing_field`, `bad_option`, `bad_handle`,

                      `unreachable`, `trigger_count`, `unknown_type`, `unknown_reference` and
                      `malformed`.
                  message:
                    type: string
                  node:
                    type: string
                    nullable: true
                    description: Id of the node the issue is about, if any.
                  field:
                    type: string
                    nullable: true
                    description: Config field the issue is about, if any.
                  hint:
                    type: string
                    nullable: true
                    description: What to do to fix it.
            op_index:
              type: integer
              description: On `invalid_op`, the zero-based position of the op that failed.
            hint:
              type: string
              description: On `invalid_op`, what to do next.
            revision:
              type: string
              description: On `revision_conflict`, the current revision of the draft.
        example:
          error: unauthorized
          error_description: Missing or invalid API key
          code: invalid_api_key
          request_id: req_6e2b9d4f1a38
  '403':
    description: |
      The Workflow Builder is not enabled for this account
      (`feature_not_enabled`), or your API key's user cannot make this
      change (`permission_denied`). The Workflow Builder must be included in
      your plan.
    content:
      application/json:
        schema:
          type: object
          description: |
            The v1 error envelope. Some errors add keys: `errors` (validation
            issues), `op_index` and `hint` (a refused op), `revision` (the current
            revision after a conflict).
          properties:
            error:
              type: string
              description: Machine-readable error code, such as `revision_conflict`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason. Present on 400 errors and auth errors.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            errors:
              type: array
              description: On `validation_failed`, the issues that blocked the request.
              items:
                type: object
                description: One problem found in a draft.
                properties:
                  code:
                    type: string
                    description: >
                      Stable issue code. `not_found`: an id is not in this workspace, pick one with

                      `listWorkflowFieldOptions`. `templated_ref`: an id field holds a `{{ }}`
                      template; ids

                      must be literal. Others include `missing_field`, `bad_option`, `bad_handle`,

                      `unreachable`, `trigger_count`, `unknown_type`, `unknown_reference` and
                      `malformed`.
                  message:
                    type: string
                  node:
                    type: string
                    nullable: true
                    description: Id of the node the issue is about, if any.
                  field:
                    type: string
                    nullable: true
                    description: Config field the issue is about, if any.
                  hint:
                    type: string
                    nullable: true
                    description: What to do to fix it.
            op_index:
              type: integer
              description: On `invalid_op`, the zero-based position of the op that failed.
            hint:
              type: string
              description: On `invalid_op`, what to do next.
            revision:
              type: string
              description: On `revision_conflict`, the current revision of the draft.
        example:
          error: forbidden
          error_description: You do not have permission to use Workflows.
          code: feature_not_enabled
          request_id: req_9f2c1a4b7d3e
  '404':
    description: No workflow, node type or run with that id in your account.
    content:
      application/json:
        schema:
          type: object
          description: |
            The v1 error envelope. Some errors add keys: `errors` (validation
            issues), `op_index` and `hint` (a refused op), `revision` (the current
            revision after a conflict).
          properties:
            error:
              type: string
              description: Machine-readable error code, such as `revision_conflict`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason. Present on 400 errors and auth errors.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            errors:
              type: array
              description: On `validation_failed`, the issues that blocked the request.
              items:
                type: object
                description: One problem found in a draft.
                properties:
                  code:
                    type: string
                    description: >
                      Stable issue code. `not_found`: an id is not in this workspace, pick one with

                      `listWorkflowFieldOptions`. `templated_ref`: an id field holds a `{{ }}`
                      template; ids

                      must be literal. Others include `missing_field`, `bad_option`, `bad_handle`,

                      `unreachable`, `trigger_count`, `unknown_type`, `unknown_reference` and
                      `malformed`.
                  message:
                    type: string
                  node:
                    type: string
                    nullable: true
                    description: Id of the node the issue is about, if any.
                  field:
                    type: string
                    nullable: true
                    description: Config field the issue is about, if any.
                  hint:
                    type: string
                    nullable: true
                    description: What to do to fix it.
            op_index:
              type: integer
              description: On `invalid_op`, the zero-based position of the op that failed.
            hint:
              type: string
              description: On `invalid_op`, what to do next.
            revision:
              type: string
              description: On `revision_conflict`, the current revision of the draft.
        example:
          error: not_found
          error_description: No workflow with that id.
          request_id: req_2c8e7a1d9b40
```

**curl**

```bash
curl -X GET "https://backend.omnidim.io/api/v1/workflow-node-types/{node_type}/options/{field}?user_id=1234" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```