> ## 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 opportunity relationships

> Add or remove relationships between an opportunity and other entities (solutions, outcomes, or insight)



## OpenAPI

````yaml /openapi/squad-api.json post /organisations/{orgId}/workspaces/{workspaceId}/opportunities/{opportunityId}/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}/opportunities/{opportunityId}/relationships/{action}:
    post:
      tags:
        - Opportunities
      summary: Manage opportunity relationships
      description: >-
        Add or remove relationships between an opportunity and other entities
        (solutions, outcomes, or insight)
      operationId: manageOpportunityRelationships
      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: opportunityId
          schema:
            type: string
          required: true
          description: Opportunity ID
          example: d4e71c2b-a498-42af-b7f5-69de06a0d7c4
        - 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/OpportunityRelationshipsPayload'
      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:
    OpportunityRelationshipsPayload:
      description: Request body for managing opportunity relationships
      type: object
      properties:
        solutionIds:
          description: Array of solution IDs to associate with the opportunity
          example:
            - a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d
          type: array
          items:
            type: string
        outcomeIds:
          description: Array of outcome IDs to associate with the opportunity
          example:
            - f6e5d4c3-b2a1-4b5a-9c8d-1e0f2a3b4c5d
          type: array
          items:
            type: string
        insightIds:
          description: Array of insight IDs to associate with the opportunity
          example:
            - c5d4e3f2-a1b2-4c5d-8e9f-0a1b2c3d4e5f
          type: array
          items:
            type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT authentication for organization-scoped endpoints.

````