---
title: "Create connector mapping"
method: POST
path: "/v1/connector-targets/{connectorTargetId}/mappings"
tags: ["Connectors"]
---

# Create connector mapping

`POST /v1/connector-targets/{connectorTargetId}/mappings`

Creates a connector mapping.

## Path parameters

- `connectorTargetId` string, typeid, required

## Request body

- object
  - `mappingKind` 'path' | 'api' | 'custom', required
  - `selector` string, required
  - `objectType` 'skill' | 'agent' | 'command' | 'tool' | 'mcp' | 'hook' | 'context' | 'custom' | 'script' | 'workflow' | 'app', required
  - `pluginId` string, typeid, nullable — Den TypeID with 'plg_' prefix and a 26-character base32 suffix.
  - `autoAddToPlugin` boolean
  - `config` object

## Response `201`

Connector mapping created successfully.

- PluginArchConnectorMappingMutationResponse
  - `ok` true, required
  - `item` PluginArchConnectorMapping, required
    - `id` string, typeid, required — Den TypeID with 'cmp_' prefix and a 26-character base32 suffix.
    - `connectorInstanceId` string, typeid, required — Den TypeID with 'cin_' prefix and a 26-character base32 suffix.
    - `connectorTargetId` string, typeid, required — Den TypeID with 'ctg_' prefix and a 26-character base32 suffix.
    - `connectorType` 'github', required
    - `remoteId` string, nullable, required
    - `mappingKind` 'path' | 'api' | 'custom', required
    - `selector` string, required
    - `objectType` 'skill' | 'agent' | 'command' | 'tool' | 'mcp' | 'hook' | 'context' | 'custom' | 'script' | 'workflow' | 'app', required
    - `pluginId` string, typeid, nullable, required — Den TypeID with 'plg_' prefix and a 26-character base32 suffix.
    - `autoAddToPlugin` boolean, required
    - `mappingConfigJson` object, nullable, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

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

## Changes

- **2026-08-20** `93df40e2efd5` — 1 warning, 7 info
  - added the new `workflow` enum value to the `item/objectType` response property for the response status `201`
  - removed the pattern `^ctg_.*` from the `path` request parameter `connectorTargetId`
  - added the new `workflow` enum value to the request property `objectType`
  - removed the pattern `^plg_.*` from the request property `pluginId/anyOf[subschema #1]/`
  - …4 more
- **2026-08-14** `6915dfb03e5d` — 1 warning, 1 info
  - added the new `app` enum value to the `item/objectType` response property for the response status `201`
  - added the new `app` enum value to the request property `objectType`
- **2026-08-10** `54cdbd4ecffa` — 1 warning, 1 info
  - added the new `script` enum value to the `item/objectType` response property for the response status `201`
  - added the new `script` enum value to the request property `objectType`

[Change history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/connector-targets/:connectorTargetId/mappings/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/fe0f1bb6188e/schema)
