# General

## Send General Inquiry

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

**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="../../../helpers#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="../../../helpers#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></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('message', 'This is a test message to the expert...');

fetch('https://public-api.expertfile.com/v2/organization/:corporation/inquiry/general', {
    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/general';

$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',
'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/general \
    -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>", "message": "This is a test message to the expert..." }'
    
```

{% endtab %}
{% endtabs %}
