Gatewayz Universal Inference API
  1. analytics
Gatewayz Universal Inference API
  • models
    • Get All Models
      GET
    • Get Specific Model Api
      GET
    • Get Developer Models Api
      GET
    • Search Models
      GET
  • authentication
    • Root
      GET
    • Privy Auth
      POST
    • Register User
      POST
    • Request Password Reset
      POST
    • Reset Password
      POST
    • Get User Balance
      GET
    • User Monitor
      GET
    • User Get Rate Limits
      GET
    • Get User Profile Endpoint
      GET
    • Update User Profile Endpoint
      PUT
    • Delete User Account Endpoint
      DELETE
    • Get Credit Transactions Endpoint
      GET
    • List User Api Keys
      GET
    • Create User Api Key
      POST
    • Update User Api Key Endpoint
      PUT
    • Delete User Api Key
      DELETE
    • Get User Api Key Usage
      GET
    • Create Api Key
      POST
    • Get User Audit Logs
      GET
    • Get User Plan Endpoint
      GET
    • Get User Plan Usage
      GET
    • Get User Plan Entitlements
      GET
    • Get User Environment Usage
      GET
    • Get User Rate Limits Advanced
      GET
    • Update User Rate Limits Advanced
      PUT
    • Bulk Update User Rate Limits
      POST
    • Get Api Key Rate Limit Usage
      GET
  • admin
    • Admin Add Credits
    • Admin Get All Balances
    • Admin Monitor
    • Admin Set Rate Limit
    • Admin Refresh Providers
    • Admin Cache Status
    • Admin Huggingface Cache Status
    • Admin Refresh Huggingface Cache
    • Admin Test Huggingface
    • Admin Debug Models
    • Admin Clear Rate Limit Cache
    • Get Trial Analytics Admin
    • Get All Users Info
    • Get User Info By Id
    • Get Notification Stats
    • Process Notifications
    • Assign Plan To User
    • Get System Rate Limits
    • Get Rate Limit Alerts Endpoint
    • Create Coupon Endpoint
    • List Coupons Endpoint
    • Get Coupon Endpoint
    • Update Coupon Endpoint
    • Deactivate Coupon Endpoint
    • Get Coupon Analytics Endpoint
    • Get Coupon Stats Endpoint
    • Update Role
    • Get User Role Info
    • Get Audit Log
    • List Users By Role
    • Get Role Permissions Endpoint
  • plans
    • Get Plans
    • Get Plan
  • notifications
    • Get Notification Preferences
    • Update Notification Preferences
    • Test Notification
    • Send Usage Report
  • trial
    • Get Trial Status
  • subscription
    • Get Subscription Plans
  • providers
    • Get Providers
  • debug
    • Test Provider Matching
    • Test Refresh Providers
    • Test Openrouter Providers
  • Stripe Payments
    • Stripe Webhook
    • Create Checkout Session
    • Get Checkout Session
    • Create Payment Intent
    • Get Payment Intent
    • Get Credit Packages
    • Create Refund
    • Get Payment History
    • Get Payment Details
  • chat
    • Chat Completions
    • Unified Responses
    • Anthropic Messages
  • chat-history
    • Create Session
    • Get Sessions
    • Get Session
    • Update Session
    • Delete Session
    • Get Stats
    • Search Sessions
    • Save Message
  • ranking
    • Get Ranking Models
    • Get Ranking Apps
  • Activity
    • Get Activity Stats
    • Get Activity Log
  • coupons
    • Redeem Coupon Endpoint
    • Get Available Coupons
    • Get Redemption History
  • Analytics
    • Get Transaction Analytics
    • Get Transaction Summary
  • statistics
    • Get Provider Statistics
    • Get Gateway Statistics
    • Get All Gateways Summary Endpoint
    • Get Provider Top Models Endpoint
    • Get Trending Models Api
  • comparison
    • Batch Compare Models Api
    • Compare Model Gateways Api
  • referral
    • Get My Referral Stats
    • Validate Referral
    • Generate My Referral Code
    • Get My Referral Code
  • cache
    • Get Cache Status
    • Refresh Gateway Cache
    • Clear All Caches
    • Get Modelz Cache Status
    • Refresh Modelz Cache Endpoint
    • Clear Modelz Cache Endpoint
  • health
    • Check All Gateways
    • Check Single Gateway
  • images
    • Generate Images
  • analytics
    • Log Event
      POST
    • Log Batch Events
      POST
  • Health Check
    GET
  • Ping
    GET
  • Ping Stats
    GET
  • Get Modelz Models
    GET
  • Get Modelz Model Ids Endpoint
    GET
  • Check Model On Modelz
    GET
  • Schemas
    • Schemas
      • AddCreditsRequest
      • AnthropicMessage
      • AnalyticsEvent
      • AssignPlanRequest
      • AuthMethod
      • CreateApiKeyRequest
      • AvailableCouponResponse
      • ChatMessage
      • ChatSession
      • DeleteAccountRequest
      • ChatSessionResponse
      • DeleteAccountResponse
      • DeleteApiKeyRequest
      • ChatSessionStatsResponse
      • HTTPValidationError
      • ChatSessionsListResponse
      • NotificationPreferences
      • NotificationStats
      • NotificationType
      • CouponAnalyticsResponse
      • PlanEntitlementsResponse
      • CreateChatSessionRequest
      • ContentBlock
      • PlanResponse
      • CouponResponse
      • CreateCheckoutSessionRequest
      • CouponScope
      • PlanUsageResponse
      • CreatePaymentIntentRequest
      • CouponStatsResponse
      • CreateRefundRequest
      • CouponType
      • PrivyAuthRequest
      • PrivyAuthResponse
      • PrivyLinkedAccount
      • UpdateApiKeyRequest
      • PrivyUserData
      • Message
      • UserPlanResponse
      • CreateCouponRequest
      • UpdateNotificationPreferencesRequest
      • UserProfileResponse
      • UserProfileUpdate
      • ValidationError
      • InputMessage
      • ListCouponsResponse
      • ImageData
      • ImageGenerationRequest
      • ProxyRequest
      • MessagesRequest
      • ImageGenerationResponse
      • RateLimitConfig
      • SearchChatSessionsRequest
      • SetRateLimitRequest
      • StripeCurrency
      • StripePaymentMethodType
      • SubscriptionStatus
      • UpdateChatSessionRequest
      • RedeemCouponRequest
      • RedemptionHistoryItem
      • UserRegistrationRequest
      • RedemptionHistoryResponse
      • RedemptionResponse
      • UserRegistrationResponse
      • ResponseFormat
      • ResponseFormatType
      • ResponseRequest
      • RoleAuditLogResponse
      • ReferralStatsResponse
      • RoleResponse
      • SaveChatMessageRequest
      • UpdateCouponRequest
      • UpdateRoleRequest
      • ValidateReferralRequest
      • ValidateReferralResponse
  1. analytics

Log Event

POST
/v1/analytics/events
Log an analytics event to both Statsig and PostHog via backend
This endpoint allows the frontend to send analytics events to the backend,
which then forwards them to both analytics platforms. This avoids ad-blocker issues.
Args:
event: The analytics event to log
current_user: Authenticated user (from auth middleware)
Returns:
Success message

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Successful Response
Body

🟠422Unprocessable Entity
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/analytics/events' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "event_name": "string",
    "user_id": "string",
    "value": "string",
    "metadata": {}
}'
Response Response Example
200 - Example 1
null
Modified at 2025-10-27 16:08:25
Previous
Generate Images
Next
Log Batch Events
Built with