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

# Toppie API

> Integrate with Toppie programmatically using our API

export const IntegrationsCard1A = () => {
  return <>
      <style>{`
        .integrations-card-1a {
          display: flex;
          flex-direction: column;
          background-color: #f0f2f4;
          border: 1px solid rgba(0, 0, 0, 0.08);
          border-radius: 12px;
          padding: 1.25rem 1.5rem;
          gap: 0.25rem;
          color: #25253b;
          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
          transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
          margin-top: 2rem;
        }

        .integrations-card-1a:hover {
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
          border-color: rgba(0, 0, 0, 0.12);
        }

        .dark .integrations-card-1a {
          background-color: #25253b;
          color: #f6f8fa;
          border-color: rgba(255, 255, 255, 0.08);
          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .dark .integrations-card-1a:hover {
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
          border-color: rgba(255, 255, 255, 0.12);
        }

        .integrations-card-1a-avatar-row {
          display: flex;
          margin-left: 14px;
          flex-wrap: nowrap;
        }

        .integrations-card-1a-avatar {
          width: 44px;
          height: 44px;
          border-radius: 50%;
          border: 2px solid #f0f2f4;
          margin-left: -14px;
          object-fit: cover;
          box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
          pointer-events: none;
          cursor: default;
        }

        .dark .integrations-card-1a-avatar {
          border-color: #25253b;
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .integrations-card-1a h2 {
          margin: 0;
          line-height: 1.25;
          font-size: clamp(1.25rem, calc(0.875rem + 1.25vw), 1.75rem);
          font-weight: 700;
          letter-spacing: -0.025em;
          color: #111827;
        }

        .dark .integrations-card-1a h2 {
          color: #f9fafb;
        }

        .integrations-card-1a-subtitle {
          font-size: 0.9375rem;
          font-weight: 500;
          line-height: 1.5;
          color: #4b5563;
          margin: 0;
        }

        .dark .integrations-card-1a-subtitle {
          color: #d1d5db;
        }

        .integrations-card-1a p {
          margin: 0;
          line-height: 1.5;
          font-size: 0.875rem;
          color: #374151;
        }

        .dark .integrations-card-1a p {
          color: #d1d5db;
        }

        .integrations-card-1a a {
          color: #0500ff;
          text-decoration: none;
          font-weight: 500;
          transition: color 0.15s ease;
        }

        .integrations-card-1a a:hover {
          color: #0400cc;
        }

        .dark .integrations-card-1a a {
          color: #8280ff;
        }

        .dark .integrations-card-1a a:hover {
          color: #a19fff;
        }

        @media (max-width: 640px) {
          .integrations-card-1a-avatar {
            width: 38px;
            height: 38px;
            margin-left: -12px;
          }

          .integrations-card-1a-avatar-row {
            margin-left: 12px;
          }
        }

        @media (min-width: 1280px) {
          .integrations-card-1a p {
            font-size: 0.6875rem;
            line-height: 1.4;
            letter-spacing: -0.01em;
          }

          .integrations-card-1a h2 {
            font-size: clamp(1rem, calc(0.75rem + 1vw), 1.25rem);
          }

          .integrations-card-1a-subtitle {
            font-size: 0.75rem;
          }
        }
      `}</style>
      <div className="integrations-card-1a">
        <div className="integrations-card-1a-avatar-row">
          <img src="/images/integration-team/agustin.webp" alt="Agustin - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
          <img src="/images/integration-team/amelia.webp" alt="Amelia - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
          <img src="/images/integration-team/bernardita.webp" alt="Bernardita - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
          <img src="/images/integration-team/borumy.webp" alt="Borumy - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
          <img src="/images/integration-team/felipe.webp" alt="Felipe - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
          <img src="/images/integration-team/gui.webp" alt="Gui - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
          <img src="/images/integration-team/javiera.webp" alt="Javiera - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
          <img src="/images/integration-team/linn.webp" alt="Linn - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
          <img src="/images/integration-team/marcio.webp" alt="Marcio - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
          <img src="/images/integration-team/mateus.webp" alt="Mateus - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
          <img src="/images/integration-team/max.webp" alt="Max - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
          <img src="/images/integration-team/rodrigo.webp" alt="Rodrigo - Integrations Team Member" loading="lazy" className="integrations-card-1a-avatar" />
        </div>

        <h2>Need help with your Topsort integration?</h2>

        <p className="integrations-card-1a-subtitle">
          Talk to us, the integrations engineering team.
        </p>

        <p>
          Reach us via <strong>your dedicated messaging channel</strong> or at{" "}
          <a href="mailto:support@topsort.com">support@topsort.com</a>.
        </p>

        <p>
          If you're not a customer yet,{" "}
          <a href="https://www.topsort.com/book-a-demo">book a demo</a> with our
          sales team instead.
        </p>
      </div>
    </>;
};

