Manage campaigns
For authentication,The Username and Password should be sent as a Basic Auth tokens in the Authorization header of the request. Create account.
API endpoint:
get
https://api.txt.ws/v3/campaign_get/{campaignId}
Description:
Retrieve a campaign you registerd from TCR by a campaign ID.
Request example
curl --location --request GET 'https://api.txt.ws/v3/campaign_get/{campaignId}' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {api_key:secret_key}'
| Parameter | Type | Description |
| campaignId | Required string | Campaign alphanumeric identifier (prefixed with letter 'C') |
API endpoint:
post
https://api.txt.ws/v3/campaign_update/{campaignId}
Description:
This operation let's you update a campaign you registered. Not all fields are updateable.
Request example
curl --location --request GET 'https://api.txt.ws/v3/campaign_update/{campaignId}' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {api_key:secret_key}' \
--data-raw '{
"resellerId": "string",
"description": "string",
"sample1": "string",
"sample2": "string",
"sample3": "string",
"sample4": "string",
"sample5": "string",
"messageFlow": "string",
"helpMessage": "string",
"autoRenewal": true
}'
| Parameter | Type | Description |
| campaignId | Required string | Campaign alphanumeric identifier (prefixed with letter 'C') |
| resellerId | Optional string | Alphanumeric identifier of the reseller that you want to associate with this campaign. |
| description | Optional string | Summary description of this campaign. |
| sample1 | Optional string | Message sample. Some campaign tiers require 1 or more message samples. |
| sample2 | Optional string | Message sample. Some campaign tiers require 2 or more message samples. |
| sample3 | Optional string | Message sample. Some campaign tiers require 3 or more message samples. |
| sample4 | Optional string | Message sample. Some campaign tiers require 4 or more message samples. |
| sample5 | Optional string | Message sample. Some campaign tiers require 5 or more message samples. |
| autoRenewal | Optional string | Campaign subscription auto-renewal status. |
| messageFlow | Optional string | Message flow description. |
| optoutMessage | Optional string | Opt-out message of the campaign. |
| optinMessage | Optional string | Opt-in message of the campaign. |
| helpMessage | Optional string | Help message of the campaign. |
| optinKeywords | Optional string | Opt-in Keywords of the campaign. |
| optoutKeywords | Optional string | Opt-out Keywords of the campaign. |
| helpKeywords | Optional string | Help Keywords of the campaign. |
API endpoint:
delete
https://api.txt.ws/v3/campaign_delete/{campaignId}
Description:
Terminate an active campaign by removing the campaign from registry and OSR. A campaign cannot be restored once it is deactivated. CSP must apply for a new campaign. This API call is idenpotent.
Request example
curl --location --request DELETE 'https://api.txt.ws/v3/campaign_delete/{campaignId}' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {api_key:secret_key}'
| Parameter | Type | Description |
| campaignId | Required string | Campaign alphanumeric identifier (prefixed with letter 'C') |