> ## Documentation Index
> Fetch the complete documentation index at: https://docs.primevault.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a Contact

> Update a contact's asset list and contact groups. You can't change its name or address. The update needs your API user's approval.

**PUT** `/api/external/contacts/{contactId}/`

<Note>
  The current SDK update contract changes only `assetList` and `contactGroupIds`. It does not rename the contact or replace its address.
</Note>

## Path parameters

<ParamField path="contactId" type="string" required>
  The unique contact identifier.
</ParamField>

## Request body

<ParamField body="assetList" type="string[]">
  Assets permitted for the contact.
</ParamField>

<ParamField body="contactGroupIds" type="string[]">
  Organization-scoped contact groups to attach.
</ParamField>

## Response

```json theme={null}
{
  "id": "contact_123",
  "name": "Operations Wallet",
  "address": "0xAbC1234567890abcdef1234567890abcdef1234",
  "blockChain": "ETHEREUM",
  "tags": [
    "vendor",
    "priority"
  ],
  "externalId": "vendor-1001",
  "assetList": [
    "USDC"
  ]
}
```

## Approve the update

Updating a contact opens a change request that your API user must approve. Call [Get Approval Message](/approvals/get-approval-message) with `entityId` set to the contact `id`, sign the `message`, and send the signature to [Submit Approval Action](/approvals/submit-approval-action). See [Approvals](/approvals/overview) for the full flow.

With the SDK, `updateContactWithApproval()` updates and approves in one call, then returns the contact:

```typescript theme={null}
const contact = await apiClient.updateContactWithApproval({
  id: "contact_123",
  assetList: ["USDC"],
});
```

## JavaScript SDK

```typescript theme={null}
interface UpdateContactRequest {
  id: string;
  assetList?: string[];
  contactGroupIds?: string[];
}

updateContact(request: UpdateContactRequest): Promise<UpdateContactResponse>
updateContactWithApproval(request: UpdateContactRequest): Promise<Contact>
```

<RequestExample dropdown>
  ```json REST request body theme={null}
  {
    "assetList": ["USDC"],
    "contactGroupIds": ["contact_group_123"]
  }
  ```

  ```bash cURL theme={null}
  # Sample only. Generate a new signed token for each request
  # (see Authentication). Tokens expire after 120 seconds.
  curl --request PUT \
    --url "https://api.primevault.com/api/external/contacts/contact_123/" \
    --header "Authorization: Bearer <signed JWT>" \
    --header "Api-Key: <API key>" \
    --header "Content-Type: application/json" \
    --data '{
      "assetList": ["USDC"],
      "contactGroupIds": ["contact_group_123"]
    }'
  ```

  ```typescript JavaScript SDK theme={null}
  interface UpdateContactRequest {
    id: string;
    assetList?: string[];
    contactGroupIds?: string[];
  }

  updateContact(request: UpdateContactRequest): Promise<UpdateContactResponse>
  updateContactWithApproval(request: UpdateContactRequest): Promise<Contact>
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "contact_123",
    "name": "Operations Wallet",
    "address": "0xAbC1234567890abcdef1234567890abcdef1234",
    "blockChain": "ETHEREUM",
    "tags": [
      "vendor",
      "priority"
    ],
    "externalId": "vendor-1001",
    "assetList": [
      "USDC"
    ]
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.