> ## 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.

# API Key Management

> Programmatic access to manage campaigns and analytics across retail media networks

export const LastUpdated = ({date, lang = "en"}) => {
  const translations = {
    en: "Last updated:",
    es: "Última actualización:",
    pt: "Última atualização:",
    fr: "Dernière mise à jour:",
    de: "Zuletzt aktualisiert:"
  };
  const label = translations[lang] || translations.en;
  return <>
<style>{`
.last-updated-component {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
border-radius: 8px;
margin-top: 12px;
margin-bottom: 16px;
font-size: 14px;
background-color: rgba(0, 0, 0, 0.05);
border: 1px solid rgba(0, 0, 0, 0.12);
color: rgba(0, 0, 0, 0.75);
line-height: 1;
}

        .last-updated-component svg {
          flex-shrink: 0;
          vertical-align: middle;
        }

        .last-updated-component span {
          display: inline-flex !important;
          align-items: center !important;
          line-height: 1 !important;
        }

        [data-theme="dark"] .last-updated-component {
          background-color: #3a3a3a;
          border: 2px solid #888888;
          color: #ffffff;
        }

        [data-theme="dark"] .last-updated-component svg {
          stroke: #ffffff;
        }
      `}</style>
      <div className="last-updated-component">
        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
          <circle cx="12" cy="12" r="10" />
          <polyline points="12 6 12 12 16 14" />
        </svg>
        <span>
          <strong style={{
    fontWeight: 600
  }}>{label}</strong> 
          <time dateTime={date}>{date}</time>
        </span>
      </div>
    </>;
};

<Note>
  API keys enable 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, API keys provide the foundation for scaling retail media operations beyond the UI.
</Note>

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  Toppie API keys provide secure, token-based authentication for programmatic access to all Toppie endpoints. This enables automation of campaign management, data integration, and custom reporting workflows.
</div>

## Key Benefits

<Columns cols={3}>
  <Card title="Automate Campaign Operations">
    Build workflows that create, manage, and optimize campaigns across multiple retailers without manual intervention
  </Card>

  <Card title="Custom Integrations">
    Connect Toppie data to BI tools, reporting dashboards, or internal systems for unified retail media analytics
  </Card>

  <Card title="Secure Access Control">
    Role-based permissions ensure team members only access the data and capabilities they need
  </Card>
</Columns>

## Creating API Keys

<Steps>
  <Step title="Navigate to Settings">
    <div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
      Access **Settings** in your Toppie dashboard navigation
    </div>
  </Step>

  <Step title="Select API Integration">
    <div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
      Choose **API Integration** from the left-hand navigation menu
    </div>
  </Step>

  <Step title="Create New Key">
    <div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
      Click the **"+ New API Key"** button to generate a new key
    </div>
  </Step>

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

  <Step title="Secure Storage">
    <div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
      Store your API key in a secure location such as a password manager or secrets management system
    </div>
  </Step>
</Steps>

<Frame>
  <img src="https://mintcdn.com/topsort/uSrfRB5jaD2RxnFe/images/knowledge-base/creating-toppie-api-keys.webp?fit=max&auto=format&n=uSrfRB5jaD2RxnFe&q=85&s=7096cf2ddd962b839c008ff32ce7fa07" alt="Toppie API Integration interface showing the New API Key button" width="2887" height="664" data-path="images/knowledge-base/creating-toppie-api-keys.webp" />
</Frame>

## Using API Keys

Include your API key in request headers for authentication when making calls to the Toppie API.

### Authentication Header

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

### Available API Endpoints

Access comprehensive functionality through the Toppie API:

* **Product Catalog Management** - Upload, update, and manage product catalogs
* **Campaign Lifecycle Operations** - Create, modify, and monitor campaigns
* **Advanced Analytics and Reporting** - Access detailed performance data
* **Budget and Bid Management** - Programmatic budget allocation and optimization

## API Documentation

For complete API reference documentation, visit the [Toppie API Reference](/en/api-reference/toppie-api/%5Bbeta%5D-get-toppie-campaigns).

The documentation includes:

* Endpoint specifications and parameters
* Request/response examples
* Error handling guidelines
* Rate limiting information
* SDK examples in multiple languages

## 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>

### Key Management

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  * **Regeneration** - Rotate API keys periodically or when team members leave
  * **Monitoring** - Track API usage patterns and set up alerts for unusual activity
  * **Access Control** - Limit API key access to necessary team members only
  * **Backup Storage** - Store keys in multiple secure locations with proper access controls
</div>

## Common Use Cases

### Campaign Automation

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  Automate campaign creation, budget adjustments, and performance optimization based on predefined rules and triggers.
</div>

### Reporting Integration

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  Pull Toppie performance data into existing business intelligence tools or custom dashboards for unified reporting.
</div>

### Inventory Management

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  Sync product catalogs automatically and maintain up-to-date inventory across all retail partners.
</div>

### Budget Optimization

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  Implement custom budget allocation algorithms based on performance metrics and business objectives.
</div>

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  ***
</div>

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  For assistance with API integration or to discuss advanced programmatic campaign management use cases, contact your Toppie account manager.
</div>

***

<LastUpdated date="2025-11-18" />
