---
title: "Update external Id of a customer"
method: PATCH
path: "/v1/customers/external-ids/{customerId}"
tags: ["Customer External Ids"]
---

# Update external Id of a customer

`PATCH /v1/customers/external-ids/{customerId}`

## Request

- Base URL: `` (relative, and it does not resolve against the document’s source URL)
- URL: `/v1/customers/external-ids/{customerId}`
- Auth: one of:
  - API key in header `sessionKey`
  - API key in header `clientCode`
  - API key in header `jwt`
- TypeScript: <https://skmtc.dev/erply/apis/crm-api/docs/v1/customers/external-ids/:customerId/patch.ts> (a function with typed inputs; its response is checked against the schema)

External Ids are the ones from different commerce systems that have to be stored in Erply
This call allows to update the external Id using the integration name and customer Id.

## Path parameters

- `customerId` integer, required

## Request body

- CustomersApiInternalModelsExternalIDRequest
  - `externalId` string
  - `integrationName` string

## Response `201`

Created

- ResponsesResponse
  - `id` integer

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error

---

[API](https://skmtc.dev/erply/apis/crm-api.md) - [All operations](https://skmtc.dev/erply/apis/crm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/erply/apis/crm-api/revisions/36dd4cc370b2?raw)
