# Upscribe

## Get all Upscribes

<mark style="color:blue;">`GET`</mark> `https://api.sparkloop.app/v2/upscribes`

Returns all Upscribes

{% tabs %}
{% tab title="200 " %}

```json
{
  "upscribes": [
    <Upscribe Object>,
    <Upscribe Object>,
    <Upscribe Object>
  ]
}
```

{% endtab %}
{% endtabs %}

## Get an Upscribe

<mark style="color:blue;">`GET`</mark> `https://api.sparkloop.app/v2/upscribes/:identifier`

Returns a single upscribe by UUID

#### Path Parameters

| Name                                         | Type   | Description     |
| -------------------------------------------- | ------ | --------------- |
| identifier<mark style="color:red;">\*</mark> | string | Upscribe's UUID |

{% tabs %}
{% tab title="200 " %}

```json
{
  "upscribe": <Upscribe Object>
}
```

{% endtab %}

{% tab title="404 " %}
{% tabs %}
{% tab title="Not found" %}

```
{
    "error": "Upscribe upscribe_4bc10562d97 not found."
}
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

## Update Upscribe

<mark style="color:orange;">`PUT`</mark> `https://api.sparkloop.app/v2/upscribes/:identifier`

Updates an Upscribe record

#### Path Parameters

| Name                                         | Type   | Description     |
| -------------------------------------------- | ------ | --------------- |
| identifier<mark style="color:red;">\*</mark> | string | Upscribe's UUID |

#### Body parameters

<table><thead><tr><th width="213">Name</th><th width="140">Type</th><th>Description</th></tr></thead><tbody><tr><td>auto_pilot</td><td>boolean</td><td>Enable/disable Upscribe auto-pilot feature.</td></tr></tbody></table>

{% tabs %}
{% tab title="200 " %}

```json
{
  "upscribe": <Upscribe Object>
}
```

{% endtab %}
{% endtabs %}

## Subscribe to recommendations

<mark style="color:green;">`POST`</mark> `https://api.sparkloop.app/v2/upscribes/:identifier/subscribe`

{% hint style="info" %}
This endpoint is only available upon request. Reach out to <support@sparkloop.app> to get access.
{% endhint %}

#### Path Parameters

| Name                                         | Type   | Description     |
| -------------------------------------------- | ------ | --------------- |
| identifier<mark style="color:red;">\*</mark> | string | Upscribe's UUID |

#### Request Body

| Name                                                | Type   | Description                                                                                                                |
| --------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------- |
| subscriber\_email<mark style="color:red;">\*</mark> | string | The subscriber's email address                                                                                             |
| country\_code<mark style="color:red;">\*</mark>     | string | <p>Subscriber's <a href="https://www.iban.com/country-codes">ISO 3166-1 Alpha2 country code</a>.<br><br>Eg: US, CA, IT</p> |
| recommendations<mark style="color:red;">\*</mark>   | string | A string of comma separated recommendations' ref\_codes. ie: "a724e922a3,a338cbf66a,ed149464cb"                            |
| utm\_source                                         | string | Optional. This is used as a filter in the Advanced reports.                                                                |
| utm\_campaign                                       | string | Optional. This is used as a filter in the Advanced reports.                                                                |

{% tabs %}
{% tab title="200: OK " %}

```json
{
  "response": "ok"
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="Parameters missing" %}

```json
{ "error" => "Parameters are missing." }
```

{% endtab %}

{% tab title="Subscriber param missing" %}

```json
{ "error" => "Subscriber param is missing or empty." }
```

{% endtab %}

{% tab title="Recommendations param missing" %}

```json
{ "error" => "Recommendations param is missing or empty." }
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sparkloop.app/api-v2/endpoints/upscribe.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
