# Create EDD Responses

<table data-header-hidden><thead><tr><th width="74.8046875" align="center"></th><th></th></tr></thead><tbody><tr><td align="center"><mark style="color:blue;"><strong>POST</strong></mark> </td><td>https://api.sfox.com/v1/enterprise/eddq/responses</td></tr></tbody></table>

Submit a user's responses to an EDD request.

{% hint style="info" %}
For additional details regarding EDD and completing EDD requests, see our [Enhanced Due Diligence (EDD) guide](/connect/introduction/guides/onboarding/enhanced-due-diligence-edd.md).
{% endhint %}

***

## Request

All ***required*** prompts (`is_required` = `true`) must be answered. Excluding a response to a required prompt in your request will result in an error response and responses included in your request will not be recorded/must be re-submitted in a new request.

For [EDD prompts](/connect/rest-api/end-users/get-edd-prompts.md) with `response_type` = `File-Upload`  prompts, you will submit ***the file name only*** in this request.&#x20;

* `response` must be set to the file name ***excluding*** the extension (e.g. `.jpg`, `.pdf`) For example, if you are submitting a document with file name `por_file.png`, you would set the `response` = `por_file`.
* After creating EDD responses here, you must submit the file itself either via a [Submit Documents](/connect/rest-api/end-users/submit-documents.md) request or [SFTP](/connect/rest-api/end-users/submit-documents/submit-documents-sftp.md).

### Body Parameters

<table><thead><tr><th width="246">Parameter</th><th width="86">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>user_id</code></strong> <mark style="color:red;">required</mark></td><td>string</td><td>The unique user ID of the user that you will be submitting responses for.</td></tr><tr><td><strong><code>prompts</code></strong> <mark style="color:red;">required</mark></td><td>string</td><td>The list of prompts applicable to the requested EDDQ.</td></tr><tr><td><strong><code>ddq_prompt_id</code></strong> <mark style="color:red;">required</mark></td><td>string</td><td><a href="/pages/o4v5Sk7fNaut4L4fQl2p#response-body">The unique <code>id</code> retrieved from the list of EDD prompts</a>.</td></tr><tr><td><strong><code>response</code></strong> <mark style="color:red;">required</mark></td><td>string</td><td>The response from your end user.</td></tr><tr><td><strong><code>optional_free_form</code></strong></td><td>string</td><td>The optional response from your end user if <code>optional_free_form</code> = <code>true</code></td></tr></tbody></table>

### Example Requests

{% tabs %}
{% tab title="EDDQ - Individual" %}

```json
{ 
  "user_id": "${USER_ID}",
  "prompts": {
    "1": { "response": "hello"},
    "2": { "response": "hello"},
    "3": { "response": "hello"},
    "4": { "response": "hello"},
    "5": { "response": "hello"},
    "4": { "response": "hello", "optional_free_form":"hello world"},
    "52": {"response": "id_file"},
    "53": {"response": "por_file"}
  }
}
```

{% endtab %}

{% tab title="EDDQ - Business" %}

```json
{ 
  "user_id":"${USER_ID}",
  "prompts": {
    "6": { "response": "hello"},
    "7": { "response": "hello"},
    "8": { "response": "Custody of Virtual Currency"},
    "9": { "response": "hello"},
    "10": { "response": "hello"},
    "12": { "response": "hello"},
    "13": { "response": "hello"},
    "14": { "response": "hello"},
    "15": { "response": "hello"},
    "16": { "response": "hello"},
    "17": { "response": "hello"},
    "19": { "response": "Yes"},
    "20": { "response": "No"},
    "21": { "response": "Yes", "optional_free_form":"hello world"},
    "22": { "response": "Yes"},
    "23": { "response": "Yes"},
    "24": { "response": "Yes"},
    "25": { "response": "hello world"},
    "26": { "response": "hello world"},
    "27": { "response": "Yes"},
    "28": { "response": "Yes"},
    "29": { "response": "Yes"},
    "30": { "response": "No"},
    "31": { "response": "Yes"},
    "32": { "response": "Yes"},
    "33": { "response": "Yes"},
    "34": { "response": "Yes"},
    "35": { "response": "Yes"},
    "36": { "response": "Yes"},
    "37": { "response": "Yes"},
    "38": { "response": "Yes"},
    "39": { "response": "Yes"},
    "40": { "response": "Yes"},
    "41": { "response": "Yes"},
    "42": { "response": "Yes"},
    "43": { "response": "Yes"},
    "44": { "response": "Yes"},
    "45": { "response": "Yes"},
    "46": { "response": "Yes"},
    "47": { "response": "Yes"},
    "48": { "response": "Yes"},
    "49": { "response": "Yes"},
    "50": { "response": "Yes"},
    "54": { "response": "formation_documents_file"},
    "55": {"response":"principal_place_of_business_file"}
  }
} 
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Shell" %}

```sh
curl -X POST \
  -H 'Content-Type: application/json' \
  -H  "Authorization: Bearer ${ENTERPRISE_API_KEY}" \
  --data '{
  "user_id": "${USER_ID}",
  "prompts": {
    "1": {"response": "${Response to prompt ID 1}"},
    "2": {"response": "${Response to prompt ID 2}"},
    "3": {"response": "${Response to prompt ID 3}"},
    "52": {"response": "${filename1}"},
    "53": {"response": "${filename2}"}
  }
}' \
'https://api.sfox.com/v1/enterprise/eddq/responses'
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
const axios = require('axios');

let data = JSON.stringify({
  "user_id": "${USER_ID}",
  "prompts": {
    "1": {"response": "${Response to prompt ID 1}"},
    "2": {"response": "${Response to prompt ID 2}"},
    "3": {"response": "${Response to prompt ID 3}"},
    "52": {"response": "${filename1}"},
    "53": {"response": "${filename2}"}
  }
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.sfox.com/v1/enterprise/eddq/responses',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': `Bearer ${process.env.ENTERPRISE_API_KEY}`, 
  },
  data : data
};

axios.request(config)
  .then((response) => {
    console.log(response.status);
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error.response.status);
    console.log(error.response.data);
  });

```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

data = {
  "user_id": "${USER_ID}",
  "prompts": {
    "1": {"response": "${Response to prompt ID 1}"},
    "2": {"response": "${Response to prompt ID 2}"},
    "3": {"response": "${Response to prompt ID 3}"},
    "52": {"response": "${filename1}"},
    "53": {"response": "${filename2}"}
  }
}

response = requests.post(
    'https://api.sfox.com/v1/enterprise/eddq/responses',
  headers={ 
    'Authorization': f"Bearer {os.environ['ENTERPRISE_API_KEY']}" 
  },
  json=data
)

print(response.status_code)
print(response.json())

```

{% endtab %}
{% endtabs %}

## Response

<details>

<summary><mark style="color:green;"><strong>200</strong></mark><strong>: OK</strong></summary>

{% code title="All prompts" %}

```json
{
    "data": {
        "success": true
    }
}
```

{% endcode %}

</details>


---

# 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://docs.sfox.com/connect/rest-api/end-users/create-edd-responses.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.
