How attachment works
Surge handles campaign attachment automatically. There’s no separate API call to make. Attachment is triggered in two situations: When you purchase a number while a campaign is already active. Surge attaches the number to the active campaign as part of the purchase transaction. The phone number response will show the campaign ID:active status, any unattached phone numbers on the account are attached to the campaign automatically.
Knowing when attachment completes
Attachment happens asynchronously after campaign approval. Once complete, Surge fires thephone_number.attached_to_campaign webhook event:
GET /accounts/{account_id}/phone_numbers) and inspecting the campaign_id field.
The typical sequence
- Create an account, submit a campaign (
POST /accounts/{account_id}/campaigns) - Purchase one or more phone numbers (
POST /accounts/{account_id}/phone_numbers),campaign_idisnullat this point if the campaign isn’t yet active - Campaign moves through
pending→in_review→active - Surge auto-attaches all unattached numbers on the account to the newly active campaign
phone_number.attached_to_campaignfires for each number — numbers are now ready for production traffic
Multiple numbers on one campaign
A campaign can have multiple phone numbers attached. This is common when you need to distribute sending volume or provide dedicated numbers for different teams or use cases under the same registered campaign. Sole proprietor campaigns are limited to a single phone number per campaign.Why there’s no manual attachment endpoint
Carriers require that every number be registered under a specific campaign. Surge enforces this by managing attachment automatically during campaign approval, ensuring numbers are never left in a permanently unattached state after a campaign becomes active. The webhook is the intended signal for readiness — listen forphone_number.attached_to_campaign rather than polling.