# UpdateContact

Update a single contact

`PUT /companies/{companyId}/contacts/{contactId}`

**API:** Shared Company Service API
**Tag:** Contacts
**API Version:** 1.2
**Base URL:** https://api.avalara.com/scs

Source: https://developer.avalara.com/products/shared-services/api/methods/Contacts/UpdateContact/

## Description

Use this endpoint replace the existing contact object at this URL with an updated object.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/). |
| `X-Correlation-Id` | string | header | No | Use the X-Correlation-ID header to support request correlation through requests. This header should be present on all requests and responses. |
| `avalara-version` | string | header | No | The HTTP Header meant to specify the version of the API intended to be used |

## Request Body

**Content-Type:** `application/json`
**Schema:** `CompanyContact`

Object for storing contact information for a company

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | string | No | The ID for this contact Example: `eea59770-fa51-4951-9165-d06264a1101b`. |
| `companyId` | string | **Yes** | The company ID for this contact Example: `045f7e05-7b66-48fc-bf85-f75005eb377f`. |
| `contactCode` | string | No | A unique code within the associated company for this contact.
maxLength: 25
minLength: 0 Example: `abccorp`. |
| `firstName` | string | No | The first or given name of this contact.
maxLength: 50
minLength: 0 Example: `Shriyut`. |
| `middleName` | string | No | The middle name of this contact.
maxLength: 50
minLength: 0 Example: `Gangadhar`. |
| `lastName` | string | No | The last or family name of this contact.
maxLength: 50
minLength: 0 Example: `Tipre`. |
| `title` | string | No | Professional title of this contact.
maxLength: 50
minLength: 0 Example: `SSE`. |
| `line1` | string | No | The first line of the postal mailing address of this contact.
maxLength: 100
minLength: 0 Example: `ASTP Pune`. |
| `line2` | string | No | The second line of the postal mailing address of this contact.
maxLength: 50
minLength: 0 Example: `Baner`. |
| `line3` | string | No | The third line of the postal mailing address of this contact.
maxLength: 50
minLength: 0 Example: `Baner Pune`. |
| `city` | string | No | The city of the postal mailing address of this contact.
maxLength: 50
minLength: 0 Example: `Pune`. |
| `region` | string | No | Name or ISO 3166 code identifying the region within the country. Example: `Maharashtra`. |
| `postalCode` | string | No | The postal code or zip code of the postal mailing address of this contact.
maxLength: 10
minLength: 0 Example: `411045`. |
| `country` | string | No | This field supports many different country identifiers:

Two character ISO 3166 codes
Three character ISO 3166 codes
Fully spelled out names of the country in ISO supported languages
Common alternative spellings for many countries
For a full list of all supported codes and names, please see the Definitions API ListCountries. Example: `IN`. |
| `email` | string | No | The email address of this contact. Example: `test@example.com`. |
| `phone` | string | No | The main phone number for this contact. Example: `9999999999`. |
| `mobile` | string | No | The mobile phone number for this contact. Example: `9999999999`. |
| `fax` | string | No | The facsimile phone number for this contact. Example: `faxofabccorp`. |
| `meta` | Meta | No |  |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | OK | `CompanyContact` |
| 400 | Bad Request | `ErrorInfo` |
| 401 | Unauthorized | `ErrorInfo` |
| 403 | Forbidden | `ErrorInfo` |
| 409 | Conflict | `ErrorInfo` |
| 500 | Internal Server Error | `ErrorInfo` |

### 200 Response: `CompanyContact`

Object for storing contact information for a company

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | string | No | The ID for this contact Example: `eea59770-fa51-4951-9165-d06264a1101b`. |
| `companyId` | string | **Yes** | The company ID for this contact Example: `045f7e05-7b66-48fc-bf85-f75005eb377f`. |
| `contactCode` | string | No | A unique code within the associated company for this contact.
maxLength: 25
minLength: 0 Example: `abccorp`. |
| `firstName` | string | No | The first or given name of this contact.
maxLength: 50
minLength: 0 Example: `Shriyut`. |
| `middleName` | string | No | The middle name of this contact.
maxLength: 50
minLength: 0 Example: `Gangadhar`. |
| `lastName` | string | No | The last or family name of this contact.
maxLength: 50
minLength: 0 Example: `Tipre`. |
| `title` | string | No | Professional title of this contact.
maxLength: 50
minLength: 0 Example: `SSE`. |
| `line1` | string | No | The first line of the postal mailing address of this contact.
maxLength: 100
minLength: 0 Example: `ASTP Pune`. |
| `line2` | string | No | The second line of the postal mailing address of this contact.
maxLength: 50
minLength: 0 Example: `Baner`. |
| `line3` | string | No | The third line of the postal mailing address of this contact.
maxLength: 50
minLength: 0 Example: `Baner Pune`. |
| `city` | string | No | The city of the postal mailing address of this contact.
maxLength: 50
minLength: 0 Example: `Pune`. |
| `region` | string | No | Name or ISO 3166 code identifying the region within the country. Example: `Maharashtra`. |
| `postalCode` | string | No | The postal code or zip code of the postal mailing address of this contact.
maxLength: 10
minLength: 0 Example: `411045`. |
| `country` | string | No | This field supports many different country identifiers:

Two character ISO 3166 codes
Three character ISO 3166 codes
Fully spelled out names of the country in ISO supported languages
Common alternative spellings for many countries
For a full list of all supported codes and names, please see the Definitions API ListCountries. Example: `IN`. |
| `email` | string | No | The email address of this contact. Example: `test@example.com`. |
| `phone` | string | No | The main phone number for this contact. Example: `9999999999`. |
| `mobile` | string | No | The mobile phone number for this contact. Example: `9999999999`. |
| `fax` | string | No | The facsimile phone number for this contact. Example: `faxofabccorp`. |
| `meta` | Meta | No |  |

## Example Request

```bash
curl -X PUT "https://api.avalara.com/scs/companies/{companyId}/contacts/{contactId}" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json" \
  -d '{
  "id": "eea59770-fa51-4951-9165-d06264a1101b",
  "companyId": "045f7e05-7b66-48fc-bf85-f75005eb377f",
  "contactCode": "abccorp",
  "firstName": "Shriyut",
  "middleName": "Gangadhar",
  "lastName": "Tipre",
  "title": "SSE",
  "line1": "ASTP Pune",
  "line2": "Baner",
  "line3": "Baner Pune",
  "city": "Pune",
  "region": "Maharashtra",
  "postalCode": "411045",
  "country": "IN",
  "email": "test@example.com",
  "phone": "9999999999",
  "mobile": "9999999999",
  "fax": "faxofabccorp",
  "meta": {
    "createdBy": "32ec41da-c69f-4db4-9b77-424eab75edae",
    "created": "2023-03-31T13:18:12",
    "modifiedBy": "32ec41da-c69f-4db4-9b77-424eab75edae",
    "lastModified": "2023-03-31T13:18:12",
    "location": "/companies/32ec41da-c69f-4db4-9b77-424eab75edae",
    "version": "1.0"
  }
}'
```