---
title: "Create connector target"
method: POST
path: "/v1/connector-instances/{connectorInstanceId}/targets"
tags: ["Connectors"]
---

# Create connector target

`POST /v1/connector-instances/{connectorInstanceId}/targets`

Creates a connector target under a connector instance.

## Path parameters

- `connectorInstanceId` string, typeid, required

## Request body

- object
  - `connectorType` 'github', required
  - `remoteId` string, required
  - `targetKind` 'repository_branch', required
  - `externalTargetRef` string, nullable
  - `config` object, required

## Response `201`

Connector target created successfully.

- PluginArchConnectorTargetMutationResponse
  - `ok` true, required
  - `item` PluginArchConnectorTarget, required
    - `id` string, typeid, required — Den TypeID with 'ctg_' prefix and a 26-character base32 suffix.
    - `connectorInstanceId` string, typeid, required — Den TypeID with 'cin_' prefix and a 26-character base32 suffix.
    - `connectorType` 'github', required
    - `remoteId` string, required
    - `targetKind` 'repository_branch', required
    - `externalTargetRef` string, nullable, required
    - `targetConfigJson` object, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400` — The connector target creation request was invalid.
- `401` — The caller must be signed in to create connector targets.
- `403` — The caller lacks permission to edit this connector instance.
- `404` — The connector instance could not be found.

## Changes

- **2026-08-20** `93df40e2efd5` — 3 info
  - removed the pattern `^cin_.*` from the `path` request parameter `connectorInstanceId`
  - the `item/connectorInstanceId` response's property pattern `^cin_.*` was removed for the status `201`
  - the `item/id` response's property pattern `^ctg_.*` was removed for the status `201`

[Change history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/connector-instances/:connectorInstanceId/targets/post.md)

---

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