---
title: "Attach external customer ID to a customer"
method: POST
path: "/v1/customers/external-ids/{customerId}"
tags: ["Customer External Ids"]
---

# Attach external customer ID to a customer

`POST /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/post.ts> (a function with typed inputs; its response is checked against the schema)

External Ids are the ones from different commerce systems. This endpoint enables the API user to attach the external Ids to the Erply customers.

## Path parameters

- `customerId` integer, required

## Request body

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

## Response `201`

Created

- ResponsesEmptyResponse

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