> For the complete documentation index, see [llms.txt](https://detected.gitbook.io/detected-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://detected.gitbook.io/detected-api-docs/api-reference/profiles/forms.md).

# Forms

The forms assigned to a profile. Assign an internal form, retrieve the forms and the answers given, and submit answers. A profile can have multiple forms assigned.

## List profile forms

> Returns the forms assigned to a profile, with the answers given. Use the query parameters to filter the results.

```json
{"openapi":"3.0.0","info":{"title":"Detected API","version":"v2"},"tags":[{"name":"Profile Forms","description":"The forms assigned to a profile. Assign an internal form, retrieve the forms and the answers given, and submit answers. A profile can have multiple forms assigned."}],"servers":[{"url":"https://api.detected.app/api/v2/public","description":"Production"}],"security":[{"AccessToken":[]}],"components":{"securitySchemes":{"AccessToken":{"type":"http","description":"The API uses OAuth 2.0. Request an access token with **Create an access token** (`POST /oauth/token`), sending the client ID and client secret of your integration client, and your account slug. Send the access token in the `Authorization` header of every request, in the format `Authorization: Bearer <access_token>`. The access token carries the scopes set on your integration client in the dashboard. Access tokens expire. When one expires, request a new one.","bearerFormat":"OAuth 2.0 access token","scheme":"bearer"}},"parameters":{"profileUuid":{"name":"uuid","in":"path","description":"UUID of the profile.","required":true,"schema":{"type":"string","format":"uuid","nullable":false}}},"headers":{"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the rate limit window.","schema":{"type":"number","nullable":false}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window.","schema":{"type":"number","nullable":false}},"Retry-After":{"description":"Number of seconds to wait before making another request. Returned when the rate limit has been reached.","schema":{"type":"number","nullable":false}},"X-RateLimit-Reset":{"description":"Unix timestamp (in seconds) at which the rate limit resets. Returned when the rate limit has been reached.","schema":{"type":"number","nullable":false}}},"schemas":{"EntityFormResource":{"title":"Assigned Form Resource","required":["id","label","answers","updated_at","created_at"],"properties":{"id":{"description":"Form ID.","type":"integer","nullable":false},"label":{"description":"Label of the form.","type":"string","nullable":false},"applies_to":{"description":"Where the form can be used: `internal_forms` for forms completed by the compliance team, or `entities` and `people` for customer-facing forms.","type":"array","items":{"type":"string"}},"reference":{"description":"Reference of the form.","type":"string","nullable":false},"answers":{"description":"Answers given to the form.","type":"array","items":{"properties":{"label":{"description":"Label of the question.","type":"string","nullable":false},"answer":{"description":"The answer given. Its type depends on the question: for example text, a list of choices, or an object describing an uploaded file."}},"type":"object"}},"updated_at":{"description":"Date and time the form was last updated.","type":"string","nullable":false},"created_at":{"description":"Date and time the form was created.","type":"string","nullable":false}},"type":"object"}},"responses":{"401":{"description":"Unauthorized. The access token is missing, invalid or has expired.","content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"}},"type":"object"}}}},"404":{"description":"Not Found. The requested resource does not exist, or is not available to your account.","content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"},"error":{"description":"Machine-readable details of the error.","type":"object","properties":{"key":{"description":"Error code, for example `error.generic`.","type":"string"},"params":{"description":"Values used in the error message, if any.","type":"array","items":{}}}}},"type":"object"}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Wait for the number of seconds given in the `Retry-After` header before trying again.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"}},"type":"object"}}}}}},"paths":{"/profiles/{uuid}/forms":{"get":{"tags":["Profile Forms"],"summary":"List profile forms","description":"Returns the forms assigned to a profile, with the answers given. Use the query parameters to filter the results.","operationId":"1888b40dd34ca5d3d6c50c8c6519d79f","parameters":[{"$ref":"#/components/parameters/profileUuid"},{"name":"id","in":"query","description":"Filter by form ID. If a match is found, only that form is returned.","schema":{"type":"integer"}},{"name":"label","in":"query","description":"Filter by form label.","schema":{"type":"string"}},{"name":"reference","in":"query","description":"Filter by form reference.","schema":{"type":"string"}},{"name":"applies_to","in":"query","description":"Filter by form type.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"properties":{"data":{"description":"List of forms","type":"array","items":{"$ref":"#/components/schemas/EntityFormResource"}}},"type":"object"}}}},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"}}}}}}
```

## Assign an internal form to a profile

> Assigns an internal form to a profile. Internal forms are completed by the compliance team. Customer-facing forms are set through the profile's portal configuration, with \*\*Update a profile portal configuration\*\* (\`PATCH /profiles/{uuid}/portal-configuration\`). This endpoint only assigns forms of type \`internal\_forms\`: if the form does not exist or is not an internal form, a validation error is returned.\
> \
> Send a single form ID in the request body. The latest version of the form is assigned. If that version is already assigned to the profile, it is skipped, so there are no duplicates.\
> \
> The response lists all the forms currently assigned to the profile, including the one you just assigned.

```json
{"openapi":"3.0.0","info":{"title":"Detected API","version":"v2"},"tags":[{"name":"Profile Forms","description":"The forms assigned to a profile. Assign an internal form, retrieve the forms and the answers given, and submit answers. A profile can have multiple forms assigned."}],"servers":[{"url":"https://api.detected.app/api/v2/public","description":"Production"}],"security":[{"AccessToken":[]}],"components":{"securitySchemes":{"AccessToken":{"type":"http","description":"The API uses OAuth 2.0. Request an access token with **Create an access token** (`POST /oauth/token`), sending the client ID and client secret of your integration client, and your account slug. Send the access token in the `Authorization` header of every request, in the format `Authorization: Bearer <access_token>`. The access token carries the scopes set on your integration client in the dashboard. Access tokens expire. When one expires, request a new one.","bearerFormat":"OAuth 2.0 access token","scheme":"bearer"}},"parameters":{"profileUuid":{"name":"uuid","in":"path","description":"UUID of the profile.","required":true,"schema":{"type":"string","format":"uuid","nullable":false}}},"schemas":{"AssignFormToProfileRequest":{"title":"Assign Form To Profile Request","required":["id"],"properties":{"id":{"description":"ID of the form to assign.","type":"number","nullable":false}},"type":"object"},"ShortFormResource":{"title":"Short Form Resource","required":["id","label","version","provider","archived","updated_at","created_at"],"properties":{"id":{"description":"Form ID.","type":"integer","nullable":false},"label":{"description":"Label of the form.","type":"string","nullable":false},"applies_to":{"description":"Where the form can be used: `internal_forms` for forms completed by the compliance team, or `entities` and `people` for customer-facing forms.","type":"array","items":{"type":"string"}},"reference":{"description":"Reference of the form.","type":"string","nullable":true},"version":{"description":"Latest version of the form.","type":"integer","nullable":false},"provider":{"description":"Form provider.","type":"string","enum":["vueform"],"nullable":false},"archived":{"description":"Whether the form is archived.","type":"boolean","enum":[false,true],"nullable":false},"updated_at":{"description":"Date and time the form was last updated.","type":"string","nullable":false},"created_at":{"description":"Date and time the form was created.","type":"string","nullable":false}},"type":"object"}},"headers":{"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the rate limit window.","schema":{"type":"number","nullable":false}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window.","schema":{"type":"number","nullable":false}},"Retry-After":{"description":"Number of seconds to wait before making another request. Returned when the rate limit has been reached.","schema":{"type":"number","nullable":false}},"X-RateLimit-Reset":{"description":"Unix timestamp (in seconds) at which the rate limit resets. Returned when the rate limit has been reached.","schema":{"type":"number","nullable":false}}},"responses":{"401":{"description":"Unauthorized. The access token is missing, invalid or has expired.","content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"}},"type":"object"}}}},"404":{"description":"Not Found. The requested resource does not exist, or is not available to your account.","content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"},"error":{"description":"Machine-readable details of the error.","type":"object","properties":{"key":{"description":"Error code, for example `error.generic`.","type":"string"},"params":{"description":"Values used in the error message, if any.","type":"array","items":{}}}}},"type":"object"}}}},"422":{"description":"Unprocessable Content. The request was understood but failed validation. `errors` lists each field that failed and why.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"description":"A human-readable description of the first error.","type":"string"},"errors":{"description":"Validation errors, keyed by the name of the field that failed. Each field has a list of messages.","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Wait for the number of seconds given in the `Retry-After` header before trying again.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"}},"type":"object"}}}}}},"paths":{"/profiles/{uuid}/forms":{"put":{"tags":["Profile Forms"],"summary":"Assign an internal form to a profile","description":"Assigns an internal form to a profile. Internal forms are completed by the compliance team. Customer-facing forms are set through the profile's portal configuration, with **Update a profile portal configuration** (`PATCH /profiles/{uuid}/portal-configuration`). This endpoint only assigns forms of type `internal_forms`: if the form does not exist or is not an internal form, a validation error is returned.\n\nSend a single form ID in the request body. The latest version of the form is assigned. If that version is already assigned to the profile, it is skipped, so there are no duplicates.\n\nThe response lists all the forms currently assigned to the profile, including the one you just assigned.","operationId":"47f67c8a1dea05a2327e88cdfe638954","parameters":[{"$ref":"#/components/parameters/profileUuid"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignFormToProfileRequest"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"properties":{"data":{"description":"List of forms assigned to profile","type":"array","items":{"$ref":"#/components/schemas/ShortFormResource"}}},"type":"object"}}}},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"}}}}}}
```

## Retrieve a profile form

> Returns a single form assigned to a profile, with the answers given.

```json
{"openapi":"3.0.0","info":{"title":"Detected API","version":"v2"},"tags":[{"name":"Profile Forms","description":"The forms assigned to a profile. Assign an internal form, retrieve the forms and the answers given, and submit answers. A profile can have multiple forms assigned."}],"servers":[{"url":"https://api.detected.app/api/v2/public","description":"Production"}],"security":[{"AccessToken":[]}],"components":{"securitySchemes":{"AccessToken":{"type":"http","description":"The API uses OAuth 2.0. Request an access token with **Create an access token** (`POST /oauth/token`), sending the client ID and client secret of your integration client, and your account slug. Send the access token in the `Authorization` header of every request, in the format `Authorization: Bearer <access_token>`. The access token carries the scopes set on your integration client in the dashboard. Access tokens expire. When one expires, request a new one.","bearerFormat":"OAuth 2.0 access token","scheme":"bearer"}},"parameters":{"profileUuid":{"name":"uuid","in":"path","description":"UUID of the profile.","required":true,"schema":{"type":"string","format":"uuid","nullable":false}},"formId":{"name":"id","in":"path","description":"ID of the form.","required":true,"schema":{"type":"integer","nullable":false}}},"headers":{"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the rate limit window.","schema":{"type":"number","nullable":false}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window.","schema":{"type":"number","nullable":false}},"Retry-After":{"description":"Number of seconds to wait before making another request. Returned when the rate limit has been reached.","schema":{"type":"number","nullable":false}},"X-RateLimit-Reset":{"description":"Unix timestamp (in seconds) at which the rate limit resets. Returned when the rate limit has been reached.","schema":{"type":"number","nullable":false}}},"schemas":{"EntityFormResource":{"title":"Assigned Form Resource","required":["id","label","answers","updated_at","created_at"],"properties":{"id":{"description":"Form ID.","type":"integer","nullable":false},"label":{"description":"Label of the form.","type":"string","nullable":false},"applies_to":{"description":"Where the form can be used: `internal_forms` for forms completed by the compliance team, or `entities` and `people` for customer-facing forms.","type":"array","items":{"type":"string"}},"reference":{"description":"Reference of the form.","type":"string","nullable":false},"answers":{"description":"Answers given to the form.","type":"array","items":{"properties":{"label":{"description":"Label of the question.","type":"string","nullable":false},"answer":{"description":"The answer given. Its type depends on the question: for example text, a list of choices, or an object describing an uploaded file."}},"type":"object"}},"updated_at":{"description":"Date and time the form was last updated.","type":"string","nullable":false},"created_at":{"description":"Date and time the form was created.","type":"string","nullable":false}},"type":"object"}},"responses":{"401":{"description":"Unauthorized. The access token is missing, invalid or has expired.","content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"}},"type":"object"}}}},"404":{"description":"Not Found. The requested resource does not exist, or is not available to your account.","content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"},"error":{"description":"Machine-readable details of the error.","type":"object","properties":{"key":{"description":"Error code, for example `error.generic`.","type":"string"},"params":{"description":"Values used in the error message, if any.","type":"array","items":{}}}}},"type":"object"}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Wait for the number of seconds given in the `Retry-After` header before trying again.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"}},"type":"object"}}}}}},"paths":{"/profiles/{uuid}/forms/{id}":{"get":{"tags":["Profile Forms"],"summary":"Retrieve a profile form","description":"Returns a single form assigned to a profile, with the answers given.","operationId":"68668fa647701a21f44bf04a9fdc51a1","parameters":[{"$ref":"#/components/parameters/profileUuid"},{"$ref":"#/components/parameters/formId"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/EntityFormResource"}},"type":"object"}}}},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"}}}}}}
```

## Submit answers to a profile form

> Submits answers to a form that has been assigned to a profile.\
> \
> The request body is a JSON object that matches the form's schema, so its structure is different for each form. Retrieve a form's schema with \*\*Retrieve a form\*\* (\`GET /forms/{id}\`) to find the exact field names and data types. Answers are validated against the schema.\
> \
> Submitting answers again replaces the previous answers. Previously uploaded file answers are kept unless you send a new file for that field.\
> \
> The form must be assigned to the profile before you submit answers.\
> \
> \### Example payload\
> \
> \`\`\`json\
> {\
> &#x20; "field\_name\_1": "answer value",\
> &#x20; "field\_name\_2": true,\
> &#x20; "field\_name\_3": \["option1", "option2"]\
> }\
> \`\`\`

````json
{"openapi":"3.0.0","info":{"title":"Detected API","version":"v2"},"tags":[{"name":"Profile Forms","description":"The forms assigned to a profile. Assign an internal form, retrieve the forms and the answers given, and submit answers. A profile can have multiple forms assigned."}],"servers":[{"url":"https://api.detected.app/api/v2/public","description":"Production"}],"security":[{"AccessToken":[]}],"components":{"securitySchemes":{"AccessToken":{"type":"http","description":"The API uses OAuth 2.0. Request an access token with **Create an access token** (`POST /oauth/token`), sending the client ID and client secret of your integration client, and your account slug. Send the access token in the `Authorization` header of every request, in the format `Authorization: Bearer <access_token>`. The access token carries the scopes set on your integration client in the dashboard. Access tokens expire. When one expires, request a new one.","bearerFormat":"OAuth 2.0 access token","scheme":"bearer"}},"parameters":{"profileUuid":{"name":"uuid","in":"path","description":"UUID of the profile.","required":true,"schema":{"type":"string","format":"uuid","nullable":false}},"formId":{"name":"id","in":"path","description":"ID of the form.","required":true,"schema":{"type":"integer","nullable":false}}},"headers":{"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the rate limit window.","schema":{"type":"number","nullable":false}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window.","schema":{"type":"number","nullable":false}},"Retry-After":{"description":"Number of seconds to wait before making another request. Returned when the rate limit has been reached.","schema":{"type":"number","nullable":false}},"X-RateLimit-Reset":{"description":"Unix timestamp (in seconds) at which the rate limit resets. Returned when the rate limit has been reached.","schema":{"type":"number","nullable":false}}},"schemas":{"EntityFormResource":{"title":"Assigned Form Resource","required":["id","label","answers","updated_at","created_at"],"properties":{"id":{"description":"Form ID.","type":"integer","nullable":false},"label":{"description":"Label of the form.","type":"string","nullable":false},"applies_to":{"description":"Where the form can be used: `internal_forms` for forms completed by the compliance team, or `entities` and `people` for customer-facing forms.","type":"array","items":{"type":"string"}},"reference":{"description":"Reference of the form.","type":"string","nullable":false},"answers":{"description":"Answers given to the form.","type":"array","items":{"properties":{"label":{"description":"Label of the question.","type":"string","nullable":false},"answer":{"description":"The answer given. Its type depends on the question: for example text, a list of choices, or an object describing an uploaded file."}},"type":"object"}},"updated_at":{"description":"Date and time the form was last updated.","type":"string","nullable":false},"created_at":{"description":"Date and time the form was created.","type":"string","nullable":false}},"type":"object"}},"responses":{"401":{"description":"Unauthorized. The access token is missing, invalid or has expired.","content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"}},"type":"object"}}}},"404":{"description":"Not Found. The requested resource does not exist, or is not available to your account.","content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"},"error":{"description":"Machine-readable details of the error.","type":"object","properties":{"key":{"description":"Error code, for example `error.generic`.","type":"string"},"params":{"description":"Values used in the error message, if any.","type":"array","items":{}}}}},"type":"object"}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Wait for the number of seconds given in the `Retry-After` header before trying again.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"}},"type":"object"}}}}}},"paths":{"/profiles/{uuid}/forms/{id}/answers":{"post":{"tags":["Profile Forms"],"summary":"Submit answers to a profile form","description":"Submits answers to a form that has been assigned to a profile.\n\nThe request body is a JSON object that matches the form's schema, so its structure is different for each form. Retrieve a form's schema with **Retrieve a form** (`GET /forms/{id}`) to find the exact field names and data types. Answers are validated against the schema.\n\nSubmitting answers again replaces the previous answers. Previously uploaded file answers are kept unless you send a new file for that field.\n\nThe form must be assigned to the profile before you submit answers.\n\n### Example payload\n\n```json\n{\n  \"field_name_1\": \"answer value\",\n  \"field_name_2\": true,\n  \"field_name_3\": [\"option1\", \"option2\"]\n}\n```","operationId":"f16a61710abcee7883cfa4d32f2e0ba7","parameters":[{"$ref":"#/components/parameters/profileUuid"},{"$ref":"#/components/parameters/formId"}],"responses":{"201":{"description":"Created","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/EntityFormResource"}},"type":"object"}}}},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"}}}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://detected.gitbook.io/detected-api-docs/api-reference/profiles/forms.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
