---
title: "幂等创建关联首单，不自动执行或绕过发布权限"
method: POST
path: "/onboarding/sessions/{id}/first-release"
tags: ["onboarding"]
---

# 幂等创建关联首单，不自动执行或绕过发布权限

`POST /onboarding/sessions/{id}/first-release`

## Request

- Base URL: `/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/onboarding/sessions/{id}/first-release`
- Auth: none declared

## Path parameters

- `id` string, required

## Request body

- InternalInterfacesHttpOnboardingFirstReleaseRequest
  - `expected_version` integer
  - `order` InternalInterfacesHttpCreateReleaseOrderRequest
    - `application_id` string
    - `env_code` string
    - `git_ref` string
    - `image_tag` string
    - `params` InternalInterfacesHttpCreateReleaseOrderParamRequest[]
      - `executor_param_name` string
      - `param_key` string
      - `param_value` string
      - `pipeline_scope` string
      - `value_source` string
    - `project_name` string
    - `release_name` string
    - `remark` string
    - `steps` InternalInterfacesHttpCreateReleaseOrderStepRequest[]
      - `sort_no` integer
      - `step_code` string
      - `step_name` string
    - `template_id` string
    - `trigger_type` string
    - `triggered_by` string
  - `request_key` string

## Response `201`

Created

- InternalInterfacesHttpOnboardingSessionResponse
  - `data` GosInternalDomainOnboardingSession
    - `check` GosInternalDomainOnboardingCheck
      - `issues` GosInternalDomainOnboardingIssue[]
        - `code` string
        - `field_path` string
        - `message` string
        - `remedy` string
        - `severity` string
        - `step` string
      - `status` string
    - `created_at` string
    - `current_step` string
    - `draft` GosInternalDomainOnboardingDraft
      - `approval_flow_id` string
      - `branch` string
      - `cd_pipeline_id` string
      - `change_approval_flow` boolean: Existing application policies are preserved unless this explicit switch is set.
      - `ci_pipeline_id` string
      - `identity` GosInternalDomainOnboardingIdentity
        - `description` string
        - `key` string
        - `name` string
        - `owner_user_id` string
        - `project_id` string
        - `project_key` string
        - `project_name` string
      - `params` GosInternalDomainOnboardingParameter[]
        - `fixed_value` string
        - `name` string
        - `new_field_name` string
        - `omit` boolean
        - `param_key` string
        - `scope` string
        - `source_param_key` string
        - `value_source` string
      - `repo_url` string
      - `save_app_sources` boolean
      - `template_name` string
    - `first_release_order_id` string
    - `id` string
    - `mode` string
    - `owner_user_id` string
    - `refs` GosInternalDomainOnboardingReferences
      - `application_id` string
      - `cd_binding_id` string
      - `ci_binding_id` string
      - `project_id` string
      - `template_id` string
    - `status` string
    - `updated_at` string
    - `version` integer

## Other responses

- `403`: Forbidden
- `409`: Conflict
- `422`: Unprocessable Entity

## Changes

- **2026-09-09** `26b0f6ed4a12`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/opsre/apis/gos-release-api/changes/onboarding/sessions/:id/first-release/post.md)

---

[API](https://skmtc.dev/opsre/apis/gos-release-api.md) - [All operations](https://skmtc.dev/opsre/apis/gos-release-api/llms.txt) - [OpenAPI document](https://skmtc.dev/opsre/apis/gos-release-api/revisions/26b0f6ed4a12?raw)