<Note>
  The Toppie API enables secure, programmatic access to Toppie's unified retail media platform. Whether you're automating campaign management, building custom dashboards, or integrating Toppie data into existing workflows, the API provides the foundation for scaling retail media operations beyond the UI.
</Note>

The Toppie API provides public endpoints to manage and analyze agency accounts, campaigns, and financial activity across multiple retail partners.

<Card title="Toppie API Reference" icon="book" href="/en/api-reference/toppie-api/">
  View the complete API documentation with all available endpoints
</Card>

## Key Benefits

* **Automate Campaign Operations** - Build workflows to manage campaigns across retailers without manual intervention
* **Custom Integrations** - Connect Toppie data to BI tools and internal systems
* **Secure Access Control** - Role-based permissions for data and capabilities

## API Capabilities

The Toppie API provides comprehensive functionality through the following endpoints:

<AccordionGroup>
  <Accordion title="Product Catalog Management" icon="box">
    Upload, update, and manage product catalogs across retail partners. Keep inventory synchronized and ensure accurate product information for your campaigns.
  </Accordion>

  <Accordion title="Campaign Lifecycle Operations" icon="rectangle-ad">
    Create, modify, pause, and delete campaigns programmatically. Set budgets, targeting parameters, and bidding strategies for both Sponsored Listings and Banner Ads.
  </Accordion>

  <Accordion title="Advanced Analytics and Reporting" icon="chart-line">
    Retrieve real-time performance data including impressions, clicks, conversions, ROAS metrics, and ad spend. Generate custom reports with specific date ranges and metric selections.
  </Accordion>

  <Accordion title="Budget and Bid Management" icon="dollar-sign">
    Track account balances, view transaction history, and manage billing programmatically. Implement custom budget allocation algorithms based on performance metrics.
  </Accordion>
</AccordionGroup>

## Authentication

All Toppie API requests require authentication using API keys with token-based authentication. This ensures secure access to your campaigns and data.

### Getting Your API Key

<Steps>
  <Step title="Navigate to Settings">
    Access **Settings** in your Toppie dashboard navigation
  </Step>

  <Step title="Select API Integration">
    Choose **API Integration** from the left-hand navigation menu
  </Step>

  <Step title="Create New Key">
    Click the **"+ New API Key"** button to generate a new key
  </Step>

  <Step title="Save Immediately">
    <Warning>
      Copy and save your API key immediately—it will only be displayed once for security reasons
    </Warning>
  </Step>
</Steps>

### Using Your API Key

Include your API key in the `Authorization` header of each request:

```bash theme={null}
curl -X GET "https://api.topsort.com/toppie/v1/campaigns" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
```

### Security Best Practices

<Warning>
  **Security Guidelines:**

  * Never share API keys in code repositories or public channels
  * Rotate keys regularly for enhanced security
  * Use environment variables or secure vaults to store keys
  * Monitor API usage for any unusual activity
  * Implement proper access controls in your applications
</Warning>

## Common Use Cases

<Tabs>
  <Tab title="Campaign Automation">
    Automate campaign creation, budget adjustments, and performance optimization based on predefined rules and triggers. Build workflows that respond to performance thresholds or market conditions.

    **Example scenarios:**

    * Automatically pause campaigns when ROAS drops below target
    * Create new campaigns based on product catalog updates
    * Adjust bids dynamically based on time of day or inventory levels
  </Tab>

  <Tab title="Reporting Integration">
    Pull Toppie performance data into existing business intelligence tools or custom dashboards for unified reporting across all marketing channels.

    **Example scenarios:**

    * Sync daily campaign metrics to Google Sheets or Excel
    * Feed data into Tableau, Looker, or Power BI dashboards
    * Aggregate retail media performance with other marketing channels
  </Tab>

  <Tab title="Inventory Management">
    Sync product catalogs automatically and maintain up-to-date inventory across all retail partners, ensuring campaigns always promote available products.

    **Example scenarios:**

    * Sync product availability from your PIM system
    * Update pricing and promotions across all campaigns
    * Remove out-of-stock products from active campaigns
  </Tab>

  <Tab title="Budget Optimization">
    Implement custom budget allocation algorithms based on performance metrics and business objectives to maximize returns across retail partners.

    **Example scenarios:**

    * Reallocate budgets to top-performing retailers
    * Implement custom pacing algorithms
    * Coordinate spend across multiple campaigns and retailers
  </Tab>
</Tabs>

## API Documentation

For complete API reference documentation including endpoint specifications, parameters, request/response examples, and error handling guidelines, visit the [Toppie API Reference](/en/api-reference/toppie-api/).

<IntegrationsCard1A />
