---
title: "Create or upsert a connector with encrypted secret"
method: POST
path: "/organizations/{orgId}/connectors"
tags: ["connectors"]
---

# Create or upsert a connector with encrypted secret

`POST /organizations/{orgId}/connectors`

## Request

- Base URL: `https://api.letsship.ai/v1`
- URL: `https://api.letsship.ai/v1/organizations/{orgId}/connectors`
- Auth: none declared

## Path parameters

- `orgId` string, required

## Request body

- CreateConnectorRequest
  - `vendor` string, required
  - `vendorKind` 'tracker' | 'scm' | 'llm' | 'notification', required
  - `externalOrgId` string, required
  - `displayName` string, nullable
  - `secret` union, required
    - LinearTrackerSecret
      - `accessToken` string, required
      - `refreshToken` string
      - `expiresAt` integer
      - `workspaceId` string, required
      - `workspaceName` string
      - `apiKey` string
    - GithubScmSecret
      - `appId` string, required
      - `installationId` string, required
      - `privateKeyPem` string, required
      - `botLogin` string
      - `botUserId` string
    - AnthropicLlmSecret
      - `apiKey` string, required
    - OpenaiLlmSecret
      - `apiKey` string
  - `githubUserAuthorization` object
    - `code` string, required

## Response `200`

Connector

- Connector
  - `id` string, required
  - `orgId` string, required
  - `vendor` string, required
  - `vendorKind` 'tracker' | 'scm' | 'llm' | 'notification', required
  - `externalOrgId` string, required
  - `displayName` string, nullable, required
  - `credentialType` 'oauth' | 'api', nullable, required
  - `createdAt` integer, required
  - `updatedAt` integer, required

## Other responses

- `403`: Role insufficient
- `404`: Org not found
- `409`: External account already connected to another org
- `503`: User authorization or the trial key is not set up here (code names which)

---

[API](https://skmtc.dev/letsship/apis/ship-api.md) · [All operations](https://skmtc.dev/letsship/apis/ship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/letsship/apis/ship-api/revisions/e6eac1bcadd4?raw)
