---
title: "Fork a stack profile into a lower or equal scope"
method: POST
path: "/tools/v1/stack-profiles/{profile_id}/fork"
tags: ["curated-stack-profiles"]
---

# Fork a stack profile into a lower or equal scope

`POST /tools/v1/stack-profiles/{profile_id}/fork`

## Request

- Base URL: `https://api.qualityclouds.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.qualityclouds.ai/tools/v1/stack-profiles/{profile_id}/fork`
- Auth: one of:
  - HTTP bearer
  - OpenID Connect (`https://account.qualityclouds.com//realms/ai-production/.well-known/openid-configuration`)

Fork an existing stack profile into a target scope.

Exactly one of org_id, workspace_id, repository_id must be provided.
The target scope must be equal to or lower than the source scope.
All agents from the source are copied with origin='inherited'.

## Path parameters

- `profile_id` string, uuid, required

## Request body

- ForkStackProfileBody: Request body for forking a stack profile into a target scope.
  - `org_id` string, uuid, nullable
  - `workspace_id` string, uuid, nullable
  - `repository_id` string, nullable

## Response `201`

Successful Response

- ForkStackProfileResponse: Response body for a forked stack profile, including its agents.
  - `id` string, uuid, required
  - `name` string, required
  - `scope_type` 'global' | 'org' | 'workspace' | 'project', required: Four-level scope hierarchy for curated stack profiles.
  - `is_default` boolean, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `description` string, nullable
  - `parent_id` string, uuid, nullable
  - `created_by` string, nullable
  - `org_id` string, uuid, nullable
  - `workspace_id` string, uuid, nullable
  - `repository_id` string, nullable
  - `agents` AgentLinkResponse[]
    - `tool_id` string, required
    - `origin` string, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: Validation Error

---

[API](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api.md) · [All operations](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api/revisions/250c849925af?raw)
