Skip to main content
POST
SmartServers API: Dedicated IP infrastructure feature. Contact support@smartlead.ai for access.

Overview

Attaches your dedicated sending infrastructure to the campaigns you list, so a dedicated IP can be rolled out across a large batch of campaigns in one call instead of one campaign at a time in the dashboard. Both kinds of infrastructure on the SmartInfra page are supported, and you pick between them by which ID you send: Key Features:
  • Assigns hundreds of campaigns per request
  • Enables sender auto-rotation automatically when the SmartInfra holds more than one server
  • Propagates the campaign’s client to the SmartInfra and its servers
One SmartInfra can serve as many campaigns as you like — that is the normal way to use it, and there is no limit. The restriction runs the other way: a single campaign can only belong to one Multi SmartInfra, because that SmartInfra determines both the pool of IPs it rotates through and which client owns it. A campaign may instead hold up to four Single SmartInfra servers.
This endpoint only creates new assignments. A campaign that already belongs to a different SmartInfra is rejected with 409, and a campaign already attached to the SmartInfra you named is rejected with 208 — neither is silently overwritten. To move a campaign between SmartInfras, or to swap a Multi SmartInfra for a Single one, use the SmartInfra page in the dashboard.
All campaigns in one request must belong to the same client. Because assigning campaigns also transfers client ownership of the SmartInfra and its servers, a request mixing campaigns from two different clients is rejected with 400 and nothing is written. Campaigns that are not assigned to any client can be included freely. If your campaigns span several clients, send one request per client.
Requests are all-or-nothing. Every campaign is validated before anything is written, so a single invalid or already-assigned campaign causes the whole request to fail without assigning any of the others.
Neither ID is available from the public API yet. Open the SmartInfra page in the dashboard and read the ID from the URL of the row you want to assign — from the Multi SmartInfra tab for infra_id, or the Single SmartInfra tab for server_id.

Query Parameters

string
required
Your SmartLead API key

Request Body

Send exactly one of infra_id or server_id, plus campaign_ids.
number
The Multi SmartInfra to assign, which attaches all of its dedicated IPs. Must belong to the authenticated user. Cannot be combined with server_id.
number
The Single SmartInfra to assign, which attaches that one dedicated IP. Must belong to the authenticated user and must not be part of a Multi SmartInfra — use infra_id for those. Cannot be combined with infra_id.
array
Campaign IDs to attach the infrastructure to. Every campaign must belong to the authenticated user.Example: [5614, 5615, 5616]
number
Assign the SmartInfra to every campaign belonging to this client instead of naming campaigns individually. When the client has no campaigns yet, the SmartInfra is still reserved for that client. Supported with infra_id only; supply campaign_ids when using server_id.

Response Codes

Created
All campaigns were assigned to the SmartInfra
Success
client_id was supplied and the SmartInfra is now reserved for that client, which currently has no campaigns to assign
Already Reported
At least one campaign is already assigned to this SmartInfra
Bad Request
Invalid request body, neither or both of infra_id and server_id were sent, the SmartInfra has no servers, the server_id belongs to a Multi SmartInfra, or the SmartInfra belongs to a client that the listed campaigns do not
Unauthorized
Invalid or missing API key. Check your authentication.
Forbidden
The SmartInfra, one of its servers, or the client does not belong to you
Not Found
No SmartInfra exists for the given infra_id, no server exists for the given server_id, or at least one campaign does not exist. Campaigns belonging to another account are reported the same way.
Conflict
At least one campaign is already assigned to a different SmartInfra, or would exceed the limit of four Single SmartInfra servers
Internal Server Error
Server error occurred. Please try again or contact support if the issue persists.

Best Practices

Assign Before Launch: Attach the SmartInfra while campaigns are still drafts, so the dedicated IP is in place before the first email sends
Send Only Unassigned Campaigns: The request is rejected as a whole if any campaign is already assigned, so filter your list down to campaigns that need the SmartInfra
Batch In Chunks: Split very large rollouts into batches of a few hundred campaigns to keep each request comfortably inside the request timeout

Validation Rules

A campaign can hold either one Multi SmartInfra or up to four Single SmartInfra servers. Any SmartInfra can serve any number of campaigns. Every campaign you list must belong to your account. Requests are validated in full before anything is written, so a rejected request leaves no partial assignment behind.

Implementation Details

One mapping is created per dedicated IP for each campaign, so a Multi SmartInfra holding three IPs and a list of ten campaigns produces thirty mappings, while a Single SmartInfra produces ten. auto_rotate_servers is turned on for those campaigns whenever the SmartInfra holds more than one IP, letting SmartLead rotate sends across them. When a listed campaign belongs to a client, that client is also applied to the SmartInfra and to each of its servers. Response Format: object