postCreate a deployment

Creates a deployment and its routing atomically. It immediately routes 100% of traffic to this version for the decision/environment pair. The environment and decision snapshot must exist in the active workspace; sub-decisions cannot be deployed directly. Supply deployedBy explicitly. version: null is normalized to 0 (the working copy). Routing percentage and scheduling fields are not accepted.

Required service-token scope: deployment:write. End-user access is checked against workspace policies. Send a Bearer token and the X-Workspace-Id header.

curl --request POST \
  --url https://api.test.neobits.ai/logic/v1/deployments \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'X-Workspace-Id: 019991b1-0000-7000-8000-000000000001' \
  --header 'Content-Type: application/json' \
  --data '{"decisionId":"019991b1-0000-7000-8000-000000000003","version":1,"environmentId":"019991b1-0000-7000-8000-000000000002","name":"Eligibility v1","message":"Initial deployment","deployedBy":"Integration service"}'

Request

Headers

  • Authorization•string

    Bearer token authentication using OAuth 2.0 client credentials flow.

  • X-Workspace-Id•string<uuid>

    Active workspace UUID. The authenticated principal must have access to this workspace.

Body

  • decisionId•string<uuid>

    Standalone decision to deploy. Sub-decisions are deployed with their parent.

  • version•integer

    Saved version number, or 0/null for the working copy. Null is normalized to 0 in the response. Use a saved version for a reproducible deployment.

  • environmentId•string<uuid>

    Environment in the active workspace.

  • name•string

    Nonempty deployment name without leading or trailing whitespace.

  • message•string

    Release notes. Use null or an empty string to clear them.

  • deployedBy•string

    Caller-supplied attribution; required and not inferred from the access token.

Response

Headers

  • Content-Type•string

    The content type of the response.

Body

  • id•string<uuid>

    Deployment identifier.

  • workspaceId•string<uuid>

    Workspace containing this resource.

  • decisionId•string<uuid>

    Standalone decision to deploy. Sub-decisions are deployed with their parent.

  • version•integer

    Saved version number, or 0/null for the working copy. Null is normalized to 0 in the response. Use a saved version for a reproducible deployment.

  • environmentId•string<uuid>

    Environment in the active workspace.

  • name•string

    Nonempty deployment name without leading or trailing whitespace.

  • message•string

    Release notes. Use null or an empty string to clear them.

  • deployedBy•string

    Caller-supplied attribution; required and not inferred from the access token.

  • milestone•integer

    Snapshot milestone; always 0 for a deployment.

  • createdAt•string<date-time>

    Creation time.

  • updatedAt•string<date-time>

    Last update time.