> ## 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 Blockchain 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

Returns the updated contact's identifying fields, a subset of [Contact](/api-basics/data-models#contact).

<ResponseField name="id" type="string">
  Contact ID.
</ResponseField>

<ResponseField name="name" type="string">
  Contact display name.
</ResponseField>

<ResponseField name="address" type="string">
  Blockchain address.
</ResponseField>

<ResponseField name="blockChain" type="string">
  Chain of the address.
</ResponseField>

<ResponseField name="tags" type="string[]">
  Searchable contact tags.
</ResponseField>

<ResponseField name="externalId" type="string">
  Your own reference, if you set one.
</ResponseField>

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

## 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"],
});
```

<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 dropdown>
  ```json Response example theme={null}
  {
    "id": "contact_123",
    "name": "Operations Wallet",
    "address": "0xAbC1234567890abcdef1234567890abcdef1234",
    "blockChain": "ETHEREUM",
    "tags": [
      "vendor",
      "priority"
    ],
    "externalId": "vendor-1001",
    "assetList": [
      "USDC"
    ]
  }
  ```

  ```typescript JavaScript SDK theme={null}
  // updateContact() returns a subset of Contact fields.
  type UpdateContactResponse = Pick<
    Contact,
    "id" | "name" | "address" | "blockChain" | "tags" | "externalId" | "assetList"
  >;
  ```
</ResponseExample>


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