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

# Staff Profiles

{% hint style="info" %}
Please note that in all urls & code samples you'll need to replace`:username` and `:corporation` with appropriate values
{% endhint %}

## Get Individual Staff

<mark style="color:green;">`GET`</mark>[ **/v2/organization/:corporation/staff/:username**](https://public-api.expertfile.com/v2/organization/:corporation/staff/:username)

**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><tr><td>username</td><td>string</td><td>Unique username</td></tr></tbody></table>

**Response**

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

```json
 {
  data: {
    avatar: [],
    account: [],
    biography: [],
    category: [],
    corporationprofile: [],
    education: [],
    language: [],
    link: [],
    profiletype: [],
    tag: [],
    tagline: []
  },
  success: true
}
```

{% endtab %}
{% endtabs %}

Code

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

```javascript
const accessToken = `<ACCESS TOKEN>`

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

    if (success) {
        const profile = data;
        console.log('profile', profile)
    }

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

{% endtab %}

{% tab title="PHP" %}

```php
$accessToken = urlencode('<ACCESS TOKEN>');
$url = 'https://public-api.expertfile.com/v2/organization/:corporation/expert/:username';

$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);

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

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

curl_close($ch);
```

{% endtab %}

{% tab title="Curl" %}

```
curl https://public-api.expertfile.com/v2/organization/:corporation/expert/:username
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <ACCESS TOKEN>"
```

{% endtab %}
{% endtabs %}

## Create Staff

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

**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><tr><td>username</td><td>string</td><td>Unique username</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>First Name</td></tr><tr><td>lastname<mark style="color:red;"><strong>*</strong></mark></td><td>string</td><td>Last Name</td></tr><tr><td>job_title<mark style="color:red;"><strong>*</strong></mark></td><td>string</td><td>Job</td></tr><tr><td>email<mark style="color:red;"><strong>*</strong></mark></td><td>string</td><td>Email</td></tr><tr><td>company<mark style="color:red;"><strong>*</strong></mark></td><td>string</td><td>Company</td></tr><tr><td>department</td><td>string</td><td>Department</td></tr><tr><td>phone_number</td><td>string</td><td>Phone #</td></tr><tr><td>phone_number_extension</td><td>string</td><td>Phone extension</td></tr><tr><td>location_city</td><td>string</td><td>City</td></tr><tr><td>location_state</td><td>string</td><td>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>Country<br>See full list <a href="/pages/eqgpZlI3h1xoH0tJmVdw#country-codes"><em><strong>here</strong></em></a></td></tr><tr><td>location_postal</td><td>string</td><td>ZIP/Postal Code</td></tr><tr><td>location_address</td><td>string</td><td>Address</td></tr><tr><td>location_building</td><td>string</td><td>Building</td></tr><tr><td>location_room</td><td>string</td><td>Room #</td></tr></tbody></table>

**Response**

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

```json
 {
  data: {
    username: '<USERNAME>', 
    inserted: true
  },
  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', 'Testlastname');
data.append('job_title', 'Job title');
data.append('email', 'testfromstaffapi@testing.com');
data.append('company', 'Testcompany');
data.append('department', 'Testdepartment');
data.append('phone_number', 'Testphone');
data.append('phone_number_extension', 'Testext');
data.append('location_city', 'Testcity');
data.append('location_state', 'ON');
data.append('location_country', 'CA');
data.append('location_postal', 'Testpostal');
data.append('location_address', 'Testaddress');
data.append('location_building', 'Testbuilding');
data.append('location_room', 'Testroom');

fetch('https://public-api.expertfile.com/v2/organization/:corporation/staff', {
    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 { username } = data
        console.log('New username', username)
    }

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

{% endtab %}

{% tab title="PHP" %}

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

$url = 'https://public-api.expertfile.com/v2/organization/:corporation/staff';
$data = [
'firstname' => 'Testfirstname',
'lastname' => 'Testlastname',
'job_title' => 'Job title',
'email' => 'testfromapi@testing.com',
'company' => 'Testcompany',
'department' => 'Testdepartment',
'phone_number' => 'Testphone',
'phone_number_extension' => 'Testext',
'location_city' => 'Testcity',
'location_state' => 'ON',
'location_country' => 'CA',
'location_postal' => 'Testpostal',
'location_address' => 'Testaddress',
'location_building' => 'Testbuilding',
'location_room' => 'Testroom'
];

$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/staff \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <ACCESS TOKEN>" \
    -d '{"firstname": "Testfirstname","lastname": "Testlastname","job_title": "Job title","email": "testfromapi@testing.com","company": "Testcompany","department": "Testdepartment","phone_number": "Testphone","phone_number_extension": "Testext","location_city": "Testcity","location_state": "ON","location_country": "CA","location_postal": "Testpostal","location_address": "Testaddress","location_building": "Testbuilding", "location_room": "Testroom"}'
```

{% endtab %}
{% endtabs %}

## Update Staff

<mark style="color:blue;">`PUT`</mark> [**/v2/organization/:corporation/staff/:username**](https://public-api.expertfile.com/v2/organization/:corporation/expert/:username)

**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><tr><td>username</td><td>string</td><td>Unique username</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</td><td>string</td><td>First Name</td></tr><tr><td>lastname</td><td>string</td><td>Last Name</td></tr><tr><td>job_title</td><td>string</td><td>Job</td></tr><tr><td>email</td><td>string</td><td>Email</td></tr><tr><td>company</td><td>string</td><td>Company</td></tr><tr><td>department</td><td>string</td><td>Department</td></tr><tr><td>phone_number</td><td>string</td><td>Phone #</td></tr><tr><td>phone_number_extension</td><td>string</td><td>Phone extension</td></tr><tr><td>location_city</td><td>string</td><td>City</td></tr><tr><td>location_state</td><td>string</td><td>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>Country<br>See full list <a href="/pages/eqgpZlI3h1xoH0tJmVdw#country-codes"><em><strong>here</strong></em></a></td></tr><tr><td>location_postal</td><td>string</td><td>ZIP/Postal Code</td></tr><tr><td>location_address</td><td>string</td><td>Address</td></tr><tr><td>location_building</td><td>string</td><td>Building</td></tr><tr><td>location_room</td><td>string</td><td>Room # </td></tr><tr><td>is_published</td><td>number</td><td>Published(1 or 0)</td></tr><tr><td>is_private</td><td>number</td><td>Private(1 or 0)</td></tr></tbody></table>

**Response**

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

```json
 {
  data: {
    username: '<USERNAME>', 
    updated: true
  },
  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', 'Testlastname');
data.append('job_title', 'Job title');
data.append('email', 'testfromapi@testing.com');
data.append('company', 'Testcompany');
data.append('department', 'Testdepartment');
data.append('phone_number', 'Testphone');
data.append('phone_number_extension', 'Testext');
data.append('location_city', 'Testcity');
data.append('location_state', 'ON');
data.append('location_country', 'CA');
data.append('location_postal', 'Testpostal');
data.append('location_address', 'Testaddress');
data.append('location_building', 'Testbuilding');
data.append('location_room', 'Testroom');
data.append('is_published', '1');
data.append('is_private', '0');

fetch('https://public-api.expertfile.com/v2/organization/:corporation/staff/:username', {
    method: 'PUT',
    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 { username } = data
        console.log('Updated username', username)
    }

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

{% endtab %}

{% tab title="PHP" %}

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

$url = 'https://public-api.expertfile.com/v2/organization/:corporation/staff/:username';
$data = [
'firstname' => 'Testfirstname',
'lastname' => 'Testlastname',
'job_title' => 'Job title',
'email' => 'testfromapi@testing.com',
'company' => 'Testcompany',
'department' => 'Testdepartment',
'phone_number' => 'Testphone',
'phone_number_extension' => 'Testext',
'location_city' => 'Testcity',
'location_state' => 'ON',
'location_country' => 'CA',
'location_postal' => 'Testpostal',
'location_address' => 'Testaddress',
'location_building' => 'Testbuilding',
'location_room' => 'Testroom',
'is_published' => '1',
'is_private' => '0'
];

$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_PUT, 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 PUT https://public-api.expertfile.com/v2/organization/:corporation/staff/:username \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <ACCESS TOKEN>" \
    -d '{"firstname": "Testfirstname","lastname": "Testlastname","job_title": "Job title","email": "testfromapi@testing.com","company": "Testcompany","department": "Testdepartment","phone_number": "Testphone","phone_number_extension": "Testext","location_city": "Testcity","location_state": "ON","location_country": "CA","location_postal": "Testpostal","location_address": "Testaddress","location_building": "Testbuilding", "location_room": "Testroom", "is_published": "1" "is_private": "0"}'
```

{% endtab %}
{% endtabs %}

## Delete Staff

<mark style="color:red;">`DELETE`</mark>[ **/v2/organization/:corporation/staff/:username**](https://public-api.expertfile.com/v2/organization/:corporation/staff/:username)

**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><tr><td>username</td><td>string</td><td>Unique username</td></tr></tbody></table>

**Response**

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

```json
{ 
    data: { 
        deleted: true, 
        username: '<USERNAME>', 
    }, 
    success: true 
}
```

{% endtab %}
{% endtabs %}

**Code**

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

```javascript
const accessToken = `<ACCESS TOKEN>`

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

    if (success) {
        const { username } = data
        console.log('Deleted username', username)
    }

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

{% endtab %}

{% tab title="PHP" %}

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

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

$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_CUSTOMREQUEST, "DELETE");

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

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

curl_close($ch);
```

{% endtab %}

{% tab title="Curl" %}

```
curl -X DELETE https://public-api.expertfile.com/v2/organization/:corporation/staff/:username \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <ACCESS TOKEN>"
```

{% endtab %}
{% endtabs %}


---

# 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 dynamically by asking a question.

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

```
GET https://developer.expertfile.com/reference/api-reference/staff/staff-profiles.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
