Skip to main content
POST
Attaches every tag in tagIds to every campaign in campaignIds (the full cartesian product). The operation is idempotent — pairs that are already tagged are silently skipped rather than causing an error.

Query Parameters

string
required
Your SmartLead API key

Request Body

number[]
required
Campaign IDs to tag. 1–100 positive integers.
number[]
required
Tag IDs to attach. 1–100 positive integers.
All campaigns and tags must belong to the authenticated account (or the client scoped to the API key). Validation is all-or-nothing — if any campaignIds or tagIds value doesn’t belong to the caller, the entire request is rejected and nothing is applied.

Response Fields

boolean
true on success
string
"Tags added to campaigns successfully!"
number[]
Deduplicated list of campaign IDs the request was applied to
number[]
Deduplicated list of tag IDs the request was applied to
number
Total number of campaign/tag pairs requested (campaign_ids.length × tag_ids.length)
number
Number of pairs newly created
number
Number of pairs that were already tagged and skipped

Response Codes

Success
Tags processed successfully (see added / already_present for the outcome)
Bad Request
Invalid request parameters or malformed request body
Unauthorized
Invalid or missing API key
Not Found
One or more campaignIds or tagIds don’t exist or don’t belong to the authenticated account
Validation Error
Request validation failed. Check parameter types and constraints (array length 1–100, positive integers).
Internal Server Error
Server error occurred