Friendbuy Events API

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

Operations 3

POST /postPurchaseEvent Track a purchase event #
POST /postSignUpEvent Track a sign-up event #
POST /postCustomEvent Track a custom event #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/friendbuy-events-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

friendbuy-events-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Friendbuy Merchant Events API
  description: The Friendbuy Merchant API is the server-to-server REST interface for Friendbuy's referral and loyalty marketing platform.
  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:
  schemas:
    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
    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
    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
    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
  responses:
    Unauthorized:
      description: Missing or invalid Bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: The request payload failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  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>`.'