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

# Update a workflow

> Updates a future-content workflow configuration, including activation state, target accounts, and optional `settings.content_filters`.



## OpenAPI

````yaml /openapi/public-api.yaml put /v1/workflows/{id}
openapi: 3.1.0
info:
  title: PostOnce Public API
  version: 1.0.0-alpha
  description: Public API for PostOnce paid users
servers:
  - url: https://postonce.to/api/public
security:
  - bearerAuth: []
paths:
  /v1/workflows/{id}:
    put:
      summary: Update a workflow
      description: >-
        Updates a future-content workflow configuration, including activation
        state, target accounts, and optional `settings.content_filters`.
      parameters:
        - $ref: '#/components/parameters/workflowId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                  nullable: true
                source_account_id:
                  type: string
                target_account_ids:
                  type: array
                  items:
                    type: string
                is_active:
                  type: boolean
                future_content_enabled:
                  type: boolean
                settings:
                  $ref: '#/components/schemas/WorkflowSettings'
            examples:
              pauseWorkflow:
                value:
                  is_active: false
              refineFilters:
                value:
                  settings:
                    content_filters:
                      types:
                        text: false
                        image: true
                        quote: false
                        video: true
                      hashtags:
                        include:
                          - launch
                        exclude:
                          - sponsored
      responses:
        '200':
          description: Workflow updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Workflow'
        '401':
          description: Missing, invalid, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthErrorResponse'
components:
  parameters:
    workflowId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Workflow ID.
  schemas:
    WorkflowSettings:
      type: object
      properties:
        content_filters:
          type: object
          properties:
            types:
              type: object
              properties:
                text:
                  type: boolean
                image:
                  type: boolean
                quote:
                  type: boolean
                video:
                  type: boolean
            hashtags:
              type: object
              properties:
                include:
                  type: array
                  items:
                    type: string
                exclude:
                  type: array
                  items:
                    type: string
        destination_publish_settings:
          type: object
          additionalProperties:
            type: object
            properties:
              minimum_interval_minutes:
                type: integer
                minimum: 1
              snapchat:
                type: object
                required:
                  - publish_targets
                properties:
                  publish_targets:
                    type: array
                    minItems: 1
                    uniqueItems: true
                    items:
                      type: string
                      enum:
                        - spotlight
                        - public_story
                  locale:
                    type: string
                    pattern: ^[a-z]{2}_[A-Z]{2}$
                    default: en_US
    Workflow:
      type: object
      properties:
        id:
          type: string
        profile_id:
          type: string
        source_account_id:
          type: string
        target_account_ids:
          type: array
          items:
            type: string
        settings:
          $ref: '#/components/schemas/WorkflowSettings'
        is_active:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        description:
          type: string
          nullable: true
        future_content_enabled:
          type: boolean
        last_checked:
          type: string
          format: date-time
          nullable: true
        last_enabled_at:
          type: string
          format: date-time
          nullable: true
    AuthErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_api_key
            message:
              type: string
              example: Invalid API key.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````