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

# Activate flow

> Activates a reviewed flow so it starts sending real messages. Requires the revision the person reviewed; if the flow changed after it, the call fails with 409 and returns the current revision. Runs the same checks as the Activate button in the editor. Requires an API key with the write scope.



## OpenAPI

````yaml /openapi.en.json post /v1/flows/{flow_id}/activate
openapi: 3.1.0
info:
  title: Bevits API
  version: 1.0.0
  description: >-
    Public API for querying CRM, purchase, and automation data from a Bevits
    organization and creating automations as drafts for review and activation.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.bevits.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: System
    description: API availability.
  - name: Identity
    description: Organization and API key identity.
  - name: Customers
    description: Customers and their relationships.
  - name: Segments
    description: Customer segments.
  - name: Purchases
    description: Purchases imported from integrations.
  - name: CRM data
    description: Tags and attribute definitions.
  - name: Automations
    description: Automation flows.
  - name: Campaigns
    description: Email campaigns.
paths:
  /v1/flows/{flow_id}/activate:
    post:
      tags:
        - Automations
      summary: Activate flow
      description: >-
        Activates a reviewed flow so it starts sending real messages. Requires
        the revision the person reviewed; if the flow changed after it, the call
        fails with 409 and returns the current revision. Runs the same checks as
        the Activate button in the editor. Requires an API key with the write
        scope.
      operationId: activateFlow
      parameters:
        - $ref: '#/components/parameters/FlowId'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivateFlowRequest'
            example:
              revision: rev_3f9a1c2b7d4e
      responses:
        '200':
          $ref: '#/components/responses/Flow'
        '400':
          $ref: '#/components/responses/InvalidBody'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/WriteScopeRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/RevisionConflict'
        '422':
          $ref: '#/components/responses/FlowValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    FlowId:
      name: flow_id
      in: path
      required: true
      description: Public flow ID.
      schema:
        type: string
        pattern: ^flw_[A-Za-z0-9_-]+$
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: >-
        Unique key for the operation. Repeating the same key with the same body
        returns the original response instead of running it again.
      schema:
        type: string
  schemas:
    ActivateFlowRequest:
      type: object
      required:
        - revision
      properties:
        revision:
          type: string
          pattern: ^rev_[0-9a-f]+$
          description: >-
            The revision the person reviewed, returned when creating the draft
            or getting the flow.
    Flow:
      type: object
      required:
        - object
        - id
        - status
        - created_at
        - updated_at
        - html_url
      properties:
        object:
          type: string
          const: flow
        id:
          type: string
          pattern: ^flw_[A-Za-z0-9_-]+$
        name:
          type: string
        description:
          type: string
        status:
          type: string
        trigger_event_type:
          type: string
        origin:
          type: string
        run_count:
          deprecated: true
          description: >-
            Deprecated legacy field retained for compatibility. When present,
            always returns 0; it does not represent the actual execution count.
          type: integer
          minimum: 0
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        html_url:
          type: string
          format: uri
        revision:
          type: string
          description: >-
            Identifies the flow's current content (blocks and connections). Send
            it when activating the flow so only the reviewed content goes live.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    RateLimitErrorResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          required:
            - retry_after
          properties:
            retry_after:
              type: integer
              minimum: 1
              description: Seconds before retrying.
    Error:
      type: object
      required:
        - type
        - message
        - request_id
      properties:
        type:
          type: string
          enum:
            - authentication_error
            - conflict
            - internal_error
            - invalid_request
            - not_found
            - permission_denied
            - rate_limited
            - validation_error
        message:
          type: string
        param:
          type: string
        request_id:
          type: string
          pattern: ^req_[a-f0-9]{24}$
  responses:
    Flow:
      description: Flow found.
      headers:
        ETag:
          $ref: '#/components/headers/ETag'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Flow'
    InvalidBody:
      description: >-
        Missing request body, a body that is not a JSON object, or an invalid
        route parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing, invalid, expired, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: authentication_error
              message: Invalid API key.
              request_id: req_07f6cdc3c20249d6afcd90b4
    WriteScopeRequired:
      description: The API key does not have the write scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: permission_denied
              message: This API key does not have the required "write" scope.
              param: scope
              request_id: req_07f6cdc3c20249d6afcd90b4
    NotFound:
      description: Resource does not exist or belongs to another organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RevisionConflict:
      description: >-
        The flow changed after the given revision. The message includes the
        current revision; ask for a new review before activating.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: conflict
              message: >-
                The flow changed after revision rev_3f9a1c2b7d4e; its current
                revision is rev_9b2e7c1a5f30.
              param: revision
              request_id: req_07f6cdc3c20249d6afcd90b4
    FlowValidationError:
      description: >-
        The flow can't be created or activated. The message lists every problem,
        each with its path, block key, and valid options.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Request limit exceeded.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorResponse'
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  headers:
    ETag:
      description: Content version identifier for conditional caching.
      schema:
        type: string
        example: '"v1-4ad31f5efb6b8f35"'
    RetryAfter:
      description: Seconds before retrying.
      schema:
        type: integer
        minimum: 1
    RateLimitLimit:
      description: Total limit for the current window.
      schema:
        type: integer
        example: 600
    RateLimitRemaining:
      description: Requests remaining in the current window.
      schema:
        type: integer
        example: 599
    RateLimitReset:
      description: UTC instant when the current window ends.
      schema:
        type: string
        format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: bvt_live_...
      description: API key created in the organization settings.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.