# Partner Programs

## Get partner programs

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

Partner programs are ordered descendingly by *created\_at*, meaning the first page shows the latest publications.

{% tabs %}
{% tab title="200 Used query params ?page=1\&per\_page=2" %}

```json
{
  "partner_programs": [
    <Partner Program Object>,
    <Partner Program Object>
  ],
  "meta": {
    "per_page": 2,
    "page": 1,
    "total_pages": 12,
    "total_partner_programs": 24
  }
}
```

{% endtab %}
{% endtabs %}

## Get a partner program

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

Returns a single partner program by UUID

#### Path Parameters

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

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

```json
{
  "partner_program":
    <Partner Program Object>
}
```

{% endtab %}

{% tab title="404 " %}
{% tabs %}
{% tab title="Partner program not found" %}

```
{
    "error": "Partner program partner_program_4bc10562d97 not found!"
}
```

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

## Update partner program

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

#### Path Parameters

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

#### Request Body

<table><thead><tr><th width="213">Name</th><th width="140">Type</th><th>Description</th></tr></thead><tbody><tr><td>total_budget</td><td>number</td><td>Monthly spend cap. Set a cap on the total monthly spend across your partner programs. Once your spend cap is reached, partners will be notified and you won't be charged for any further referrals in that calendar month. <br><br>In US dollars ($).</td></tr><tr><td>cpa</td><td>number</td><td>The default fee you want to pay partners for each new subscriber they send you, e.g. <code>2.5</code><br><br>In US dollars ($).</td></tr><tr><td>redirect_url</td><td>String</td><td>Default partner link destination. It's where people will go when they click on a partner link.</td></tr><tr><td>slug</td><td>String</td><td>Your unique custom signup page URL, e.g. if you set <code>slug</code> to <em>morning-stew</em> the custom signup page URL will be <em>https://partnerprogram.page/morning-stew</em></td></tr><tr><td>thankyou_page_url</td><td>String</td><td>Thank-you page URL. It's what we show new subscribers when they subscribe via Magic Link.</td></tr><tr><td>resources_url</td><td>String</td><td>Partner resources URL. If you've created any resources to help partner promote you effectively, link them here.</td></tr><tr><td>terms</td><td>String</td><td>Custom partner program conditions.</td></tr><tr><td>show_in_directory</td><td>boolean</td><td>Set to <code>true</code> if you want to feature the partner program in SparkLoop Partner Network. <br><br>Get discovered by thousands of pre-approved newsletter partners and let them join your partner program with one click.</td></tr><tr><td>referral_pending_duration_enabled</td><td>boolean</td><td>Set to <code>true</code> if you want to exclude referrals if they unsubscribe shortly after signup.</td></tr><tr><td>referral_pending_duration</td><td>number</td><td>Referrals will be confirmed if they've stayed subscribed for at least this number of days.</td></tr></tbody></table>

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

```json
{
  "partner_program":
    <Partner Program Object>
}
```

{% endtab %}

{% tab title="400 " %}

{% endtab %}

{% tab title="404 " %}
{% tabs %}
{% tab title="Partner program not found" %}

```
{
    "error": "Partner program partner_program_34c8e39ca4 not found!"
}
```

{% 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/subscribers-2.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.
