API reference › Forms

List selectable form fields

GET /v1/forms/fields

Scope
forms:read
Roles
admin, scheduler

Retrieve default (module-specific) or custom (org-wide reusable) field definitions for the form builder's field picker. For options=custom, each item is annotated with usage stats (active/historical forms, submission count) so the caller can build its own delete or archive confirmation.

Parameters

Query parameters

NameTypeDescription
options requiredstring

Which set of fields to return.

One of: default, custom.

modulestring

Module key, required when options=default.

One of: assignment, shift, client, consumer, service_provider, client_location, client_request, consumer_request, request, contact.

typestring

When module=request, disambiguates to client_request or consumer_request.

One of: client, consumer.

assignTostring

For assignment/shift default fields: 'client' or 'organization'.

One of: client, organization.

Every call also sends Authorization and X-Tenant-ID; see Getting started.

Example request

Shell
curl "https://api.fetchfido.ai/v1/forms/fields?options=" \
  -H "Authorization: Bearer $FIDO_API_KEY" \
  -H "X-Tenant-ID: $FIDO_TENANT_ID"

Try it

Responses

200 Successful operation

Successful operation

JSON
{
  "success": true,
  "data": [
    {
      "id": 1,
      "fieldId": 1,
      "fieldKey": "string",
      "label": "string",
      "type": "string",
      "module": "string",
      "isDefault": true,
      "isRequired": true,
      "isVisible": true,
      "isArchived": true,
      "order": 1,
      "settings": [],
      "isAlreadyUsed": true,
      "activeFormsCount": "string",
      "historicalFormsCount": "string",
      "submissionsCount": "string",
      "canPermanentlyDelete": true,
      "canArchive": true,
      "activeForms": [],
      "historicalForms": []
    }
  ]
}
Response fields (22)

2 top-level fields; 1 hold nested fields, listed below.

FieldTypeDescription
successboolean

Example true.

dataarray of object (20 nested)

Nested fields

data 20 fields
FieldTypeDescription
data[].idinteger

Example 1.

data[].fieldIdinteger

Example 1.

data[].fieldKeystring

Example string.

data[].labelstring

Example string.

data[].typestring

Example string.

data[].modulestring

Example string.

data[].isDefaultboolean

Example true.

data[].isRequiredboolean

Example true.

data[].isVisibleboolean

Example true.

data[].isArchivedboolean

Example true.

data[].orderinteger

Example 1.

data[].settingsarray of object
data[].isAlreadyUsedboolean

Example true.

data[].activeFormsCountstring

Example string.

data[].historicalFormsCountstring

Example string.

data[].submissionsCountstring

Example string.

data[].canPermanentlyDeleteboolean

Example true.

data[].canArchiveboolean

Example true.

data[].activeFormsarray of object
data[].historicalFormsarray of object
401 Not signed in

Missing, invalid or expired API key.

JSON
{
  "success": false,
  "message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
  "errors": null,
  "code": "API_KEY_MISSING"
}
Response fields (4)
FieldTypeDescription
successboolean

Example false.

messagestring

Example Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED. Example API_KEY_MISSING.

403 Not allowed

Scope, tenant, IP allow-list or RBAC check failed.

JSON
{
  "success": false,
  "message": "You don't have permission to access this endpoint. This API key is missing the 'forms:read' scope.",
  "errors": null,
  "code": ""
}
Response fields (4)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You don't have permission to access this endpoint. This API key is missing the 'forms:read' scope..

errorsany or null

Null on this status.

codestring

Always empty on this status.

Example .

422 Validation failed

Validation failed

JSON
{
  "success": false,
  "message": "Unable to save. Please check the highlighted fields",
  "errors": null,
  "code": ""
}
Response fields (4)
FieldTypeDescription
successboolean

Example false.

messagestring

Example Unable to save. Please check the highlighted fields.

errorsany or null

Details when the handler has them — a field-keyed object, a single string, or null.

codestring

Empty unless the handler sets one.

Example .

429 Too many requests

Rate limit exceeded. See Retry-After.

JSON
{
  "success": false,
  "message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
  "errors": null,
  "code": "RATE_LIMITED"
}
Response fields (4)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: RATE_LIMITED. Example RATE_LIMITED.