# Custom Fields

Create, read, update, and delete custom fields. Custom fields define the data collection type for survey questions.

## List custom fields

> Returns a paginated list of custom fields for the program. Supports searching by name or ID and filtering by display type.<br>

```json
{"openapi":"3.1.0","info":{"title":"Surveys","version":"v14"},"tags":[{"name":"Custom Fields","description":"Create, read, update, and delete custom fields. Custom fields define the data collection type for survey questions.\n"}],"servers":[{"url":"https://api.impact.com","description":"impact.com API"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication. Use your Account SID as the username and your Auth Token as the password.\n"}},"parameters":{"Page":{"name":"Page","in":"query","required":false,"description":"Page number (1-based).","schema":{"type":"integer","default":1}},"PageSize":{"name":"PageSize","in":"query","required":false,"description":"Number of results per page.","schema":{"type":"integer","default":50}}},"schemas":{"CustomFieldListResponse":{"type":"object","properties":{"Page":{"type":"integer"},"PageSize":{"type":"integer"},"TotalCount":{"type":"integer"},"CustomFields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}}}},"CustomField":{"type":"object","description":"A custom field that defines the data collection type for a survey question. For selection-based display types (drop-down, single-select, multi-select), `Enumerations` lists the available options.\n","properties":{"Id":{"type":"integer","format":"int64"},"Name":{"type":"string"},"Description":{"type":"string"},"DisplayType":{"type":"string","description":"The data collection type, returned as the internal value: `paragraph`, `number`, `date_picker`, `dropdown`, `multiple_choice` (single-select), `multiple_checkbox` (multi-select), or `file`.\n"},"Enumerations":{"type":"array","items":{"$ref":"#/components/schemas/Enumeration"}}}},"Enumeration":{"type":"object","description":"An allowed value for a selection-based custom field.","properties":{"Id":{"type":"integer","format":"int64"},"Value":{"type":"string"}}}},"responses":{"ServerError":{"description":"Internal server error."}}},"paths":{"/Advertisers/{AccountSid}/Programs/{ProgramId}/CustomFields":{"get":{"tags":["Custom Fields"],"operationId":"listCustomFields","summary":"List custom fields","description":"Returns a paginated list of custom fields for the program. Supports searching by name or ID and filtering by display type.\n","parameters":[{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"},{"name":"Query","in":"query","required":false,"description":"Search query to filter by custom field name or ID.","schema":{"type":"string"}},{"name":"DisplayTypes","in":"query","required":false,"description":"Filter by display types. See the DisplayType field for accepted values.","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true}],"responses":{"200":{"description":"A paginated list of custom fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldListResponse"}}}},"404":{"description":"Campaign not found."},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## Create a custom field

> Creates a custom field. For enumeration-based display types, provide the option values in \`Enumerations\`.<br>

```json
{"openapi":"3.1.0","info":{"title":"Surveys","version":"v14"},"tags":[{"name":"Custom Fields","description":"Create, read, update, and delete custom fields. Custom fields define the data collection type for survey questions.\n"}],"servers":[{"url":"https://api.impact.com","description":"impact.com API"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication. Use your Account SID as the username and your Auth Token as the password.\n"}},"schemas":{"CreateCustomFieldRequest":{"type":"object","required":["Name","DisplayType"],"properties":{"Name":{"type":"string","description":"Name of the custom field."},"Description":{"type":"string","description":"Description of the custom field."},"DisplayType":{"type":"string","description":"Display type, supplied as a UI label. Matching is case-insensitive and accepts spaces, hyphens, or underscores as word separators (e.g. `Single-select`, `single select`, and `SINGLE_SELECT` are equivalent). Accepted UI labels and the internal values they map to: `Paragraph` → `paragraph` (multi-line text), `Number` → `number` (numeric input), `Datepicker` → `date_picker` (date picker), `Dropdown list` → `dropdown` (single-select dropdown), `Single-select` → `multiple_choice` (single-select radio/choice), `Multi-select` → `multiple_checkbox` (multi-select checkbox), `File` → `file` (file upload).\n"},"Enumerations":{"type":"array","description":"List of enumeration values, for enumeration-based display types.","items":{"type":"string"}}}},"CustomFieldEnvelope":{"type":"object","description":"Success envelope returned when a custom field is created.","properties":{"Status":{"type":"string"},"Body":{"$ref":"#/components/schemas/CustomField"}}},"CustomField":{"type":"object","description":"A custom field that defines the data collection type for a survey question. For selection-based display types (drop-down, single-select, multi-select), `Enumerations` lists the available options.\n","properties":{"Id":{"type":"integer","format":"int64"},"Name":{"type":"string"},"Description":{"type":"string"},"DisplayType":{"type":"string","description":"The data collection type, returned as the internal value: `paragraph`, `number`, `date_picker`, `dropdown`, `multiple_choice` (single-select), `multiple_checkbox` (multi-select), or `file`.\n"},"Enumerations":{"type":"array","items":{"$ref":"#/components/schemas/Enumeration"}}}},"Enumeration":{"type":"object","description":"An allowed value for a selection-based custom field.","properties":{"Id":{"type":"integer","format":"int64"},"Value":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error envelope returned by custom field write operations.","properties":{"Status":{"type":"string"},"Message":{"type":"string","description":"Human-readable error description."}}}},"responses":{"ServerError":{"description":"Internal server error."}}},"paths":{"/Advertisers/{AccountSid}/Programs/{ProgramId}/CustomFields":{"post":{"tags":["Custom Fields"],"operationId":"createCustomField","summary":"Create a custom field","description":"Creates a custom field. For enumeration-based display types, provide the option values in `Enumerations`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomFieldRequest"}}}},"responses":{"201":{"description":"The created custom field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldEnvelope"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## Get a custom field

> Returns the details of a single custom field.

```json
{"openapi":"3.1.0","info":{"title":"Surveys","version":"v14"},"tags":[{"name":"Custom Fields","description":"Create, read, update, and delete custom fields. Custom fields define the data collection type for survey questions.\n"}],"servers":[{"url":"https://api.impact.com","description":"impact.com API"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication. Use your Account SID as the username and your Auth Token as the password.\n"}},"schemas":{"CustomField":{"type":"object","description":"A custom field that defines the data collection type for a survey question. For selection-based display types (drop-down, single-select, multi-select), `Enumerations` lists the available options.\n","properties":{"Id":{"type":"integer","format":"int64"},"Name":{"type":"string"},"Description":{"type":"string"},"DisplayType":{"type":"string","description":"The data collection type, returned as the internal value: `paragraph`, `number`, `date_picker`, `dropdown`, `multiple_choice` (single-select), `multiple_checkbox` (multi-select), or `file`.\n"},"Enumerations":{"type":"array","items":{"$ref":"#/components/schemas/Enumeration"}}}},"Enumeration":{"type":"object","description":"An allowed value for a selection-based custom field.","properties":{"Id":{"type":"integer","format":"int64"},"Value":{"type":"string"}}}},"responses":{"ServerError":{"description":"Internal server error."}}},"paths":{"/Advertisers/{AccountSid}/Programs/{ProgramId}/CustomFields/{CustomFieldId}":{"get":{"tags":["Custom Fields"],"operationId":"getCustomField","summary":"Get a custom field","description":"Returns the details of a single custom field.","responses":{"200":{"description":"The requested custom field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField"}}}},"400":{"description":"Invalid request."},"404":{"description":"Custom field not found."},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## Delete a custom field

> Deletes a custom field.

```json
{"openapi":"3.1.0","info":{"title":"Surveys","version":"v14"},"tags":[{"name":"Custom Fields","description":"Create, read, update, and delete custom fields. Custom fields define the data collection type for survey questions.\n"}],"servers":[{"url":"https://api.impact.com","description":"impact.com API"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication. Use your Account SID as the username and your Auth Token as the password.\n"}},"schemas":{"StatusResponse":{"type":"object","properties":{"Status":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error envelope returned by custom field write operations.","properties":{"Status":{"type":"string"},"Message":{"type":"string","description":"Human-readable error description."}}}},"responses":{"ServerError":{"description":"Internal server error."}}},"paths":{"/Advertisers/{AccountSid}/Programs/{ProgramId}/CustomFields/{CustomFieldId}":{"delete":{"tags":["Custom Fields"],"operationId":"deleteCustomField","summary":"Delete a custom field","description":"Deletes a custom field.","responses":{"200":{"description":"The custom field was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"404":{"description":"Custom field not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## Update a custom field

> Updates the name and/or description of a custom field.

```json
{"openapi":"3.1.0","info":{"title":"Surveys","version":"v14"},"tags":[{"name":"Custom Fields","description":"Create, read, update, and delete custom fields. Custom fields define the data collection type for survey questions.\n"}],"servers":[{"url":"https://api.impact.com","description":"impact.com API"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication. Use your Account SID as the username and your Auth Token as the password.\n"}},"schemas":{"UpdateCustomFieldRequest":{"type":"object","description":"Only the fields provided are updated.","properties":{"Name":{"type":"string","description":"Updated name of the custom field."},"Description":{"type":"string","description":"Updated description of the custom field."}}},"StatusResponse":{"type":"object","properties":{"Status":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error envelope returned by custom field write operations.","properties":{"Status":{"type":"string"},"Message":{"type":"string","description":"Human-readable error description."}}}},"responses":{"ServerError":{"description":"Internal server error."}}},"paths":{"/Advertisers/{AccountSid}/Programs/{ProgramId}/CustomFields/{CustomFieldId}":{"patch":{"tags":["Custom Fields"],"operationId":"updateCustomField","summary":"Update a custom field","description":"Updates the name and/or description of a custom field.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomFieldRequest"}}}},"responses":{"200":{"description":"The custom field was updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Custom field not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrations.impact.com/brand-api-reference/reference/surveys-and-custom-fields/custom-fields.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
