# Update company external reference

`PUT /public/api/v1/Tenants/{tenantId}/Companies/{companyId}/ExternalReference`

User API · Companies · base URL `https://user-api.ancon.io` · auth: `Access-Token` header · docs: https://ancon.dev/api/user/companies/update-company-external-reference

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tenantId` | string (uuid) | yes |  |
| `companyId` | string (uuid) | yes |  |

## Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `correlationId` | string | no | Correlation Id for the request |

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `customerId` | string or null | no |  |

### Example

```json
{
  "customerId": "1234"
}
```

## Responses

| Status | Description |
| --- | --- |
| 200 | OK |
| 400 | Bad Request |
| 404 | Not Found |

### 200 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `companyIntegration` | object or null | no |  |
| `companyIntegration.id` | string (uuid) | no |  |
| `companyIntegration.integrationId` | string (uuid) or null | no |  |
| `companyIntegration.externalId` | string or null | no |  |
| `companyIntegration.integrationType` | integer (int32) or null | no | Allowed values: `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15`, `16`, `17`, `18`, `19`, `20`, `21`, `22`, `23`, `24`, `25`, `26`, `27`, `28`, `29`, `30`, `31`, `32`, `-2`, `-1`. |
| `companyIntegration.created` | string (date-time) | no |  |
| `companyIntegration.modified` | string (date-time) | no |  |

#### Example

```json
{
  "companyIntegration": {
    "id": "0abaa86d-baca-4415-8ebc-88bce4984fcc",
    "integrationId": null,
    "externalId": "1234",
    "integrationType": null,
    "created": "2026-10-23T14:33:35.467083Z",
    "modified": "2026-10-23T14:33:35.4670832Z"
  }
}
```

### 400 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string or null | no |  |
| `errorCode` | string (uuid) | no |  |
| `additionalData` | any or null | no |  |

#### Example (from schema)

```json
{
  "message": "string",
  "errorCode": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "additionalData": null
}
```

### 404 response (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string or null | no |  |
| `errorCode` | string (uuid) | no |  |

#### Example (from schema)

```json
{
  "message": "string",
  "errorCode": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
```

## Example request

```bash
curl -X PUT "https://user-api.ancon.io/public/api/v1/Tenants/{tenantId}/Companies/{companyId}/ExternalReference" \
  -H "Access-Token: $ANCON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "customerId": "1234"
}'
```
