> ## 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.

# Validate event without storing it

> Takes the same body as POST /v1/events and returns what sending it would return, without storing anything or changing customers: which customer would match (or would_create), which flows would be queued or skipped, and the warnings. The returned event id is a placeholder. Has its own limit of 100 requests per second per API key. Requires an API key with the read scope.



## OpenAPI

````yaml /openapi.en.json post /v1/events/validate
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, creating automations as drafts for review and activation,
    creating WhatsApp Official campaigns as drafts, and building customer
    segments and tags.
  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.
  - name: Account and brand
    description: Account context, brand identity, and images.
  - name: Recipes
    description: Ready-made automations created from recipes, with undo.
  - name: Email templates
    description: Creating and importing email templates.
  - name: Events
    description: Custom events sent by the store and their types.
paths:
  /v1/events/validate:
    post:
      tags:
        - Events
      summary: Validate event without storing it
      description: >-
        Takes the same body as POST /v1/events and returns what sending it would
        return, without storing anything or changing customers: which customer
        would match (or would_create), which flows would be queued or skipped,
        and the warnings. The returned event id is a placeholder. Has its own
        limit of 100 requests per second per API key. Requires an API key with
        the read scope.
      operationId: validateEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventInput'
            example:
              name: order_shipped
              customer:
                external_id: u_8842
                email: ana@exemplo.com.br
                phone: '+5511988887777'
                name: Ana Souza
                attributes:
                  plano: premium
              properties:
                order_number: '10293'
                tracking:
                  code: BR123
                  carrier: Correios
                items:
                  - sku: CAM-01
                    name: Camiseta
                    quantity: 2
              occurred_at: '2026-11-18T14:03:00-03:00'
              external_id: ship_10293
      responses:
        '200':
          $ref: '#/components/responses/EventValidated'
        '400':
          $ref: '#/components/responses/InvalidBody'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ReadScopeRequired'
        '404':
          $ref: '#/components/responses/EventCustomerNotFound'
        '422':
          $ref: '#/components/responses/EventValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    EventInput:
      type: object
      required:
        - name
        - customer
      additionalProperties: false
      properties:
        name:
          type: string
          pattern: ^[a-z][a-z0-9_]*$
          maxLength: 64
          description: >-
            What happened, such as order_shipped. Lowercase letters, digits, and
            underscores, starting with a letter.
        customer:
          $ref: '#/components/schemas/EventCustomerInput'
        properties:
          type: object
          additionalProperties: true
          description: >-
            Event details, free-form and with no reserved keys. Up to 200 keys
            in total, 5 levels of depth, and 100 items per list.
        occurred_at:
          type: string
          format: date-time
          description: >-
            When it happened, in ISO 8601 with offset. Default: the moment it is
            received.
        external_id:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            ID of this fact in your system. Sending the same name and
            external_id again within 90 days returns the original event and
            triggers nothing.
        backfill:
          type: boolean
          default: false
          description: >-
            If true, stores the event without triggering flows. Use it to import
            history.
    EventCustomerInput:
      type: object
      description: >-
        Who it happened to. Send at least one identifier: id, external_id,
        tax_id, email, or phone.
      additionalProperties: false
      anyOf:
        - required:
            - id
        - required:
            - external_id
        - required:
            - tax_id
        - required:
            - email
        - required:
            - phone
      properties:
        id:
          type: string
          pattern: ^cus_[A-Za-z0-9_-]+$
          description: >-
            Bevits customer ID. An ID that does not exist responds 404 and no
            other identifier is tried.
        external_id:
          type: string
          minLength: 1
          maxLength: 255
          description: The customer's ID in your system, matched as exact text.
        tax_id:
          type: string
          minLength: 1
          maxLength: 32
          description: Valid CPF or CNPJ (Brazilian tax IDs), with or without punctuation.
        email:
          type: string
          format: email
          maxLength: 256
          description: Customer's email, matched in lowercase.
        phone:
          type: string
          minLength: 3
          maxLength: 32
          description: >-
            Phone in E.164, such as +5511988887777. Without a country code, the
            store's country is assumed.
        name:
          type: string
          minLength: 1
          maxLength: 256
          description: Customer's name.
        attributes:
          type: object
          description: >-
            Customer attributes to set. Only the keys sent change; new
            attributes are created with the inferred type.
          additionalProperties:
            oneOf:
              - type: string
                maxLength: 256
              - type: number
              - type: boolean
        consent:
          type: object
          description: >-
            Marketing opt-in, read only when the event creates the customer.
            Without it, the customer is created without marketing opt-in.
          additionalProperties: false
          properties:
            email:
              type: boolean
            whatsapp:
              type: boolean
    Event:
      type: object
      required:
        - object
        - id
        - name
        - occurred_at
        - received_at
        - customer
        - flows
        - backfill
        - livemode
      properties:
        object:
          type: string
          const: event
        id:
          type: string
          pattern: ^evt_[A-Za-z0-9_-]+$
        name:
          type: string
        external_id:
          type: string
        occurred_at:
          type: string
          format: date-time
        received_at:
          type: string
          format: date-time
        customer:
          type: object
          description: >-
            Customer the event was linked to. A send-only key (events:write)
            receives id only.
          properties:
            id:
              type: string
              pattern: ^cus_[A-Za-z0-9_-]+$
              description: >-
                Absent when the event would create the customer and it was not
                created: in validation and in test mode.
            matched_by:
              type: string
              enum:
                - id
                - external_id
                - tax_id
                - email
                - phone
              description: >-
                Identifier that found the customer. Absent when the event
                created the customer.
            created:
              type: boolean
              description: true when the event created the customer.
            would_create:
              type: boolean
              const: true
              description: >-
                Present in validation and in test mode, when sending would
                create the customer.
        flows:
          type: array
          description: >-
            Active flows that listen to this event name. An empty list means no
            flow is listening.
          items:
            $ref: '#/components/schemas/EventFlow'
        properties:
          type: object
          additionalProperties: true
          description: Properties as they were sent. Absent after 30 days.
        backfill:
          type: boolean
        livemode:
          type: boolean
        warnings:
          type: array
          description: >-
            Present only when there is something to warn about. A warning never
            replaces an error.
          items:
            $ref: '#/components/schemas/EventWarning'
        duplicate:
          type: boolean
          const: true
          description: >-
            Present when the call returned an event that already existed with
            the same name and external_id.
    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.
    EventFlow:
      type: object
      required:
        - id
        - name
        - status
      properties:
        id:
          type: string
          pattern: ^flw_[A-Za-z0-9_-]+$
        name:
          type: string
        status:
          type: string
          enum:
            - queued
            - started
            - skipped
          description: >-
            queued is decided in the send response. When the event is read
            later, the flow shows as started or skipped.
        reason:
          type: string
          enum:
            - backfill
            - stale
            - filter_not_matched
            - test_mode
            - no_contact_channel
            - no_consent
            - flow_inactive
            - flow_error
            - dispatch_failed
          description: Why the flow was skipped. Present when status is skipped.
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/EventFlowWarning'
          description: >-
            What a started flow could not do and the sender can fix, such as a
            message skipped for a variable without a value. Present only when
            there is something to report.
    EventWarning:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - ambiguous_identifier
            - identifier_conflict
            - identifier_mismatch
            - payload_mismatch
        message:
          type: string
        param:
          type: string
    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
        code:
          type: string
          description: >-
            Stable, machine-readable reason within type, such as
            invalid_event_name. Present when the error has a named reason.
        message:
          type: string
        param:
          type: string
          description: >-
            Full path of the offending field, such as customer.email or
            events[3].name.
        suggestion:
          type: string
          description: A value that would be accepted, when there is an obvious one.
        request_id:
          type: string
          pattern: ^req_[a-f0-9]{24}$
    EventFlowWarning:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - missing_variable
          description: >-
            missing_variable: a message of the flow was skipped because a
            template variable had no value and no fallback text.
        message:
          type: string
        param:
          type: string
          description: >-
            The event property that was missing, such as
            properties.tracking.code. Absent when the variable is not from the
            event.
  responses:
    EventValidated:
      description: What sending it would return. Nothing was stored.
      headers:
        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/Event'
          example:
            object: event
            id: evt_01jd2v9k3m8q4r5s6t7u8v9w0x
            name: order_shipped
            occurred_at: '2026-11-18T17:03:01.000Z'
            received_at: '2026-11-18T17:03:01.000Z'
            customer:
              would_create: true
            flows:
              - id: flw_ckdef456
                name: Pedido enviado
                status: queued
            properties:
              tracking_code: BR123
            backfill: false
            livemode: true
    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
    ReadScopeRequired:
      description: >-
        The API key does not have the read scope. This is the case of a
        send-only key, created with events:write alone.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: permission_denied
              code: missing_scope
              message: This API key does not have the required "read" scope.
              param: scope
              request_id: req_07f6cdc3c20249d6afcd90b4
    EventCustomerNotFound:
      description: >-
        customer.id does not match any active customer. The other identifiers
        are not tried.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: not_found
              code: customer_not_found
              message: >-
                No customer has this id. Remove customer.id to match by the
                other identifiers.
              param: customer.id
              request_id: req_07f6cdc3c20249d6afcd90b4
    EventValidationError:
      description: >-
        The event was rejected and nothing was stored. error.code names the
        reason, error.param carries the full path of the field, and
        error.suggestion, when present, a value that would be accepted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: validation_error
              code: invalid_event_name
              message: >-
                Event names use lowercase letters, digits and underscores, start
                with a letter and have at most 64 characters. Did you mean
                "order_shipped"?
              param: name
              suggestion: order_shipped
              request_id: req_07f6cdc3c20249d6afcd90b4
    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:
    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
    RetryAfter:
      description: Seconds before retrying.
      schema:
        type: integer
        minimum: 1
  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.