# Get a connector module form

> The form of an action or trigger, for the connection and values chosen so far (the form changes as it is filled), and the options of the dropdowns asked for: the form a workflow step or a run of the action is filled from. No workflow is needed. A read: nothing is saved.

Source: https://docs.stacksync.com/api-reference/connectors/get_connector_module_form

`POST https://api.stacksync.com/v1/workspaces/{workspace_id}/workflows/modules/forms`

- Operation: `get_connector_module_form`
- Resource: Connectors
- Access: writes data

## Authentication

- `Authorization: Bearer <key>`: A workspace API key (workspace_…, created by a workspace owner under Workspace settings > Stacksync API) acts with editor rights on that workspace only; a user API key (user_…, created under Profile > Stacksync API) acts as that user in every workspace they belong to. POST, PUT and PATCH requests must send Content-Type: application/json. Every authentication failure answers 403.
- `Content-Type: application/json` on every request with a body.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | integer | Yes | The workspace. List the ones your key can reach with GET /v1/workspaces. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `region` | string (besg \| usnv) | Yes | Region whose catalog to read: besg or usnv |

## Request body

`application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `module_id` | string, at least 1 characters | Yes | The module, from GET .../workflows/modules/apps/<app_type> |
| `module_version` | string, at least 1 characters | Yes | The module version, from the same answer |
| `connection_id` | string (uuid) \| null | No | The connection the step uses, from GET .../connections (same region); None before one is chosen |
| `values` | object \| null | No | The form values chosen so far: the form can change with them |
| `dropdown_ids` | array of string \| null | No | The dropdowns whose options to load, from dropdown_ids of a previous answer |

## Returns

### 200 OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `input_schema` | object \| null | Yes | The JSON schema of the step's values; a field whose options come from the app names them in dropdown_ids |
| `connection_requirement` | object (ConnectionRequirement) \| null | Yes |  |
| `connection_requirement.is_required` | boolean | Yes |  |
| `connection_requirement.app_types` | array of string | Yes |  |
| `dropdown_ids` | array of string | Yes | Every dropdown the form declares |
| `dropdowns` | array of object (Dropdown) | Yes | The options of the dropdowns asked for |
| `dropdowns[].dropdown_id` | string | Yes |  |
| `dropdowns[].options` | array of object (DropdownOption) | Yes |  |
| `dropdowns[].options[].value` | any | Yes |  |
| `dropdowns[].options[].label` | any | Yes |  |
| `dropdowns[].has_more_options` | boolean | Yes |  |

## Example request

```bash
curl -X POST "https://api.stacksync.com/v1/workspaces/{workspace_id}/workflows/modules/forms?region=usnv" \
  -H "Authorization: Bearer $STACKSYNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "module_id": "<module_id>",
  "module_version": "<module_version>"
}'
```

## Example response (200)

```json
{
  "input_schema": {},
  "connection_requirement": {
    "is_required": false,
    "app_types": [
      "<app_types>"
    ]
  },
  "dropdown_ids": [
    "<dropdown_ids>"
  ],
  "dropdowns": [
    {
      "dropdown_id": "<dropdown_id>",
      "options": [
        {
          "value": "<value>",
          "label": "<label>"
        }
      ],
      "has_more_options": false
    }
  ]
}
```

## Errors

| Status | Meaning | Body |
| --- | --- | --- |
| 400 | Bad Request | `{ "error": string, "msg": string, "field": string \| null }` |
| 403 | Forbidden | `{ "error": string, "msg": string, "field": string \| null }` |
| 409 | Conflict | `{ "error": string, "msg": string, "field": string \| null }` |

## Related

- [API Reference overview](https://docs.stacksync.com/api-reference): base URLs, regions, pagination, idempotency and errors
- [Authentication](https://docs.stacksync.com/api-reference/authentication): API keys and the 403 answers
- OpenAPI document: https://docs.stacksync.com/openapi.json
- [List connector apps](https://docs.stacksync.com/api-reference/connectors/list_connector_apps)
- [Get a connector app](https://docs.stacksync.com/api-reference/connectors/get_connector_app)
- [Run an action](https://docs.stacksync.com/api-reference/connectors/run_connector_module)