Skip to main content
POST
/
campaigns
/
v2
/
{campaignId}
/
leads
Add leads
curl --request POST \
  --url https://inboxapp.com/api/v1/campaigns/v2/{campaignId}/leads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "platform": "twitter",
  "platformIds": [
    "<string>"
  ],
  "usernames": [
    "<string>"
  ],
  "externalIds": [
    "<string>"
  ],
  "leads": [
    {
      "platformId": "<string>",
      "username": "<string>",
      "externalId": "<string>",
      "platform": "twitter",
      "data": {}
    }
  ]
}
'
{
  "added": 4503599627370495,
  "skipped": 4503599627370495,
  "failed": 4503599627370495
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

campaignId
string
required

The ID of the campaign.

Pattern: ^[0-9a-z]+$

Body

application/json
platform
enum<string>

Platform for platformIds / usernames. Currently optional and defaults to twitter, the only supported platform. It will become required for platformIds / usernames once additional platforms are supported — set it explicitly now to avoid future breakage. Ignored for externalIds, which are platform-agnostic.

Available options:
twitter
platformIds
string[]

Platform user IDs. Maximum 2000 per request.

Required array length: 1 - 2000 elements
Minimum string length: 1
Example:
["44196397", "50393960"]
usernames
string[]

Usernames (handles). Profiles not yet in the system will be fetched automatically. Maximum 2000 per request.

Required array length: 1 - 2000 elements
Minimum string length: 1
Example:
["elonmusk", "jack"]
externalIds
string[]

Inbox external IDs (platform-agnostic). Maximum 2000 per request.

Required array length: 1 - 2000 elements
Minimum string length: 1
Example:
["hy4k7m2x9p1n6v3w8j5q0r"]
leads
object[]

Mixed leads, each identified by platformId, username, or externalId, with optional per-lead column data.

Required array length: 1 - 2000 elements

Response

200 - application/json

OK

added
integer
required

Number of leads successfully added to the campaign.

Required range: 0 <= x <= 9007199254740991
skipped
integer
required

Number of leads that were already in the campaign.

Required range: 0 <= x <= 9007199254740991
failed
integer
required

Number of identifiers that could not be resolved (invalid, suspended, or deleted accounts).

Required range: 0 <= x <= 9007199254740991