> ## Documentation Index
> Fetch the complete documentation index at: https://docs.auxia.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Making Your First Call

> How to make your first call with Auxia

## Step 1: Create a sample treatment

Visit the guide here [(Creating your first treatment)](/getting-started/step-4-creating-your-first-treatment) 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.

<img src="https://mintcdn.com/auxia/XsfpA_ObWj7oESRX/img/deploying-auxia/api-integration.png?fit=max&auto=format&n=XsfpA_ObWj7oESRX&q=85&s=fc3139ad0ab6e29e602b819da02e7f76" alt="api-integration" width="928" height="646" data-path="img/deploying-auxia/api-integration.png" />

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:

<table>
  <thead>
    <tr>
      <th>Param</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>projectId</td>
      <td>string</td>
      <td>For a given customer's project, this should always be the same.</td>
    </tr>

    <tr>
      <td>userId</td>
      <td>string</td>
      <td>This is the Unique ID for every user.</td>
    </tr>

    <tr>
      <td>surfaces</td>
      <td>string</td>
      <td>Refer to the surface json</td>
    </tr>
  </tbody>
</table>

**Surface**

<table>
  <thead>
    <tr>
      <th>Param</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>surface</td>
      <td>string</td>
      <td>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".</td>
    </tr>

    <tr>
      <td>maximumTreatmentCount</td>
      <td>int64</td>
      <td>Maximum number of treatments that should be returned to the client for the given surface. If no value is set, this defaults to 1.</td>
    </tr>

    <tr>
      <td>minimumTreatmentCount</td>
      <td>int64</td>
      <td>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.</td>
    </tr>
  </tbody>
</table>

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",
       }
   ]
}
```
