Skip to main content
PATCH
/
ad_campaigns
/
{id}
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});

const adCampaign = await client.adCampaigns.update('adcamp_xxxxxxxxxxx');

console.log(adCampaign.id);
{
  "id": "adcamp_xxxxxxxxxxx",
  "title": "<string>",
  "created_at": "2023-12-01T05:00:00.401Z",
  "updated_at": "2023-12-01T05:00:00.401Z",
  "total_spend": 6.9,
  "budget": 6.9,
  "created_by_user": {
    "id": "user_xxxxxxxxxxxxx",
    "name": "John Doe",
    "username": "johndoe42"
  },
  "meta_config": {
    "bid_amount": 42,
    "special_categories": [
      "<string>"
    ],
    "budget_optimization": true,
    "start_time": "<string>",
    "end_time": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.whop.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Path Parameters

id
string
required

The unique identifier of the ad campaign to update.

Example:

"adcamp_xxxxxxxxxxx"

Body

application/json

Parameters for UpdateAdCampaignV2

budget
number | null

The campaign budget in dollars. The interpretation (daily or lifetime) follows the campaign's existing budget type.

Example:

6.9

Response

A successful response

An advertising campaign running on an external platform or within Whop.

id
string
required

The unique identifier for this ad campaign.

Example:

"adcamp_xxxxxxxxxxx"

title
string
required

The campaign name shown in the Whop dashboard.

status
enum<string>
required

Current status of the campaign (active, paused, or inactive).

Available options:
active,
paused,
payment_failed,
draft,
in_review,
flagged
platform
enum<string>
required

The external ad platform this campaign is running on (e.g., meta, tiktok).

Available options:
meta,
tiktok
created_at
string<date-time>
required

When the ad campaign was created.

Example:

"2023-12-01T05:00:00.401Z"

updated_at
string<date-time>
required

When the ad campaign was last updated.

Example:

"2023-12-01T05:00:00.401Z"

total_spend
number
required

Total amount spent in dollars.

Example:

6.9

budget
number | null
required

Total budget in dollars.

Example:

6.9

budget_type
enum<string> | null
required

How the budget is allocated (daily or lifetime).

Available options:
daily,
lifetime
created_by_user
object
required

The user who created this ad campaign.

meta_config
object
required

Meta-specific campaign configuration (objective, budget mode, etc.). Null for non-Meta campaigns.