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

# Update integration flow

> UpdateIntegrationFlow updates or creates a new flow with the given name.
This endpoint will overwrite the entire flow with the provided data.




## OpenAPI

````yaml /openapi/platform-api.yaml put /o/{organisation_id}/projects/{project_id}/workflows/{flow_name}
openapi: 3.1.0
info:
  title: Versori Platform API
  version: 0.0.1
  license:
    name: UNLICENSED
servers:
  - description: Production
    url: https://platform.versori.com/api/v2
  - description: Staging
    url: https://platform-staging.versori.com/api/v2
  - description: Development
    url: http://localhost:8901
security:
  - bearerToken: []
  - cookie: []
paths:
  /o/{organisation_id}/projects/{project_id}/workflows/{flow_name}:
    parameters:
      - $ref: '#/components/parameters/organisation_id'
      - $ref: '#/components/parameters/project_id'
      - $ref: '#/components/parameters/flow_name'
    put:
      tags:
        - projects
      summary: Update integration flow
      description: |
        UpdateIntegrationFlow updates or creates a new flow with the given name.
        This endpoint will overwrite the entire flow with the provided data.
      operationId: UpdateIntegrationFlow
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IntegrationFlow'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationFlow'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    organisation_id:
      name: organisation_id
      in: path
      required: true
      schema:
        type: string
        format: ulid
        x-go-type: ulid.ULID
        x-go-name: OrganisationID
        x-go-type-import:
          path: versori.dev/vergo/ulid
    project_id:
      name: project_id
      in: path
      required: true
      schema:
        type: string
        format: ulid
        x-go-type: ulid.ULID
        x-go-name: ProjectID
        x-go-type-import:
          path: versori.dev/vergo/ulid
    flow_name:
      name: flow_name
      in: path
      required: true
      schema:
        type: string
  schemas:
    IntegrationFlow:
      description: |
        IntegrationFlow represents the flow of an integration.
      type: object
      properties:
        id:
          type: string
          description: ID of the flow. This is set by the back-end only.
          x-go-type: ulid.ULID
          x-go-type-import:
            path: versori.dev/vergo/ulid
          x-go-type-skip-optional-pointer: true
        name:
          type: string
          description: Name of the flow.
        description:
          type: string
          description: Description of the flow.
        spans:
          type: array
          items:
            $ref: '#/components/schemas/OTelSpan'
      required:
        - spans
        - name
        - description
    Error:
      type: object
      properties:
        code:
          type: string
          description: Code is a machine-readable error code.
        message:
          type: string
          description: Message is a human-readable error message.
        fields:
          type: array
          items:
            $ref: '#/components/schemas/ErrorField'
          x-go-type-skip-optional-pointer: true
        details:
          type: string
          x-go-type-skip-optional-pointer: true
      required:
        - code
        - message
    OTelSpan:
      description: >
        OTelSpan represents an OpenTelemetry span containing execution trace
        data.
      type: object
      properties:
        name:
          type: string
          description: Name of the span (e.g., "webhook-incoming-webhook").
        startTime:
          type: string
          format: date-time
          description: Start time of the span in ISO 8601 format with nanosecond precision.
        endTime:
          type: string
          format: date-time
          description: End time of the span in ISO 8601 format with nanosecond precision.
        duration:
          type: number
          description: Duration of the span in milliseconds.
          x-go-type: float64
        attributes:
          type: object
          description: >-
            Key-value pairs of span attributes (e.g., task.id, task.type,
            execution.id).
          additionalProperties:
            oneOf:
              - type: string
              - type: number
              - type: boolean
          x-go-type: map[string]any
        status:
          $ref: '#/components/schemas/OTelSpanStatus'
        ended:
          type: boolean
          description: Whether the span has ended.
        events:
          type: array
          description: List of timestamped events that occurred during the span's lifetime.
          items:
            $ref: '#/components/schemas/OTelSpanEvent'
        spanContext:
          $ref: '#/components/schemas/OTelSpanContext'
        parentSpanContext:
          $ref: '#/components/schemas/OTelSpanContext'
        parentSpanContenxt:
          $ref: '#/components/schemas/OTelSpanContext'
      required:
        - name
        - startTime
        - endTime
        - duration
        - attributes
        - status
        - ended
        - events
        - spanContext
    ErrorField:
      description: ErrorField denotes a field which has an error.
      type: object
      properties:
        field:
          type: string
          description: >
            Field is the name of the field which has an error, this may be a
            path to a nested field, including array

            elements. The format of this field is of the form:
            "field1.field2[0].field3"
        message:
          type: string
          description: Message is the error message for this specific field.
      required:
        - field
        - message
    OTelSpanStatus:
      description: |
        OTelSpanStatus represents the status of a span.
      type: object
      properties:
        code:
          type: integer
          description: Status code (0 = OK, 1 = ERROR).
          enum:
            - 0
            - 1
      required:
        - code
    OTelSpanEvent:
      description: >
        OTelSpanEvent represents a timestamped event that occurred during a
        span's lifetime.

        Events are structured log messages or annotations on a span, typically
        used to denote

        meaningful, singular points in time during the span's duration.
      type: object
      properties:
        name:
          type: string
          description: Name of the event (e.g., "exception", "message", "annotation").
        timestamp:
          type: string
          format: date-time
          description: >-
            Timestamp when the event occurred in ISO 8601 format with nanosecond
            precision.
        attributes:
          type: object
          description: Key-value pairs providing additional context about the event.
          additionalProperties:
            oneOf:
              - type: string
              - type: number
              - type: boolean
          x-go-type: map[string]any
      required:
        - name
        - timestamp
    OTelSpanContext:
      description: |
        OTelSpanContext contains the trace context information for a span.
      type: object
      properties:
        traceId:
          type: string
          description: >-
            Trace ID as a hexadecimal string (e.g.,
            "9ea9841f48ab9d1b1160498e495dba21").
        spanId:
          type: string
          description: Span ID as a hexadecimal string (e.g., "cad7bad55be81653").
        traceFlags:
          type: integer
          description: Trace flags indicating sampling and other options.
      required:
        - traceId
        - spanId
        - traceFlags
  securitySchemes:
    bearerToken:
      description: >
        Bearer token authentication used by the Versori Platform. External
        consumers must provide an API key, however

        internal consumers must provide a JWT id_token issued by our IdP.
      type: http
      scheme: bearer
    cookie:
      description: Cookie authentication used by the Versori Platform.
      type: apiKey
      in: cookie
      name: cookie

````