1MSG
ReferenceCampaigns API

Send one test

POST
/api/v1/campaigns/{campaignId}/test

Sends the draft content to one recipient and does not change campaign status or analytics. Provide exactly one of phone (E.164) or bsuid (provider format). A provider rejection is an error, not an accepted send. conversationId is the Inbox dialog. messageId and providerMessageId are the same provider message id, or null when the provider accepted the send without an id.

Authorization

bearer
headerAuthorizationBearer <token>

Key issued in Settings → Developer → API key. Inbox methods need the Inbox scope. Campaigns methods need the Campaigns scope.

Path Parameters

campaignId*string

Campaign id returned by create or list.

Request Body

application/json
  1. body
phone?string

E.164 phone, for example +15551234567. Send exactly one of phone or bsuid. Does not change campaign status or analytics.

bsuid?string

Provider BSUID, for example ab.abc123xyz. A trailing @lid is accepted. Send exactly one of phone or bsuid.

Response Body

application/json
  1. response
accepted*boolean

Always true when the test was accepted.

campaignId*string

Campaign id.

campaignStatus*string

Campaign status after the test. A test does not change it.

Value in"draft""sending""pause""completed""failed""scheduled"
excludedFromAnalytics*boolean

Always true. This send is left out of analytics.

conversationId*|

Inbox conversation id, or null when the provider did not return one.

messageId*|

Provider message id, or null when the provider accepted the send without an id.

providerMessageId*|

Same value as messageId.

phone?string

E.164 phone. Present when the test was sent to a phone. Exactly one of phone or bsuid is returned.

bsuid?string

Provider BSUID. Present when the test was sent to a BSUID. Exactly one of phone or bsuid is returned.

curl -X POST 'https://api.1msg.io/api/v1/campaigns/string/test' \  -H 'Content-Type: application/json' \  -d '{}'
{  "accepted": true,  "campaignId": "cm3campaign01",  "campaignStatus": "draft",  "excludedFromAnalytics": true,  "conversationId": "cm3dialog01",  "messageId": "wamid.HBgM",  "providerMessageId": "wamid.HBgM",  "phone": "+15551234567",  "bsuid": "ab.abc123xyz"}