Skip to content

Campaigns

Use these APIs to create, update and read 10DLC Campaign Records, as well as add supporting files to existing Campaign Records

Schema

NameTypeDescription
legal_company_nameString requiredThe campaign’s SS4/CRA/Incorporation documents.
usecaseString requiredFor campaign volume under 15k monthly, select ‘Low-volume mixed’ and provide 1-5 sub-usecases. For campaign volume over 15k monthly, select ‘Mixed’ and provide 2 -5 sub usecases.
Valid inputs:Account Notification,Customer Care,Delivery Notification,Fraud Alert Messaging,Higher Education,Low Volume Mixed,Low-Volume Mixed,Marketing,Mixed,Polling and Voting,Public Service Announcement,Security Alert,Machine to Machine,2FA
campaign_descriptionString requiredDescribe the SMS traffic including intended recipients and subject matter. To request expedite, enter ‘EXPEDITE: ’ followed by description. Additional fees apply. See 10 DLC Campaign Registration Overview below for further details.
call_to_action_message_flowString requiredDescribe how a consumer opts-in to the campaign, therefore giving consent to the sender to receive their messages.
sub_usecase_1StringWhen “Low Volume Mixed” is selected as the usecase, provide 1-5 sub-usecases. When “Mixed” is selected as the usecase, select 2-5 sub-usecases.
Valid Inputs:Account Notification,Customer Care,Delivery Notification,Fraud Alert Messaging,Higher Education,Marketing,Polling and Voting,Public Service Announcement,Security Alert,2FA
sub_usecase_2String
sub_usecase_3String
sub_usecase_4String
sub_usecase_5String
embedded_linkbooleanDoes your campaign include an embedded link of any kind? Note public URL shorteners (bitly, tinyurl) are not accepted
embedded_link_sampleString(format:url)An example url of an embedded link
embedded_phone_numberbooleanDoes your campaign use an embedded phone number?
direct_lending_or_loan_arrangementbooleanDoes your campaign include content related to direct lending or loan arrangements?
age_gated_contentbooleanDoes your campaign include age-gated content?
sample_message_1String requiredAn example of the type of messaging you will be sending
sample_message_2String
sample_message_3String
sample_message_4String
sample_message_5String
terms_and_conditions_linkStringA link to the campaigns terms and conditions
privacy_policy_linkString(format:url)A link to the campaigns privacy policy
requested_area_codeStringA requested area code for a new number to add to this campaign
webhookString(format:url)A URL that will have POSTs sent to with any status changes to the brand.

Webhook Format:

{
"id": "123xxx456",
"legal_company_name": "Company Name",
"status": "Pending",
"rejection_reason": "reason" // if the status is Rejected
}

Create a new Campaign Record

Request:

POST api.swift-api.com/api/v0/campaigns
Content-Type: application/json
Authorization: Bearer ABC123
{
"data": {
"legal_company_name": "Brett Test",
"usecase": "Low Volume Mixed",
"campaign_description": "description",
"call_to_action_message_flow": "test",
"privacy_policy_link": "www.url.com/privacy_policy",
"terms_and_conditions_link": "www.url.com/tc",
"embedded_phone_number": true,
"embedded_link": true,
"embedded_link_sample": "www.url.com",
"age_gated_content": false,
"direct_lending_or_loan_arrangement": false,
"sample_message_1": "sample",
"sample_message_2": "",
"sample_message_3": "",
"sample_message_4": "",
"sample_message_5": "",
"sub_usecase_1": "Account Notification",
"sub_usecase_2": "",
"sub_usecase_3": "",
"sub_usecase_4": "",
"sub_usecase_5": "",
"requested_area_code": "705",
"webhook": "www.url3.com"
}
}

Response:

HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": "234xxx345"
},
"type": "csp_brand"
}

Get a Campaign Record

Request:

GET api.swift-api.com/api/v0/campaigns/[id]/
Authorization: Bearer ABC123

Response:

HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"status": "Pending",
"rejection_reason": "reason" //if status is Rejected
"legal_company_name": "Brett Test",
"usecase": "Low Volume Mixed",
"campaign_description": "description",
"call_to_action_message_flow": "test",
"privacy_policy_link": "www.url.com/privacy_policy",
"terms_and_conditions_link": "www.url.com/tc",
"embedded_phone_number": true,
"embedded_link": true,
"embedded_link_sample": "www.url.com",
"age_gated_content": false,
"direct_lending_or_loan_arrangement": false,
"sample_message_1": "sample",
"sample_message_2": "",
"sample_message_3": "",
"sample_message_4": "",
"sample_message_5": "",
"sub_usecase_1": "Account Notification",
"sub_usecase_2": "",
"sub_usecase_3": "",
"sub_usecase_4": "",
"sub_usecase_5": "",
"requested_area_code": "705",
"webhook": "www.url3.com"
}
}

Update a Campaign Record

Request:

PUT api.swift-api.com/api/v0/campaigns/[id]/
Content-Type: application/json
Authorization: Bearer apik_ABC123
{
"data": {
"sample_message_2": "new message",
"embedded_link": false
}
}

Response:

HTTP/1.1 204 No Content

Add a file to a Campaign Record

Request:

PUT api.swift-api.com/api/v0/campaigns/[id]/attachments/
Content-Type: multipart/form-data
Authorization: Bearer apik_ABC123
Body:
key: "type", value "terms_and_conditions " //Valid inputs are `terms_and_conditions`,`call_to_action ` or `privacy_policy `,
key: "file", value: your file

Response:

HTTP/1.1 204 No Content