---
title: "Set primary external system ID"
method: PUT
path: "/customerbase/v1/organizations/{id}/links/{externalSystem}/primary"
tags: ["CustomerBASE API"]
---

# Set primary external system ID

`PUT /customerbase/v1/organizations/{id}/links/{externalSystem}/primary`

Sets or updates the primary external system identifier for an organization

## Path parameters

- `id` string, required
- `externalSystem` string, required

## Request body

- CustomerbaseSetPrimaryExternalSystemIdRequest — Request to set or replace the primary external system ID
  - `externalId` string — The ID of the external system to be set as primary required: true example: stripe-1234

## Response `200`

Primary ID set successfully

- CustomerbaseExternalSystemResponse — Response structure for external system operations
  - `organization` CustomerbaseExternalSystemRecord — External system information and its relationship to an organization
    - `externalId` string — External system identifier example: stripe-1234
    - `externalSystem` string — Name of the external system example: stripe
    - `organizationId` string — Associated organization ID example: org-789
    - `primary` boolean — Indicates if this is the primary link example: true
  - `requestId` string
  - `status` string — Status indicates the result of the operation ("success" or "error")

## Other responses

- `400` — Invalid request parameters
- `401` — Unauthorized - Invalid or missing API key
- `404` — Organization or external system not found
- `500` — Internal server error

## Changes

- **2024-11-08** `23f9f8588813` — 1 info
  - endpoint added
- **2024-09-10** `1ee4ed170cfa` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/customeros/apis/customeros-api/changes/customerbase/v1/organizations/:id/links/:externalSystem/primary/put.md)

---

[API](https://skmtc.dev/customeros/apis/customeros-api.md) · [All operations](https://skmtc.dev/customeros/apis/customeros-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/customeros/customeros-api/revisions/73526747b270/schema)
