Auxia
  • Welcome!
  • Quick Start
    • Getting Started
      • Step 1: Ingesting your data
      • Step 2: Integrating Auxia into your product
      • Step 3: Defining your model objective
      • Step 4: Creating your first treatment
      • Step 5: Measuring success
        • Interactions
        • Engagement
  • Data Ingestion
    • Overview
      • User event data
      • User attributes
    • Data Connections
      • Google BigQuery
      • Amazon S3
      • Amplitude
        • Batch with Export API
        • Streaming with Google Pub/Sub
  • Deploying Auxia
    • Deploying with Auxia's API
      • Making your first call
      • Tracking interactions
      • Surfaces and types
      • Contextual attributes for real-time distribution
    • Delivery Integrations
      • Braze
  • API Reference
    • Get Treatments
    • Log Treatment Interactions
  • Treatment Management
Powered by GitBook
On this page
  • Step 1: Create a sample treatment
  • Step 2: Fire request
  1. Deploying Auxia
  2. Deploying with Auxia's API

Making your first call

How to make your first call with Auxia

PreviousDeploying with Auxia's APINextTracking interactions

Last updated 7 months ago

Step 1: Create a sample treatment

Visit the guide here () to set up a sample treatment for testing.

Step 2: Fire request

Go to the console, click on the API Integration tab, and click "Show API Key" to get the API Key.

Once you have the API key, fire the curl request below through the UI or from your terminal.

curl --location --request POST 'https://apis.auxia.io/v1/GetTreatments' \
--header 'Content-Type: application/json' \
--header 'x-api-key: *********************' \
--data-raw '{
    "projectId": "1802",
    "userId": "gGTE8CWUIgpzPivCejVk7JN284V",
    "surfaces": [
        {
            "surface": "HOME_PAGE",  
            "maximumTreatmentCount": 1          
        }
    ]
}'

Understanding The Request

{
    "projectId": "1802",
    "userId": "gGTE8CWUIgpzPivCejVk7JN284V",
    "surfaces": [
        {
            "surface": "HOME_PAGE",  
            "maximumTreatmentCount": 1          
        }
    ]
}

This request has the following parameters:

Param
Type
Description

projectId

string

For a given customer's project, this should always be the same.

userId

string

This is the Unique ID for every user.

surfaces

json

Surface

Param
Type
Description

surface

string

Client configured parameter to request treatments for a particular UI component, screen (home screen), or use case (coupon). A typical example of surface is "HOME_SCREEN" or "PURCHASE_SCREEN".

maximumTreatmentCount

int64

Maximum number of treatments that should be returned to the client for the given surface. If no value is set, this defaults to 1.

minimumTreatmentCount

int64

Minimum number of treatments that should be returned to the client for a given surface. If this field is set, the response is guaranteed to have either 0 or greater than equal to the value of minimumTreatmentCount number of treatments. If no value is set, it defaults to 0.

See below for a sample response:

{
   "responseId": "690e24d8-16a6-4518-bf37-09a8f0120dfb",
   "userTreatments": [
       {
           "treatmentId": "6",
           "treatmentTrackingId": "6_690e24d8-16a6-4518-bf37-09a8f0120dfb",
           "rank": "1",
           "treatmentContent": "{ title: 'You have a new message!', description: 'Learn how our product helps you', cta_name: 'Learn more', cta_link: '/tabs/home/feed'}",
           "treatmentType": "IN_APP_CONTENT_CARD",
           "surface": "HOME_PAGE",
           "contentLanguageCode": "en",
       },
       {
           "treatmentId": "4",
           "treatmentTrackingId": "4_690e24d8-16a6-4518-bf37-09a8f0120dfb",
           "rank": "2",
           "treatmentContent": "{ title: 'Check out your trends', description: '87% of users found this feature useful', cta_name: 'View trends', cta_link: '/actionscreen'}",
           "treatmentType": "IN_APP_CONTENT_CARD",
           "surface": "HOME_PAGE",
           "contentLanguageCode": "en",
       }
   ]
}

Refer to the

surface json
Creating your first treatment
Page cover image