> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.redpincompany.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.redpincompany.com/_mcp/server.

# Update a Contact

PUT https://sandbox.currenciesdirect.com/v1/customers/{customerId}/contacts/{contactId}
Content-Type: application/json

Updates an existing contact associated with a specific customer. This endpoint allows you to modify contact information such as address, phone number, and other relevant details. Only the fields included in the request body will be updated; omitted fields will retain their current values (partial update supported). The contact must belong to the specified customer, and appropriate authentication is required to perform this operation.

**Authentication:** [Bearer token required](/api-guide/getting-started/authentication#oauth-20-authentication)


Reference: https://docs.redpincompany.com/api-reference/customers/api-integration/contacts/update-customer-contact

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 Bearer token authentication. This API uses OAuth 2.0 Client Credentials flow. Please refer to the [Authentication](/api-guide/getting-started/authentication#oauth-20-authentication) section for detailed information on how to obtain and use your OAuth credentials.

## Servers

- `https://sandbox.currenciesdirect.com` (Sandbox, default)
- `https://api.redpincompany.com` (Production)

## Request

### Path parameters

- `customerId` (string, required) — Unique Customer Identifier. This is the `customer_id` returned in the response from the [Add Contact](/api-reference/customers/api-integration/contacts/add-customer-contact) API.
- `contactId` (string, required) — Unique ID for this contact. This is the `contact_id` returned in the response from the [Get Customer](/api-reference/customers/api-integration/customers/get-customer-details) API.

### Body (application/json)

This endpoint expects an object.

- `occupation` (string, optional) — Occupation of the contact.
- `employment_status` (string, optional) — Employment status of the contact.
- `industry` (string, optional) — Employment industry of the contact.
- `phone_number` (string, optional) — Contact phone number.
- `mobile_number` (string, optional) — Contact mobile number in E.164 international format (e.g., +14155552671).
- `primary_contact` (boolean, optional) — Indicates if this contact is the primary contact for the customer account.
- `authorize_to_trade` (boolean, optional) — Indicates whether the contact is authorised to trade on behalf of the customer.
- `address` (V1CustomersCustomerIdContactsContactIdPutRequestBodyContentApplicationJsonSchemaAddress, optional) — Address details for the contact.

## Response

### 200

Ok.

- `customer_id` (string, optional) — ID of Customer related to the Contact.
- `contact_id` (string, optional) — Unique identifier of the contact that was updated.

## Errors

### 400 Bad Request Error

Bad Request. Malformed request. You will receive this error if the request query parameters are not found or the request body does not validate with the schema. The error code will help you determine the cause of the issue.

- `code` (string, required) — Machine-readable error code.
- `description` (string, required) — Human-readable error description.

### 401 Unauthorized Error

Unauthorized. You have not included a valid Access token, it has expired, or you entered incorrect credentials.

- `code` (string, required) — Machine-readable error code.
- `description` (string, required) — Human-readable error description.

### 404 Not Found Error

Not Found. Resource was not found.

- `code` (string, required) — Machine-readable error code.
- `description` (string, required) — Human-readable error description.

### 500 Internal Server Error

Internal Server Error. Something has gone wrong on the website's server, but the server could not be more specific on what the exact problem is.

- `code` (string, required) — Machine-readable error code.
- `description` (string, required) — Human-readable error description.

## Types

### V1CustomersCustomerIdContactsContactIdPutRequestBodyContentApplicationJsonSchemaAddress

Address details for the contact.

- `post_code` (string, required) — Postcode or zip code.
- `city` (string, required) — City name.
- `country` (string, required) — Three-letter [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the contact's address (e.g., USA, GBR, ARE).
- `unit_number` (string, optional) — Unit number.
- `street_number` (string, optional) — Street number.
- `street` (string, optional) — Street name.
- `street_type` (string, optional) — Street type.
- `civic_number` (string, optional) — Civic number.
- `state` (string, optional) — State.

## Examples

### Contact Updated

**Response**

```json
{
  "customer_id": "34000247",
  "contact_id": "12345678"
}
```

**SDK Code**

```python Contact Updated
import requests

url = "https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561"

headers = {"Authorization": "Bearer <token>"}

response = requests.put(url, headers=headers)

print(response.json())
```

```javascript Contact Updated
const url = 'https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561';
const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Contact Updated
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561"

	req, _ := http.NewRequest("PUT", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Contact Updated
require 'uri'
require 'net/http'

url = URI("https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Contact Updated
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Contact Updated
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Contact Updated
using RestSharp;

var client = new RestClient("https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Contact Updated
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Update Contact Request

**Request**

```json
{
  "occupation": "Software Engineer",
  "employment_status": "Full-time",
  "industry": "Technology and Software",
  "phone_number": "(020)123456789",
  "mobile_number": "+44-987654321",
  "primary_contact": true,
  "authorize_to_trade": true,
  "address": {
    "post_code": "77023",
    "city": "Houston",
    "country": "USA",
    "unit_number": "",
    "street_number": "468",
    "street": "Bissonnet Plaza, El Campo",
    "street_type": "Plaza",
    "civic_number": "",
    "state": "Texas"
  }
}
```

**Response**

```json
{
  "customer_id": "34000247",
  "contact_id": "12345678"
}
```

**SDK Code**

```python Update Contact Request
import requests

url = "https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561"

payload = {
    "occupation": "Software Engineer",
    "employment_status": "Full-time",
    "industry": "Technology and Software",
    "phone_number": "(020)123456789",
    "mobile_number": "+44-987654321",
    "primary_contact": True,
    "authorize_to_trade": True,
    "address": {
        "post_code": "77023",
        "city": "Houston",
        "country": "USA",
        "unit_number": "",
        "street_number": "468",
        "street": "Bissonnet Plaza, El Campo",
        "street_type": "Plaza",
        "civic_number": "",
        "state": "Texas"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Update Contact Request
const url = 'https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"occupation":"Software Engineer","employment_status":"Full-time","industry":"Technology and Software","phone_number":"(020)123456789","mobile_number":"+44-987654321","primary_contact":true,"authorize_to_trade":true,"address":{"post_code":"77023","city":"Houston","country":"USA","unit_number":"","street_number":"468","street":"Bissonnet Plaza, El Campo","street_type":"Plaza","civic_number":"","state":"Texas"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Update Contact Request
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561"

	payload := strings.NewReader("{\n  \"occupation\": \"Software Engineer\",\n  \"employment_status\": \"Full-time\",\n  \"industry\": \"Technology and Software\",\n  \"phone_number\": \"(020)123456789\",\n  \"mobile_number\": \"+44-987654321\",\n  \"primary_contact\": true,\n  \"authorize_to_trade\": true,\n  \"address\": {\n    \"post_code\": \"77023\",\n    \"city\": \"Houston\",\n    \"country\": \"USA\",\n    \"unit_number\": \"\",\n    \"street_number\": \"468\",\n    \"street\": \"Bissonnet Plaza, El Campo\",\n    \"street_type\": \"Plaza\",\n    \"civic_number\": \"\",\n    \"state\": \"Texas\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Update Contact Request
require 'uri'
require 'net/http'

url = URI("https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"occupation\": \"Software Engineer\",\n  \"employment_status\": \"Full-time\",\n  \"industry\": \"Technology and Software\",\n  \"phone_number\": \"(020)123456789\",\n  \"mobile_number\": \"+44-987654321\",\n  \"primary_contact\": true,\n  \"authorize_to_trade\": true,\n  \"address\": {\n    \"post_code\": \"77023\",\n    \"city\": \"Houston\",\n    \"country\": \"USA\",\n    \"unit_number\": \"\",\n    \"street_number\": \"468\",\n    \"street\": \"Bissonnet Plaza, El Campo\",\n    \"street_type\": \"Plaza\",\n    \"civic_number\": \"\",\n    \"state\": \"Texas\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Update Contact Request
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"occupation\": \"Software Engineer\",\n  \"employment_status\": \"Full-time\",\n  \"industry\": \"Technology and Software\",\n  \"phone_number\": \"(020)123456789\",\n  \"mobile_number\": \"+44-987654321\",\n  \"primary_contact\": true,\n  \"authorize_to_trade\": true,\n  \"address\": {\n    \"post_code\": \"77023\",\n    \"city\": \"Houston\",\n    \"country\": \"USA\",\n    \"unit_number\": \"\",\n    \"street_number\": \"468\",\n    \"street\": \"Bissonnet Plaza, El Campo\",\n    \"street_type\": \"Plaza\",\n    \"civic_number\": \"\",\n    \"state\": \"Texas\"\n  }\n}")
  .asString();
```

```php Update Contact Request
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561', [
  'body' => '{
  "occupation": "Software Engineer",
  "employment_status": "Full-time",
  "industry": "Technology and Software",
  "phone_number": "(020)123456789",
  "mobile_number": "+44-987654321",
  "primary_contact": true,
  "authorize_to_trade": true,
  "address": {
    "post_code": "77023",
    "city": "Houston",
    "country": "USA",
    "unit_number": "",
    "street_number": "468",
    "street": "Bissonnet Plaza, El Campo",
    "street_type": "Plaza",
    "civic_number": "",
    "state": "Texas"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Update Contact Request
using RestSharp;

var client = new RestClient("https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"occupation\": \"Software Engineer\",\n  \"employment_status\": \"Full-time\",\n  \"industry\": \"Technology and Software\",\n  \"phone_number\": \"(020)123456789\",\n  \"mobile_number\": \"+44-987654321\",\n  \"primary_contact\": true,\n  \"authorize_to_trade\": true,\n  \"address\": {\n    \"post_code\": \"77023\",\n    \"city\": \"Houston\",\n    \"country\": \"USA\",\n    \"unit_number\": \"\",\n    \"street_number\": \"468\",\n    \"street\": \"Bissonnet Plaza, El Campo\",\n    \"street_type\": \"Plaza\",\n    \"civic_number\": \"\",\n    \"state\": \"Texas\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Update Contact Request
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "occupation": "Software Engineer",
  "employment_status": "Full-time",
  "industry": "Technology and Software",
  "phone_number": "(020)123456789",
  "mobile_number": "+44-987654321",
  "primary_contact": true,
  "authorize_to_trade": true,
  "address": [
    "post_code": "77023",
    "city": "Houston",
    "country": "USA",
    "unit_number": "",
    "street_number": "468",
    "street": "Bissonnet Plaza, El Campo",
    "street_type": "Plaza",
    "civic_number": "",
    "state": "Texas"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.currenciesdirect.com/v1/customers/0005924291/contacts/731561")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```