# Update Contact Information

`PUT /api/contacts/{id}`



- **Group:** Contacts
- **Since:** v0.1.0
- **Authentication:** `authtoken` header, created under Setup > API > API Management
- **HTML version:** /apiguide/contacts/put-contact/

## Headers

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

## Parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | Number | **required** | Mandatory Customer Contact id. |
| `firstname` | String | **required** | Mandatory First Name |
| `lastname` | String | **required** | Mandatory Last Name |
| `email` | String | **required** | Mandatory E-mail |
| `title` | String | optional | Optional Position |
| `phonenumber` | String | optional | Optional Phone Number |
| `direction` | String | optional | Optional Direction (rtl or ltr) (default: `rtl`) |
| `password` | String | optional | Optional password (only required if you pass send_set_password_email parameter) |
| `is_primary` | String | optional | Optional Primary Contact (set on or don't pass it) (default: `on`) |
| `donotsendwelcomeemail` | String | optional | Optional Do Not Send Welcome Email (set on or don't pass it) |
| `send_set_password_email` | String | optional | Optional Send Set Password Email (set on or don't pass it) |
| `permissions` | Array | optional | Optional Permissions for this contact(["1", "2", "3", "4", "5", "6" ]) [ "1", // Invoices permission "2", // Estimates permission "3", // Contracts permission "4", // Proposals permission "5", // Support permission "6" // Projects permission ] |
| `invoice_emails` | String | optional | Optional E-Mail Notification for Invoices (set value same as name or don't pass it) (default: `invoice_emails`) |
| `estimate_emails` | String | optional | Optional E-Mail Notification for Estimate (set value same as name or don't pass it) (default: `estimate_emails`) |
| `credit_note_emails` | String | optional | Optional E-Mail Notification for Credit Note (set value same as name or don't pass it) (default: `credit_note_emails`) |
| `project_emails` | String | optional | Optional E-Mail Notification for Project (set value same as name or don't pass it) (default: `project_emails`) |
| `ticket_emails` | String | optional | Optional E-Mail Notification for Tickets (set value same as name or don't pass it) (default: `ticket_emails`) |
| `task_emails` | String | optional | Optional E-Mail Notification for Task (set value same as name or don't pass it) (default: `task_emails`) |
| `contract_emails` | String | optional | Optional E-Mail Notification for Contract (set value same as name or don't pass it) (default: `contract_emails`) |

## Example request

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

## Success response

### Success-Response:

```json
HTTP/1.1 200 OK
{
  "status": true,
  "message": "Contact Updated Successfully"
}
```

## Error responses

### Error-Response:

```json
    HTTP/1.1 409 Conflict
    {
      "status": false,
      "error": {
			"email":"This Email is already exists"
		},
		"message": "This Email is already exists"
    }
```

### Error-Response:

```json
HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Contact Update fail"
}
```

---

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