GovDelivery Interactive Text allows you to build, schedule, and send interactive text message conversations to connect with the public. The RESTful JSON API allows you to automate many aspects of the system including:
The API is in development and subject to change.
All requests must include an authorization token. Use your login credentials to obtain an API token using the method described below. Use the API token to authenticate all subsequent requests.
Errors are returned using standard HTTP error codes. Additional information is returned in the body of the response.
List groups.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen.com/api/groups
Show detailed information about a group with the given ID.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen.com/api/groups/72
Create a new group.
Parameters:
curl -X POST -H "Content-Type: application/json" \
-d '{"group":{"name":"my group name"},"auth_token":"your_token"}' \
https://textizen.com/api/groups
Update an existing group.
curl -X PUT -H "Content-Type: application/json" \
-d '{"group":{"name":"my updated group name"},"auth_token":"your_token"}' \
https://textizen.com/api/groups/2
List campaigns.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen/api/campaigns
Show detailed information about a campaign with the given ID.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen/api/campaigns/12
Create new campaign.
Parameters:
curl -X POST -H "Content-Type: application/json" \
-d '{"campaign":{"title":"Our new campaign","description":"A new campaign to gauge interest in our services","info_message":"Hello! Reply QUIT to unsubscribe.","webhook_url":"https://our.agency.gov/webhook","exchange":"867"},"organization_id":"1","auth_token":"your_token"}' \
https://textizen.com/api/campaigns
List participants.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen.com/api/participants
Show detailed information about a participant with the given ID.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen.com/api/participants/58
Create new participant.
Parameters:
curl -X POST -H "Content-Type: application/json" \
-d '{"participant":{"name":"Jane Q Public", "phone_number":"14155551212"},"campaign_id":"1","auth_token":"your_token"}' \
https://textizen.com/api/participants
Update a participant.
Parameters
curl -X PUT -H "Content-Type: application/json" \
-d '{"name":"Katherine Goble Johnson", "phone_number": "14155551213", "auth_token":"your_token"}' \
https://textizen.com/api/participants/71
Add a participant to a group.
Parameters:
curl -X POST -H "Content-Type: application/json" \
-d '{"subscription":{group_id":"2"}, "auth_token":"your_token"}' \
https://textizen.com/api/participants/58/subscriptions
Remove a participant from a group.
Parameters:
curl -X PUT -H "Content-Type: application/json" \
-d '{"subscription":{group_id":"2"}, "auth_token":"your_token"}' \
https://textizen.com/api/participants/58/subscriptions/unsubscribe
List tokens for a participant.
Parameters:
curl -X GET -H "Content-Type: application/json" \
-d '{"campaign_id":"1", "auth_token":"your_token"}' \
https://textizen.com/api/participants/58/tokens
Set tokens for use in customized messages to a participant.
Parameters:
curl -X PUT -H "Content-Type: application/json" \
-d '{"campaign_id":"1", "tokens":{"token_key":"token_value"}, "auth_token":"your_token"}' \
https://textizen.com/api/participants/58/tokens
Remove tokens from a participant.
Parameters:
curl -X DELETE -H "Content-Type: application/json" \
-d '{"campaign_id":"1", "tokens":"abcd123", "auth_token":"your_token"}' \
https://textizen.com/api/participants/58/tokens
List polls.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen.com/api/polls
Show detailed information about a poll with the given ID, including questions and responses.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen.com/api/polls/3
Create a new poll.
Parameters:
curl -X POST -H "Content-Type: application/json" \
-d '{"poll":{"title":"my poll", "confirmation":"confirmation text", "error_message":"Error happened", "language":"en", "public":"true", "active":"true"}, "auth_token":"your_token"}' \
https://textizen.com/api/polls
List mailings for a followup poll.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen.com/api/polls/1/mailings
Show detailed information about a mailing with the given ID.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen.com/api/mailings/1
Create a new mailing for the specified poll.
Parameters:
curl -X POST -H "Content-Type: application/json" \
-d '{"mailing":{send_at":"2017-03-14T19:26:53.895", "group_ids":[1,77], "phone_numbers_list":"14155551212,16515551212"}, "auth_token":"your_token"}' \
https://textizen.com/api/polls/1/mailings
Update existing mailing.
Parameters:
curl -X PUT -H "Content-Type: application/json" \
-d '{"mailing":{send_at":"2017-03-14T19:26:53.895", "group_ids":[1,77], "phone_numbers_list":"14155551212,16515551212"}, "auth_token":"your_token"}' \
https://textizen.com/api/mailings/2
Show detailed information about a given response.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen.com/api/responses/30
Get current user's information.
curl -X GET -H "Content-Type: application/json" \
-d '{"auth_token":"your_token"}' \
https://textizen.com/api/user