> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bedrock.quarry-systems.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Scope Hierarchy Edge

> Create a parent-child relationship between two scopes

## Request Body

<ParamField body="parentScopeId" type="string" required>
  The parent scope ID
</ParamField>

<ParamField body="childScopeId" type="string" required>
  The child scope ID
</ParamField>

## Response

Returns the created hierarchy edge object.

<Note>
  The scope types must have a valid type hierarchy relationship for this edge to be created.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST 'https://api.example.com/scope-hierarchy' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{
      "parentScopeId": "scope_org",
      "childScopeId": "scope_team"
    }'
  ```

  ```javascript Node.js theme={null}
  const axios = require('axios');

  const { data } = await axios.post('https://api.example.com/scope-hierarchy', {
    parentScopeId: 'scope_org',
    childScopeId: 'scope_team',
  }, {
    headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "edge_123",
    "parentScopeId": "scope_org",
    "childScopeId": "scope_team"
  }
  ```
</ResponseExample>
