# Update a Staff

`PUT /api/staffs/{id}`



- **Group:** Staffs
- **Since:** v0.0.0
- **Authentication:** `authtoken` header, created under Setup > API > API Management
- **HTML version:** /apiguide/staffs/put-staff/

## Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authtoken` | String | **required** | Authentication token, generated from admin area |

## Parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `firstname` | String | **required** | Mandatory Staff Name. |
| `email` | String | **required** | Mandatory Staff Related. |
| `password` | String | **required** | Mandatory Staff password. |
| `hourly_rate` | Number | optional | Optional hourly rate. |
| `phonenumber` | String | optional | Optional Staff phonenumber. |
| `facebook` | String | optional | Optional Staff facebook. |
| `linkedin` | String | optional | Optional Staff linkedin. |
| `skype` | String | optional | Optional Staff skype. |
| `default_language` | String | optional | Optional Staff default language. |
| `email_signature` | String | optional | Optional Staff email signature. |
| `direction` | String | optional | Optional Staff direction. |
| `departments` | Number[] | optional | Optional Staff departments. |

## Example request

```bash
curl -X PUT "https://yoursite.com/api/staffs/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "firstname": "...", "email": "...", "password": "..." }'
```

## Success response

### Success-Response:

```json
HTTP/1.1 200 OK
{
  "status": true,
  "message": "Staff Update Successful."
}
```

## Error responses

### Error-Response:

```json
HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Staff Update Fail."
}
```

---

Perfex CRM REST API by Themesic Interactive. Full reference: /apiguide/
