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

# Manage metric relationships

> Add or remove relationships between a metric and other entities (outcomes)



## OpenAPI

````yaml /openapi/squad-api.json post /organisations/{orgId}/workspaces/{workspaceId}/metrics/{metricId}/relationships/{action}
openapi: 3.1.0
info:
  title: Squad API
  version: 4.8.0
  description: API for managing Squad resources
  contact:
    name: Squad Support
    url: https://www.meetsquad.ai/support
    email: help@meetsquad.ai
servers:
  - url: https://api.meetsquad.ai
    description: Production server
  - url: https://uat.api.meetsquad.ai
    description: Staging server
  - url: https://dev.api.meetsquad.ai
    description: Development server
security: []
tags:
  - name: Organisations
  - name: Workspaces
  - name: Goals
  - name: Opportunities
  - name: Solutions
  - name: Feedback
  - name: Submit Feedback
  - name: Insights
  - name: Knowledge
  - name: Metrics
  - name: Topics
  - name: Integrations
  - name: AI & Search
  - name: Onboarding
paths:
  /organisations/{orgId}/workspaces/{workspaceId}/metrics/{metricId}/relationships/{action}:
    post:
      tags:
        - Metrics
      summary: Manage metric relationships
      description: >-
        Add or remove relationships between a metric and other entities
        (outcomes)
      operationId: manageMetricRelationships
      parameters:
        - in: path
          name: orgId
          schema:
            type: string
          required: true
          description: Organization ID
          example: a5f3c6e1-9d20-4f7b-8e31-d09a2b63c184
        - in: path
          name: workspaceId
          schema:
            type: string
          required: true
          description: Workspace ID
          example: c0e195d9-b918-4a3a-bd8b-f730361d044f
        - in: path
          name: metricId
          schema:
            type: string
          required: true
          description: Metric ID
          example: 7b9e5d2c-f314-48a9-be56-9843a2f6c019
        - in: path
          name: action
          schema:
            type: string
            enum:
              - add
              - remove
          required: true
          description: Action to perform on relationships
          example: add
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetricRelationshipsPayload'
      responses:
        '204':
          description: Relationships successfully modified
        '400':
          description: Bad request - invalid input parameters
        '401':
          description: Unauthorized - invalid or missing authentication
        '404':
          description: Resource not found
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
components:
  schemas:
    MetricRelationshipsPayload:
      description: Request body for managing metric relationships
      type: object
      properties:
        outcomeIds:
          description: Array of outcome IDs to associate with the metric
          example:
            - a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d
          type: array
          items:
            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT authentication for organization-scoped endpoints.

````