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

# Update an edge

> Updates the `properties` JSON on an edge. Identity fields — `edge_type`, `source_id`, `target_id` — are immutable after creation; attempts to change them return `400 validation_error`. To re-point an edge to a different target, delete the existing edge and create a new one.

Dual-gated on the source item's type write permission and the edge type's write permission, same as edge create.



## OpenAPI

````yaml /openapi.json patch /edges/{id}
openapi: 3.1.0
info:
  title: Marfa API
  version: 4.2.0
  description: Typed data layer for structured personal data
servers: []
security: []
paths:
  /edges/{id}:
    patch:
      tags:
        - Edges
      summary: Update an edge
      description: >-
        Updates the `properties` JSON on an edge. Identity fields — `edge_type`,
        `source_id`, `target_id` — are immutable after creation; attempts to
        change them return `400 validation_error`. To re-point an edge to a
        different target, delete the existing edge and create a new one.


        Dual-gated on the source item's type write permission and the edge
        type's write permission, same as edge create.
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                properties:
                  type: object
                  additionalProperties:
                    nullable: true
              required:
                - properties
      responses:
        '200':
          description: Edge updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  edge:
                    type: object
                    properties:
                      id:
                        type: string
                      tenant_id:
                        type: string
                        nullable: true
                      source_id:
                        type: string
                      target_id:
                        type: string
                      edge_type:
                        type: string
                      properties:
                        type: object
                        additionalProperties:
                          nullable: true
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                      - id
                      - source_id
                      - target_id
                      - edge_type
                      - properties
                      - created_at
                      - updated_at
                required:
                  - edge
        '400':
          description: Attempted to change immutable field
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - validation_error
                          - missing_required_field
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
        '404':
          description: Edge not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - edge_not_found
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or OAuth Token
      description: Pass an API key (marfa_k1_...) or OAuth access token (marfa_at_...)

````