---
updatedAt: 2025-09-17T01:13:53.000Z
agentTools:
  projectIndex: https://docs.partnerstack.com/llms.txt
---

# Partner API

## Overview

The Partner REST API gives you the most control over your integration, and, like a good API it is, has predictable, resource-oriented URLs.

View the [PartnerStack API reference](https://docs.partnerstack.com/reference) for the most up to date list of supported resources

### Authentication

Authenticate your requests using **Bearer Auth**.\
Simply use your `api_key` from your user settings and set it as the bearer token in the authorization header of your request.

```
GET https://api.partnerstack.com/api/v2/rewards
Authorization: Bearer {api_key}
```

### Responses

All endpoints return a JSON body, even if returning an error.\
Our API libraries convert responses to appropriate language-specific objects.

The structure for a successful response will be in the form of:

```json
{
  "data": {...},
  "message": "...",
  "status": "2xx"
}
```

where all relevant information is stored within the `data` property.

For error responses, it will be:

```json
{
  "message": "...",
  "status": "3xx|4xx|5xx"
}
```

where `message` will contain a description of the error.

### Pagination

Endpoints (primarily `GET` a list of items) that accepts `starting_after` or `ending_before`, and `limit` will return paginated results.

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Query Parameter
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `starting_after`
      </td>

      <td>
        A cursor for use in pagination. `starting_after` is an item key that defines your place in the list. 

        For instance, if you make a list request and receive 100 items, then the last item with `"key":"rew_1234"`, can be used in your subsequent call as the parameter value to fetch the next page of results: `?starting_after=rew_1234`.

        This is mutually exclusive with `ending_before`.
      </td>
    </tr>

    <tr>
      <td>
        `ending_before`
      </td>

      <td>
        The inverse of `starting_after` and will return items that are in the previous page. Instead of using the last item's `key` in the result set, you would use the first item's `key`.

        This is mutually exclusive with `starting_after`.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        The number of items to retrieve per result set (page). The boundary is API give with a default value of 10.
      </td>
    </tr>
  </tbody>
</Table>

An example response for paginated results:

```json
{
  "data": {
    "has_more": true,
    "items": [...]
  },
  "message": "Page returned successfully",
  "status": 200
}
```

The property `has_more` is used to determine if there are more items to be retrieved.

### Time & Date

Date and time specific properties, such as `created_at` are in **epoch timestamp milliseconds**. In addition, this also applies to query parameters. As such, the date to provide as parameters must be converted to an integer of epoch ms.