# Trigger Subprocess from Task

Triggers a subprocess release from a task within the specified release

Endpoint: POST /rmg/api/release/{releaseId}/subprocess/trigger
Version: 1.0
Security: x-api-key

## Path parameters:

  - `releaseId` (string, required)
    Unique identifier for the release

## Header parameters:

  - `Harness-Account` (string, required)
    Account Identifier

## Query parameters:

  - `orgIdentifier` (string)
    Organisation Identifier

  - `projectIdentifier` (string)
    Project Identifier

  - `task_id` (string, required)
    The user_reference_id of the task that triggers the subprocess

## Request fields (application/json):

  - `subprocessInfo` (object, required)

  - `subprocessInfo.processIdentifier` (string, required)
    Process identifier. Required when retryWith is SUBPROCESS.

  - `subprocessInfo.processInputIdentifier` (string, required)
    Process input identifier. Required when retryWith is SUBPROCESS.

  - `subprocessInfo.releaseInput` (string, required)
    Release input YAML. Required when retryWith is SUBPROCESS.

  - `subprocessInfo.output` (object, required)
    Output map with key-value pairs.

## Response 200 fields (application/json):

  - `activityExecutionId` (string, required)
    ID of the newly created activity execution

## Response 400 fields (application/json):

  - `message` (string, required)
    error message detail

  - `code` (string)
    canonical error code name
    Enum: "BAD_REQUEST", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "INTERNAL_SERVER_ERROR"


