For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Overview
    • Introduction
    • Response Codes
  • API Reference
      • GETGet campaign
      • PUTUpdate campaign
      • DELDelete campaign
      • GETList campaigns
      • POSTCreate campaign
LogoLogo
API ReferenceCampaigns

Create campaign

||View as Markdown|
POST
https://hublinks.io/rest/accounts/:account_id/campaigns
POST
/rest/accounts/:account_id/campaigns
$curl -X POST https://hublinks.io/rest/accounts/account_id/campaigns \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json"
200Response
1{
2 "success": true,
3 "campaign": {
4 "name": "CEOs in Michigan - Connection Campaign",
5 "seats": [
6 "SEAT6a13e661ecc6a86e3fb7"
7 ],
8 "status": "PAUSED",
9 "priority": 1753209283974,
10 "schedule": {
11 "friday": [
12 true,
13 true,
14 true
15 ],
16 "monday": [
17 true,
18 true,
19 true
20 ],
21 "sunday": [
22 false,
23 true,
24 true
25 ],
26 "tuesday": [
27 true,
28 true,
29 true
30 ],
31 "saturday": [
32 false,
33 true,
34 true
35 ],
36 "thursday": [
37 true,
38 true,
39 true
40 ],
41 "wednesday": [
42 true,
43 true,
44 true
45 ]
46 },
47 "timezone": -300,
48 "account_id": "ACCO136ce10b5f8a7682efb3",
49 "created_at": 1753209283974,
50 "wait_until": 1756467860306,
51 "campaign_id": "CAMP98dc1225b7904ff61471"
52 }
53}
Create a new campaign. If `campaign_id` is omitted, it will be generated. **Request body fields (wrapped in `campaign` object):** - `name` (string, required) - Human-readable campaign name. - `account_id` (string, required) - Target account ID. - `status` (string, optional) - `DRAFT` | `RUN` | `PAUSE` | `DONE`. Defaults to `DRAFT`. - `seats` (array of strings, required) - Seat IDs to run this campaign. - `schedule` (object, required) - Day-of-week schedule. Each day key maps to `[enabled (bool), start_hour (int), end_hour (int)]`. - `timezone` (integer, optional) - UTC offset in minutes (e.g. `-300` = UTC-5). - `campaign_id` (string, optional) - Supply to create with a specific ID; omit to auto-generate.
Was this page helpful?
Previous

List campaigns

Next

Get profile

Built with

Create a new campaign. If campaign_id is omitted, it will be generated.

Request body fields (wrapped in campaign object):

  • name (string, required) - Human-readable campaign name.
  • account_id (string, required) - Target account ID.
  • status (string, optional) - DRAFT | RUN | PAUSE | DONE. Defaults to DRAFT.
  • seats (array of strings, required) - Seat IDs to run this campaign.
  • schedule (object, required) - Day-of-week schedule. Each day key maps to [enabled (bool), start_hour (int), end_hour (int)].
  • timezone (integer, optional) - UTC offset in minutes (e.g. -300 = UTC-5).
  • campaign_id (string, optional) - Supply to create with a specific ID; omit to auto-generate.

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

account_idstringRequired

Request

This endpoint expects an object.
campaignobjectRequired

Response

This endpoint returns an object.
successboolean
campaignobject