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

# Public API Improvements

> Add Frequency Cap to Public API and create new reporting endpoint for attributed purchases

export const ChangelogActions = () => {
  return <>
      <style>{`
        .changelog-actions {
          display: flex;
          justify-content: center;
          gap: 12px;
          margin-top: 2rem;
          padding-top: 1.5rem;
          border-top: 1px solid #e5e7eb;
        }
        
        [data-theme="dark"] .changelog-actions {
          border-top-color: #374151;
        }
        
        .changelog-btn {
          display: inline-flex;
          align-items: center;
          gap: 6px;
          padding: 8px 16px;
          border-radius: 9999px;
          border: 1px solid #d1d5db;
          background: transparent;
          color: #6b7280;
          font-size: 14px;
          cursor: pointer;
          transition: all 0.2s ease;
        }
        
        .changelog-btn:hover {
          border-color: #9ca3af;
          background: #f9fafb;
        }
        
        [data-theme="dark"] .changelog-btn {
          border-color: #4b5563;
          color: #9ca3af;
        }
        
        [data-theme="dark"] .changelog-btn:hover {
          border-color: #6b7280;
          background: #1f2937;
        }
      `}</style>
      <div className="changelog-actions">
        <button className="changelog-btn" onClick={() => {
    const btn = event.target.closest("button");
    btn.innerHTML = "❤️ Like";
    btn.style.borderColor = "#ec4899";
  }}>
          🤍 Like
        </button>
        <button className="changelog-btn" onClick={() => {
    const btn = event.target.closest("button");
    navigator.clipboard.writeText(window.location.href);
    const originalContent = btn.innerHTML;
    btn.innerHTML = "✓ Copied";
    btn.style.borderColor = "#22c55e";
    btn.style.color = "#22c55e";
    setTimeout(() => {
      btn.innerHTML = originalContent;
      btn.style.borderColor = "";
      btn.style.color = "";
    }, 2000);
  }}>
          ↗ Share
        </button>
      </div>
    </>;
};

<div style={{ display: "flex", gap: "8px", flexWrap: "wrap", marginBottom: "16px" }}>
  <Badge color="gray" size="sm" icon="calendar">April 15, 2025</Badge>
  <Badge color="purple" size="sm" icon="server">Ad Server</Badge>
  <Badge color="orange" size="sm" icon="arrow-up">Improvement</Badge>
</div>

## Public API Improvements

#### **Frequency Cap in API**

Frequency cap is designed for limiting the number of times a user sees the same ad. We support configuring frequency cap for banner campaigns, allowing limiting the number of impressions per user by days or weeks.

Now it's also possible to create and update the frequency cap of a campaign using our Campaign Restrictions API:

1. [Get Restriction Types](/en/api-reference/campaign-api/get-restriction-types)
   * Retrieve available restrictions
2. [Add Restriction to Campaign](/en/api-reference/campaign-api/create-campaign-restriction)
   * Use this endpoint to set the frequency cap limit of a campaign, considering the available restriction types (daily or weekly impressions).
3. [Update Campaign Restriction](/en/api-reference/campaign-api/update-campaign-restriction)
   * Endpoint to update an existing restriction. It's possible to change the restriction limit and status (active or inactive).
4. [Get Campaign Restriction](/en/api-reference/campaign-api/get-campaign-restriction)
   * Retrieve all restrictions of a campaign.

#### **Export Attributed Purchases**

You can now export campaign performance reports with attributed purchases. Our new endpoint returns detailed attribution data in parquet files. The files are available after 3am UTC and contain the attribution data for the previous day.

Check the endpoint details in our [API documentation](/en/api-reference/reporting-api/get-scored-attribution-dump-urls).

 

<ChangelogActions />
