Friendbuy Events API

Track purchase, sign-up, and custom conversion events.

OpenAPI Specification

friendbuy-events-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Friendbuy Merchant Analytics Events API
  description: 'The Friendbuy Merchant API is the server-to-server REST interface for Friendbuy''s referral and loyalty marketing platform. Merchants use it to sync customer records, generate personal referral links, track conversion events (purchases, sign-ups, and custom events), pull campaign analytics, and manage loyalty ledger balances and reward redemptions. The base URL is https://mapi.fbot.me/v1 (the fbot.me host is Friendbuy''s Merchant API origin). Authentication is a two-step flow: exchange an account key and secret at POST /authorization for a short-lived Bearer JWT, then send that token as `Authorization: Bearer <token>` on every subsequent request.

    Endpoint paths in this document are grounded in Friendbuy''s public developer documentation at developers.friendbuy.com. Request and response schemas are honestly modeled from the documented behavior and common Friendbuy payload fields; exact field-level shapes should be reconciled against the live reference before production use.'
  version: '1.0'
  contact:
    name: Friendbuy
    url: https://friendbuy.com
  license:
    name: Proprietary
    url: https://friendbuy.com/terms
servers:
- url: https://mapi.fbot.me/v1
  description: Friendbuy Merchant API
security:
- bearerAuth: []
tags:
- name: Events
  description: Track purchase, sign-up, and custom conversion events.
paths:
  /postPurchaseEvent:
    post:
      operationId: postPurchaseEvent
      tags:
      - Events
      summary: Track a purchase event
      description: Records a purchase/order conversion so Friendbuy can attribute it to a referral and trigger advocate and friend rewards.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseEvent'
      responses:
        '200':
          description: The recorded purchase event.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
  /postSignUpEvent:
    post:
      operationId: postSignUpEvent
      tags:
      - Events
      summary: Track a sign-up event
      description: Records an account sign-up conversion so Friendbuy can attribute it to a referral and trigger rewards for sign-up-based campaigns.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignUpEvent'
      responses:
        '200':
          description: The recorded sign-up event.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
  /postCustomEvent:
    post:
      operationId: postCustomEvent
      tags:
      - Events
      summary: Track a custom event
      description: Records an arbitrary named custom event used to trigger custom campaigns or advanced attribution rules.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomEvent'
      responses:
        '200':
          description: The recorded custom event.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  responses:
    ValidationError:
      description: The request payload failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid Bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    CustomEvent:
      type: object
      required:
      - eventName
      properties:
        eventName:
          type: string
        customer:
          $ref: '#/components/schemas/CustomerInput'
        properties:
          type: object
          additionalProperties: true
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
    PurchaseEvent:
      type: object
      required:
      - id
      - amount
      - currency
      properties:
        id:
          type: string
          description: Your order/transaction id.
        amount:
          type: number
        currency:
          type: string
        customer:
          $ref: '#/components/schemas/CustomerInput'
        couponCode:
          type: string
        products:
          type: array
          items:
            type: object
            additionalProperties: true
    SignUpEvent:
      type: object
      required:
      - email
      properties:
        id:
          type: string
        email:
          type: string
        customer:
          $ref: '#/components/schemas/CustomerInput'
    EventResult:
      type: object
      properties:
        received:
          type: boolean
        eventId:
          type: string
    CustomerInput:
      type: object
      required:
      - id
      properties:
        id:
          type: string
          description: Your identifier for the customer.
        email:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        isNewCustomer:
          type: boolean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer JWT obtained from POST /authorization by exchanging your account key and secret. Passed as `Authorization: Bearer <token>`.'
Where this information came from

This is an independent, third-party profile of Friendbuy Events API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.