# Research

## Send Research Inquiry

<mark style="color:blue;">`POST`</mark> [**/v2/organization/:corporation/inquiry/research**](https://public-api.expertfile.com/v2/organization/:corporation/inquiry/research)

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Url**

<table><thead><tr><th width="339.3333333333333">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>corporation</td><td>number</td><td>Corporation ID</td></tr></tbody></table>

**Body**

<table><thead><tr><th width="339.3333333333333">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>firstname<mark style="color:red;"><strong>*</strong></mark></td><td>string</td><td>Sender first name</td></tr><tr><td>lastname</td><td>string</td><td>Sender last name</td></tr><tr><td>email<mark style="color:red;"><strong>*</strong></mark></td><td>string</td><td>Sender email address</td></tr><tr><td>phone</td><td>string</td><td>Sender phone #</td></tr><tr><td>website</td><td>string</td><td>Sender website</td></tr><tr><td>organization</td><td>string</td><td>Sender company</td></tr><tr><td>message<mark style="color:red;"><strong>*</strong></mark></td><td>string</td><td>Sender message</td></tr><tr><td>location_city</td><td>string</td><td>Sender city</td></tr><tr><td>location_state</td><td>string</td><td>Sender state/province<br>See full list <a href="/pages/eqgpZlI3h1xoH0tJmVdw#state-province-codes"><em><strong>here</strong></em></a></td></tr><tr><td>location_country</td><td>string</td><td>Sender country<br>See full list <a href="/pages/eqgpZlI3h1xoH0tJmVdw#country-codes"><em><strong>here</strong></em></a></td></tr><tr><td>username<mark style="color:red;"><strong>*</strong></mark></td><td>string</td><td>Recipient(Expert) username</td></tr><tr><td>research_area<mark style="color:red;"><strong>*</strong></mark></td><td>string</td><td>Research Area</td></tr><tr><td>research_stage_in_process<mark style="color:red;"><strong>*</strong></mark></td><td>string</td><td>Research Stage(valid input: 'collaboration', 'funding', 'partnership', 'other')</td></tr><tr><td>research_deadline</td><td>unix timestamp</td><td>Deadline</td></tr></tbody></table>

**Response**

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

```json
{ 
    data: { 
        id: <INQUIRY_ID>
    }, 
    success: true 
}
```

{% endtab %}
{% endtabs %}

Code

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

```javascript
const data = new URLSearchParams();
const accessToken = `<ACCESS TOKEN>`

data.append('firstname', 'Testfirstname');
data.append('lastname', 'Teslastname');
data.append('email', 'testing@test.com');
data.append('phone', '(555) 555-5555');
data.append('website', 'https://mywebsite.com');
data.append('organization', 'NYT');
data.append('location_city', 'New York City');
data.append('location_state', 'NY');
data.append('location_country', 'US');
data.append('username', '<EXPERT USERNAME>');
data.append('research_area', 'Research area...');
data.append('research_stage_in_process', 'collaboration');
data.append('research_deadline', 1714657477);
data.append('message', 'This is a test message to the expert...');

fetch('https://public-api.expertfile.com/v2/organization/:corporation/inquiry/research', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Authorization': `Bearer ${accessToken}`
    },
    body: data
})
.then(response => response.json())
.then(json => {
    const { success, data, error } = json

    if (success) {
        const { id } = data
        console.log('New inquiry id', id)
    }

})
.catch(error => console.error(error));
```

{% endtab %}

{% tab title="PHP" %}

```php
$accessToken = urlencode('<ACCESS TOKEN>');

$url = 'https://public-api.expertfile.com/v2/organization/:corporation/inquiry/research';

$data = ['firstname' => 'Testfirstname',
'lastname' => 'Teslastname',
'email' => 'testing@test.com',
'phone' => '(555) 555-5555',
'website' => 'https://mywebsite.com',
'organization' => 'NYT',
'location_city' => 'New York City',
'location_state' => 'NY',
'location_country' => 'US',
'research_area' => 'Research area...',
'research_stage_in_process' => 'collaboration',
'research_deadline' => 1714657477,
'username' => '<EXPERT USERNAME>',
'message' => 'This is a test message to the expert...'];

$ch = curl_init($url);
curl_setopt(
    $ch,
    CURLOPT_HTTPHEADER,
    array('Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer ' . $accessToken)
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));

$response = curl_exec($ch);
$json = json_decode($response);

if($json->success){
    var_dump($json->data);
}

curl_close($ch);
```

{% endtab %}

{% tab title="Curl" %}

```
curl -X POST https://public-api.expertfile.com/v2/organization/:corporation/inquiry/research \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <ACCESS TOKEN>" \
    -d '{ "firstname": "Testfirstname","lastname": "Teslastname","email": "testing@test.com","phone": "(555) 555-5555","website": "https://mywebsite.com","organization": "NYT","location_city": "New York City","location_state": "NY","location_country": "US","username": "<EXPERT USERNAME>","research_area": "Research area...", "research_stage_in_process": "collaboration", "research_deadline: 1714657477", "message": "This is a test message to the expert..." }'

```

{% endtab %}
{% endtabs %}


---

# 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://developer.expertfile.com/reference/api-reference/inquiries/research.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.
