---
title: "Create"
method: POST
path: "/api/v1/decoys"
tags: ["Decoy"]
---

# Create

`POST /api/v1/decoys`

Create mints a decoy credential and returns the one-time vending
 material exactly once. The Decoy id is server-set; the credential's
 secret cannot be retrieved again after this response.

## Request body

- C1ApiDecoyV1DecoyServiceCreateRequest — The DecoyServiceCreateRequest message. This message contains a oneof named create_input. Only a single field of the following list may be set at a time: - userClientCredential - connectorClient - workloadFed - accessToken
  - `accessToken` C1ApiDecoyV1DecoyAccessTokenInput — DecoyAccessTokenInput mints a session access-token decoy under an existing User.
    - `expiresIn` string, duration, nullable
    - `subjectUserId` string — Existing User the access token's subject claim references.
  - `annotations` object — The annotations field.
  - `connectorClient` C1ApiDecoyV1DecoyConnectorClientInput — DecoyConnectorClientInput plants a connector-shaped credential decoy. The server allocates placement under the tenant's ConductorOne app; the customer makes no app/connector choice.
  - `description` string — The description field.
  - `displayName` string — The displayName field.
  - `userClientCredential` C1ApiDecoyV1DecoyUserClientCredentialInput — DecoyUserClientCredentialInput plants a client-credential decoy under an existing User. The User must be typ=HUMAN or typ=SERVICE.
    - `userId` string — Existing User to plant the decoy credential under.
  - `workloadFed` C1ApiDecoyV1DecoyWorkloadFederationInput — DecoyWorkloadFederationInput plants a workload-federation-trust decoy under an existing Provider. The Provider must already be registered so its JWKS is reachable for signature verification.
    - `conditionExpression` string — CEL boolean evaluated against the presented JWT's claims map. Same shape as the regular WorkloadFederationTrust condition expression. Example: `claims.sub.startsWith("repo:acme/fake-infra:")`.
    - `providerId` string — Existing WorkloadFederationProvider to bind the decoy Trust under.
    - `servicePrincipalUserId` string — Existing SERVICE-typed User the Trust would act-as on match.

## Response `200`

Successful response

- C1ApiDecoyV1DecoyServiceCreateResponse — The DecoyServiceCreateResponse message.
  - `decoy` C1ApiDecoyV1Decoy — Decoy is the read projection of a planted honey-credential. All fields except annotations are server-managed.
    - `annotations` object — Customer-defined grouping/filtering bag. PATCH semantics on Update: keys in the request overwrite, keys missing stay, keys set to empty string delete. Copied onto the Finding produced when a decoy fires, so routing rules can condition on the same keys.
    - `createdAt` string, date-time, nullable
    - `description` string — The description field.
    - `disabled` boolean — Admin-disabled.
    - `displayName` string — The displayName field.
    - `id` string — The id field.
    - `kind` 'DECOY_KIND_UNSPECIFIED' | 'DECOY_KIND_USER_CLIENT_CREDENTIAL' | 'DECOY_KIND_CONNECTOR_CLIENT' | 'DECOY_KIND_WORKLOAD_FEDERATION' | 'DECOY_KIND_ACCESS_TOKEN' — The kind field.
    - `lastUsedAt` string, date-time, nullable
    - `materialFingerprintSha256` string — Hex-encoded SHA256 of the secret string vended at Create / Rotate. Stable for the decoy's current material; changes only on Rotate. Empty for WorkloadFederation decoys (no server-vended secret).
    - `updatedAt` string, date-time, nullable
  - `material` C1ApiDecoyV1DecoyVendingMaterial — DecoyVendingMaterial carries the freshly-vended secret material returned exactly once at Create or Rotate. This message contains a oneof named material. Only a single field of the following list may be set at a time: - clientCredential - accessToken - workloadFederation
    - `accessToken` C1ApiDecoyV1DecoyAccessTokenMaterial — DecoyAccessTokenMaterial is returned for AccessToken decoys.
      - `accessToken` string — The accessToken field.
    - `clientCredential` C1ApiDecoyV1DecoyClientCredentialMaterial — DecoyClientCredentialMaterial is returned for UserClientCredential and ConnectorClient decoys.
      - `clientId` string — The clientId field.
      - `clientSecret` string — The clientSecret field.
    - `workloadFederation` C1ApiDecoyV1DecoyWorkloadFederationMaterial — DecoyWorkloadFederationMaterial is returned for WorkloadFederation decoys. No vended secret; the operator binds the trust on the IdP side.
      - `workloadFederationTrustId` string — The workloadFederationTrustId field.

---

[API](https://skmtc.net/conductorone/apis/c1-api.md) · [All operations](https://skmtc.net/conductorone/apis/c1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/conductorone/c1-api/revisions/f2cf3228f366/schema)
