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

# Create a soft FK edge

> Create a new Soft FK edge within a context pack.



## OpenAPI

````yaml /openapi/em-runtime-utils-v2.yaml post /utils/context-packs/{name}/soft-fk-edges
openapi: 3.1.0
info:
  title: em_runtime_utils
  version: 5.27.0
servers: []
security: []
paths:
  /utils/context-packs/{name}/soft-fk-edges:
    post:
      tags:
        - soft-fk-edges
      summary: Create a soft FK edge
      description: Create a new Soft FK edge within a context pack.
      operationId: create_soft_fk_edge
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
            description: Context pack name
            title: Name
          description: Context pack name
        - name: X-Project-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Project-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SoftFkEdgeCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SoftFkEdgeResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Duplicate edge
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    SoftFkEdgeCreateRequest:
      properties:
        from_table:
          type: string
          title: From Table
        from_column:
          type: string
          title: From Column
        to_table:
          type: string
          title: To Table
        to_column:
          type: string
          title: To Column
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        source:
          $ref: '#/components/schemas/SoftFkEdgeSource'
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
          default: 1
      type: object
      required:
        - from_table
        - from_column
        - to_table
        - to_column
        - source
      title: SoftFkEdgeCreateRequest
    SoftFkEdgeResponse:
      properties:
        id:
          type: string
          title: Id
        organization_id:
          type: string
          title: Organization Id
        project_id:
          type: string
          title: Project Id
        context_pack_id:
          type: string
          title: Context Pack Id
        from_table:
          type: string
          title: From Table
        from_column:
          type: string
          title: From Column
        to_table:
          type: string
          title: To Table
        to_column:
          type: string
          title: To Column
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        source:
          $ref: '#/components/schemas/SoftFkEdgeSource'
        confidence:
          type: number
          title: Confidence
        status:
          $ref: '#/components/schemas/SoftFkEdgeStatus'
        deprecated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deprecated At
        deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deleted At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - organization_id
        - project_id
        - context_pack_id
        - from_table
        - from_column
        - to_table
        - to_column
        - description
        - source
        - confidence
        - status
        - deprecated_at
        - deleted_at
        - created_at
        - updated_at
      title: SoftFkEdgeResponse
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorResponse
      description: Standard error response model.
    SoftFkEdgeSource:
      type: string
      enum:
        - manual
        - ingestion
        - inferred
      title: SoftFkEdgeSource
      description: Origin of a soft FK edge.
    SoftFkEdgeStatus:
      type: string
      enum:
        - active
        - deprecated
        - deleted
      title: SoftFkEdgeStatus
      description: Lifecycle status of a soft FK edge.
    ErrorBody:
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          title: Message
        details:
          additionalProperties: true
          type: object
          title: Details
        request_id:
          type: string
          title: Request Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
      type: object
      required:
        - code
        - message
        - request_id
        - timestamp
      title: ErrorBody
      description: Error body with structured details.
    ErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - INVALID_TOKEN
        - INSUFFICIENT_PERMISSIONS
        - RESOURCE_NOT_FOUND
        - RESOURCE_ALREADY_EXISTS
        - VALIDATION_ERROR
        - RATE_LIMIT_EXCEEDED
        - SERVICE_UNAVAILABLE
        - INTERNAL_ERROR
      title: ErrorCode
      description: Standard error codes for API responses.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````