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

# Record an event



## OpenAPI

````yaml /api-reference/openapi.json post /v1/analytics/events
openapi: 3.0.1
info:
  title: Scribe Public API
  version: v1
  description: >-
    REST API to manage email signatures, teammates, smart fields, and marketing
    campaigns in your Scribe workspace. Every request uses JSON and is
    authenticated with a workspace API key. Endpoints are versioned under `/v1`,
    for example `https://api.scribe-mail.com/v1/signatures`.
  contact:
    name: Scribe Support
    url: https://help.scribe-mail.com/en
servers:
  - url: https://api.scribe-mail.com
    description: Production
security: []
tags:
  - name: Signatures
    description: >-
      Create, update, publish, and install email signature templates, and
      control which teammates each signature is assigned to.
  - name: Teammates
    description: >-
      Manage the people whose signatures Scribe deploys, and set their smart
      field values.
  - name: Emails
    description: >-
      Manage teammate email addresses, including the aliases that receive a
      signature.
  - name: Smart fields
    description: >-
      Define the dynamic fields, such as job title, phone number, or calendar
      link, that populate signatures.
  - name: Folders
    description: Organize signature templates into folders.
  - name: Assets
    description: >-
      Upload and manage the images and files used across signatures and
      campaigns.
  - name: Marketing campaigns
    description: >-
      Schedule, pause, and resume the promotional banners shown in your team's
      signatures.
  - name: Integrations
    description: >-
      List the directory, HRIS, and email integrations connected to your
      workspace.
  - name: Integration entities
    description: >-
      List the org units and groups from your connected integrations, used to
      target signatures.
  - name: Financial documents
    description: List the invoices and financial documents for your workspace.
paths:
  /v1/analytics/events:
    post:
      tags:
        - Events
      summary: Record an event
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/event_create_params'
      responses:
        '202':
          description: Accepted (identify)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/event_create_response'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
        '403':
          description: Plan does not include event tracking
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
        '422':
          description: Missing name
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/validation_error_response'
      security:
        - ApiKey: []
components:
  schemas:
    event_create_params:
      type: object
      properties:
        event:
          type: object
          properties:
            name:
              type: string
              description: The event event name, e.g. 'signup' or 'purchase'.
            value:
              type: number
              description: Optional monetary value attributed to the event.
            currency:
              type: string
              description: Optional ISO currency code for `value`.
            click_id:
              type: string
              description: >-
                Optional scribe_click_id captured from the landing URL, to
                attribute the event to the originating click.
            event_id:
              type: string
              description: >-
                Optional idempotency key; a repeated event_id within 24h is
                recorded once.
            properties:
              type: object
              description: Optional flat bag of scalar properties (no nesting).
            anonymous_id:
              type: string
              description: >-
                Optional SDK anonymous id, to stitch pre-identify events to the
                user.
            user_id:
              type: string
              description: >-
                The identified user id. Required when `name` is "$identify";
                optional otherwise.
            traits:
              type: object
              description: >-
                Identity traits (name, email, plan, ...) for an "$identify"
                event. Flat scalar object; may contain PII.
          required:
            - name
          additionalProperties: false
      required:
        - event
      additionalProperties: false
    event_create_response:
      type: object
      properties:
        data:
          type: object
          properties:
            name:
              type: string
            value:
              type: number
            currency:
              type: string
            click_id:
              type: string
              nullable: true
            source:
              type: string
              enum:
                - api
            status:
              type: string
              enum:
                - accepted
          required:
            - name
            - value
            - currency
            - click_id
            - source
            - status
          additionalProperties: false
      required:
        - data
      additionalProperties: false
    error_response:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
          required:
            - type
            - code
            - message
          additionalProperties: false
        remediation:
          type: object
          description: >-
            Optional dashboard hand-off: where to send the user to unblock the
            request (e.g. connect an integration). Present on some 403/409
            responses.
          properties:
            action:
              type: string
              enum:
                - connect_integration
                - manage_in_dashboard
                - upgrade_plan
            dashboard_url:
              type: string
              format: uri
            message:
              type: string
          required:
            - action
            - dashboard_url
            - message
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    validation_error_response:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
          required:
            - type
            - code
            - message
          additionalProperties: false
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              code:
                type: string
              message:
                type: string
              allowed:
                type: array
                description: >-
                  For an enum/const violation: the permitted values for this
                  field. Present only when the list is small enough to inline;
                  for large enums (e.g. icon) see the content schema.
                items: {}
              missing:
                type: array
                description: 'For a missing-required violation: the absent property names.'
                items:
                  type: string
            required:
              - field
              - code
              - message
            additionalProperties: false
      required:
        - error
        - details
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer

````