AppsFlyer Events management API

The Events management API from AppsFlyer — 2 operation(s) for events management.

Operations 2

POST /{bundleId}/event Send Event #
POST /{bundleId}/setcuid Associate Customer User ID with AF User ID #

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/appsflyer-events-management-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

appsflyer-events-management-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WEB Server-TO-Server Events management API
  version: 1.0.0
servers:
- url: https://webs2s.appsflyer.com/v1
tags:
- name: Events management
paths:
  /{bundleId}/event:
    post:
      summary: Send Event
      description: Sets a custom user ID or an AppsFlyer user ID for the specified bundle, at least one identifier is required.
      operationId: web-s2s-api-event-post
      tags:
      - Events management
      parameters:
      - in: path
        name: bundleId
        required: true
        schema:
          type: string
        description: The bundle ID for which the user ID(s) is to be set.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/OnlyCuIdEventBody'
              - $ref: '#/components/schemas/OnlyAfUserIdEventBody'
              - $ref: '#/components/schemas/CuIdAndAfuserIdEventBody'
      responses:
        '200':
          description: User information updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the operation.
                    example: OK
                  message:
                    type: string
                    description: Detailed message about the operation, specifying which ID was set.
                    example: Customer user ID or AF user ID was set successfully for the specified bundle ID.
        '400':
          description: Bad request. One or both identifiers are incorrect, not provided, or the request body is otherwise malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                example:
                  error: SetCUID event cannot be parsed without both user ids - customerUserId and afUserID
                  message: Bad Request
                  status: 400
  /{bundleId}/setcuid:
    post:
      summary: Associate Customer User ID with AF User ID
      description: "On associating a CUID with a visitor to your website. For example, any time you match the web `afUserId` with your customer user ID. Doing so enables PBA to match data from various sources. \nThis is similar to [`setCustomerUserId`](https://support.appsflyer.com/hc/en-us/articles/360001610038-PBA-web-SDK-integration-guide#identifying-users-using-customer-user-id-cuid) on the website.\n"
      operationId: web-s2s-api-setcuid-post
      tags:
      - Events management
      parameters:
      - in: path
        name: bundleId
        required: true
        schema:
          type: string
        description: The bundle ID for which the user ID(s) is to be set.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetCuIdBody'
      responses:
        '200':
          description: User information updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the operation.
                    example: Success
                  message:
                    type: string
                    description: Detailed message about the operation, specifying which ID was set.
                    example: Customer user ID or AF user ID was set successfully for the specified bundle ID.
        '400':
          description: Bad request. One or both identifiers are incorrect, not provided, or the request body is otherwise malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                example:
                  error: SetCUID event cannot be parsed without both user ids - customerUserId and afUserID
                  message: Bad Request
                  status: 400
        '401':
          description: Authorization information is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The specified bundle ID was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SetCuIdBody:
      type: object
      required:
      - customerUserId
      - afUserId
      - webDevKey
      properties:
        customerUserId:
          $ref: '#/components/schemas/CustomerUserId'
        afUserId:
          $ref: '#/components/schemas/AfUserId'
        webDevKey:
          $ref: '#/components/schemas/WebDevKey'
    Currency:
      description: 'Populates raw data field: `event_revenue_currency`

        '
      example: EUR
      type: string
      enum:
      - NZD
      - SGD
      - ANG
      - MNT
      - BIF
      - BBD
      - HUF
      - ERN
      - AZN
      - BYN
      - AOA
      - PYG
      - MYR
      - GYD
      - VUV
      - SLL
      - FKP
      - DJF
      - GNF
      - MMK
      - RSD
      - CLF
      - XDR
      - ZAR
      - TND
      - PHP
      - KGS
      - XPD
      - RON
      - RUB
      - KMF
      - CHW
      - SCR
      - GIP
      - XBC
      - MXV
      - XXX
      - TRY
      - UYU
      - XCD
      - FJD
      - GHS
      - MVR
      - AWG
      - UGX
      - TOP
      - CVE
      - MKD
      - COP
      - CUC
      - GTQ
      - KZT
      - MXN
      - MGA
      - AUD
      - BDT
      - ISK
      - KRW
      - DZD
      - OMR
      - ZMW
      - MOP
      - CUP
      - JPY
      - SHP
      - VES
      - LSL
      - ETB
      - BWP
      - MAD
      - AED
      - NGN
      - BRL
      - XTS
      - GEL
      - IDR
      - EUR
      - GBP
      - WST
      - UYI
      - XAF
      - SZL
      - XOF
      - SEK
      - UZS
      - KES
      - KYD
      - ILS
      - KWD
      - NPR
      - MRU
      - BZD
      - QAR
      - UAH
      - XSU
      - BTN
      - HTG
      - DKK
      - USN
      - VND
      - SBD
      - SSP
      - STN
      - JMD
      - IQD
      - LBP
      - XPT
      - HRK
      - HKD
      - JOD
      - PAB
      - CDF
      - XAU
      - BAM
      - CNY
      - SOS
      - XPF
      - GMD
      - DOP
      - XAG
      - KPW
      - BOB
      - BHD
      - LRD
      - BGN
      - AMD
      - CZK
      - CAD
      - LAK
      - PLN
      - LKR
      - XUA
      - UYW
      - MWK
      - PGK
      - YER
      - PEN
      - KHR
      - RWF
      - BSD
      - XBA
      - AFN
      - ZWL
      - LYD
      - TMT
      - HNL
      - TWD
      - XBB
      - IRR
      - MUR
      - BOV
      - THB
      - ALL
      - XBD
      - TJS
      - SDG
      - BMD
      - CRC
      - USD
      - NOK
      - SRD
      - MZN
      - CLP
      - SYP
      - TZS
      - EGP
      - COU
      - ARS
      - MDL
      - INR
      - CHE
      - SAR
      - PKR
      - TTD
      - NIO
      - BND
      - NAD
      - SVC
      - CHF
    CuIdAndAfuserId:
      type: object
      required:
      - customerUserId
      - afUserId
      properties:
        customerUserId:
          $ref: '#/components/schemas/CustomerUserId'
        afUserId:
          $ref: '#/components/schemas/AfUserId'
    CommonEventBody:
      type: object
      required:
      - webDevKey
      - eventType
      - eventName
      properties:
        webDevKey:
          $ref: '#/components/schemas/WebDevKey'
        eventType:
          type: string
          enum:
          - EVENT
          description: 'Event attribute identifier for internal use by AppsFlyer. Always set to EVENT.

            '
          example: EVENT
        eventName:
          type: string
          description: "- We use this parameter to differentiate conversion and non-conversion events using the [event conversion list](https://support.appsflyer.com/hc/en-us/articles/360000646498-PBA-brand-bundles-and-settings#web-event-settings) set by the marketer in PBA settings. \n- Ensure that you populate it with values consistent to the marketer's conversion logic.\n- Populates raw data field: `event_name`\n"
          example: my_web_event
        timestamp:
          type: integer
          format: int64
          description: "- If no timestamp is sent, the time is set using the server time. \n- **Events arriving late are timestamped using the current server time**. Late means arrival after midnight UTC on the day following the event. For example, an event occurring on Monday must be processed before midnight UTC Tuesday. \n- Events having a timestamp in the future (relative to the current server time) are timestamped with the server time.\n- Populates raw data field: `event_time`\n"
          example: 1234567890123
        eventValue:
          type: object
          additionalProperties:
            type: string
          description: "Map of event parameters describing the event. Use this parameter to send rich in-app events like product SKU, line item price.\n- **Note about revenue!** You can populate this parameter with revenue details. In addition, you must populate `eventRevenue`, and `eventRevenueCurrency`.\n- Limitation: 1000 characters. Do not exceed this; it will be truncated. \n- Populates raw data field: `event_value`\n"
        eventRevenueCurrency:
          $ref: '#/components/schemas/Currency'
        eventRevenue:
          type: number
          format: double
          description: "Revenue (monetary value) assigned to an event.\n**Note!** If revenue is reported in eventValue, report it also in eventRevenue and populate eventRevenueCurrency. \n\n- Negative values permitted. For example, a refund.\n- Populates raw data field: `event_revenue`\n"
          example: 1234.56
        referrer:
          type: string
          example: https://www.google.com/
          description: "HTTP referrer\n- Populates raw data field: `http_referrer` \n"
        UserAgent:
          type: string
          description: 'Populates raw data field: `user_agent`

            '
          example: Chrome/80.0.3987
        ip:
          type: string
          format: ipv4
          description: 'User IP address

            Where possible send the value of this field. It assists in determining the geo-location of the user.

            Populates raw data field: ip

            '
          example: 192.0.2.1
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        status:
          type: integer
    CuIdAndAfuserIdEventBody:
      title: Both AF user ID and Customer ID
      allOf:
      - $ref: '#/components/schemas/CuIdAndAfuserId'
      - $ref: '#/components/schemas/CommonEventBody'
    OnlyCuIdEventBody:
      title: Only Customer ID
      allOf:
      - $ref: '#/components/schemas/OnlyCuId'
      - $ref: '#/components/schemas/CommonEventBody'
    CustomerUserId:
      type: string
      description: '[Customer user ID (CUID)](https://support.appsflyer.com/hc/en-us/articles/207032016-Customer-user-ID-field-) is a unique identifier set by you.


        - Use the identical identifier for events reported by any means to AppsFlyer. Meaning the same identifier is used in the Web SDK, mobile SDK, and S2S APIs.

        - [Web SDK customer user ID](https://support.appsflyer.com/hc/en-us/articles/360001610038-Web-SDK-integration-guide#setting-customer-user-id-after-signup)

        - Populates raw data field: `customer_user_id`

        '
      example: 1234567890abcdef
    OnlyAfUserIdEventBody:
      title: Only AF user ID
      allOf:
      - $ref: '#/components/schemas/OnlyAfUserId'
      - $ref: '#/components/schemas/CommonEventBody'
    OnlyAfUserId:
      type: object
      required:
      - afUserId
      properties:
        afUserId:
          $ref: '#/components/schemas/AfUserId'
    WebDevKey:
      type: string
      description: "Populate using the [web dev key](https://support.appsflyer.com/hc/en-us/articles/360006997298#getting-the-web-dev-key) available on the Dashboard.\n\n**To get the Web Dev Key**:\n\n1. In AppsFlyer, go to the **My Apps** tab\n2. Click **View brand bundles**\n3. Copy the required **Web Dev Key** \n"
      example: 99999999-9999-9999-9999-999999999999
    OnlyCuId:
      type: object
      required:
      - customerUserId
      properties:
        customerUserId:
          $ref: '#/components/schemas/CustomerUserId'
    AfUserId:
      type: string
      description: "The unique user ID assigned by the Web SDK to every user that visits your website. You will need to pass the cookie value to your backend servers.\n\n- Cookie details:\n  - Name: afUserId\n  - Value: set `afUserId` to this value\n  - Domain: website-domain\n- Populates raw data field: `af_web_id`\n"
      example: 9999999-f848-4963-a091-568f0bf9a361