Group Text API

Group Text is a RESTful web service that allows the user to Add and Edit Groups and Contacts within the Contact At Once! Network.

Since the API is based on REST principles, it’s very easy to write and test applications. You can use your browser to access URLs, and you can use pretty much any HTTP client in any programming language to interact with the API. The ContactAtOnce! Group Text REST API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.

The Group Text REST web service uses Basic Authentication. ContactAtOnce! can issue you an APIKEY to use. A username and password are not necessary.

Requests


    Base URL (regionally defined):

    • North America : https://api.contactatonce.com/
    • Australia : https://api.contactatonce.com.au/
    • Europe : https://api.contactatonce.co.uk/

    AddGroup

    This REST service is used to create a new Group for GroupText.
    Method : POST
    Format : JSON
    URI : /api/GroupText/AddGroup

    Request   
    ParameterTypeRequiredDescription
    advertiserIdStringRequiredUnique ID assigned to Advertiser Account by Publisher at provisioning.
    groupGroupRequiredInformation about the group to be added

    Response  
    ParemeterTypeDescription
    payload/idIntUnique ID assigned by ContactAtOnce!
    Note: This attribute will not be present on unsuccessful calls and only will be present for successes.
    successBooleanIndicates whether call was success or not.
    descriptionStringNullable. Descriptive text that describes user exceptions.
    eventCodeIntEvent code that can be used for debugging purposes with technical support.
    Note: This attribute will not be present on successful calls and only will be present for failures.

    Sample Header- JSON

    Authorization: Basic {YOUR_API_KEY}
    Accept: version=2;

    Sample POST- JSON

    {
    	"advertiserId": "05",
    	"group": {
    		"name": "Demo",
    		"description": "My new Demo group"
    	},
    }

    Sample Response- JSON

    {
    	"payload": {"id": 47},
    	"success": true,
    	"description": null
    }
    EditGroup

    This REST service is used to edit existing Groups for GroupText. The method sets both the Group Name and Description provided based on the GroupID.
    Method : PUT
    Format : JSON
    URI : /api/GroupText/EditGroup

    Request   
    ParameterTypeRequiredDescription
    advertiserIdStringRequiredUnique ID assigned to Advertiser Account by Publisher at provisioning.
    groupGroupRequiredInformation about the group to be edited

    Response  
    ParemeterTypeDescription
    successBooleanIndicates whether call was success or not.
    descriptionStringNullable. Descriptive text that describes user exceptions.
    eventCodeIntEvent code that can be used for debugging purposes with technical support.
    Note: This attribute will not be present on successful calls and only will be present for failures.

    Sample Header- JSON

    Authorization: Basic {YOUR_API_KEY}
    Accept: version=2; 

    Sample PUT- JSON

    {
    	"advertiserId": "05",
    	"group": {
    		"id": 47,
    		"name": "Demo",
    		"description": "My New Demo Group"
    	}
    }

    Sample Response- JSON

    {
    	"success": true,
    	"description": null
    }
    DeleteGroup

    This REST service is used to delete Groups. The contacts will not be deleted from the account.
    Method : DELETE
    URI : /api/GroupText/DeleteGroup?advertiserId={AdvertiserId}&groupId={GroupId}

    Request   
    ParameterTypeRequiredDescription
    advertiserIdStringRequiredUnique ID assigned to Advertiser Account by Publisher at provisioning.
    groupIdIntRequiredId of Group to be deleted

    Response  
    ParemeterTypeDescription
    successBooleanIndicates whether call was success or not.
    descriptionStringNullable. Descriptive text that describes user exceptions.
    eventCodeIntEvent code that can be used for debugging purposes with technical support.
    Note: This attribute will not be present on successful calls and only will be present for failures.

    Sample Header- JSON

    Authorization: Basic {YOUR_API_KEY}
    Accept: version=2; 

    Sample Response- JSON

    {
    	"success": true,
    	"description": null
    }
    GetGroupList

    This REST service is used to retrieve a complete list of active Groups with the CAO assign GroupID.
    Method : GET
    URI : /api/GroupText/GetGroupList?advertiserId={AdvertiserId}

    Request   
    ParameterTypeRequiredDescription
    advertiserIdStringRequiredUnique ID assigned to Advertiser Account by Publisher at provisioning.

    Response  
    ParemeterTypeDescription
    payloadArray of GroupTextGroupInformation about each group
    Note: This attribute will not be present on unsuccessful calls and only will be present for successes.
    successBooleanIndicates whether call was success or not.
    descriptionStringNullable. Descriptive text that describes user exceptions.
    eventCodeIntEvent code that can be used for debugging purposes with technical support.
    Note: This attribute will not be present on successful calls and only will be present for failures.

    Sample Header- JSON

    Authorization: Basic {YOUR_API_KEY}
    Accept: version=2;

    Sample Response- JSON

    {
    	"payload":	 [
    		 "id": 39,
    		 "name": "Testing",
    		 "description": "Testing Group"
    	  },
    			{
    		 "id": 47,
    		 "name": "Demo",
    		 "description": "My New Demo Group"
    	  }
    	],
    	"success": true,
    	"description": null
    }
    AddContact

    This REST service is used to create Contacts.
    Method : POST
    Format : JSON
    URI : /api/GroupText/AddContact

    Request   
    ParameterTypeRequiredDescription
    advertiserIdStringRequiredUnique ID assigned to Advertiser Account by Publisher at provisioning.
    contactContactRequiredInformation about the contact to be added

    Response  
    ParemeterTypeDescription
    payload/idIntUnique ID assigned by ContactAtOnce!
    Note: This attribute will not be present on unsuccessful calls and only will be present for successes.
    successBooleanIndicates whether call was success or not.
    descriptionStringNullable. Descriptive text that describes user exceptions.
    eventCodeIntEvent code that can be used for debugging purposes with technical support.
    Note: This attribute will not be present on successful calls and only will be present for failures.

    Sample Header- JSON

    Authorization: Basic {YOUR_API_KEY}
    Accept: version=2; 

    Sample POST- JSON

    {
    	"advertiserId": "05",
    	"contact": {
    		"FirstName": "Barney",
    		"LastName":"Ruble",
    		"Email":"BRuble@bedrock.com",
    		"PhoneNumber":"12125551212"
    	}
    }

    Sample Response- JSON

    {
    	"payload": {"id": 47},
    	"success": true,
    	"description": null
    }
    EditContact

    Method : PUT
    Format : JSON
    URI : /api/GroupText/EditContact

    Request   
    ParameterTypeRequiredDescription
    advertiserIdStringRequiredUnique ID assigned to Advertiser Account by Publisher at provisioning.
    contactContactRequiredInformation about the contact to be edited

    Response  
    ParemeterTypeDescription
    successBooleanIndicates whether call was success or not.
    descriptionStringNullable. Descriptive text that describes user exceptions.
    eventCodeIntEvent code that can be used for debugging purposes with technical support.
    Note: This attribute will not be present on successful calls and only will be present for failures.

    Sample Header- JSON

    Authorization: Basic {YOUR_API_KEY}
    Accept: version=2; 

    Sample PUT- JSON

    {
    	"advertiserId": "05",
    	"contact": {
    		"id": 47,
    		"firstName": "Barney",
    		"lastName": "Rubble",
    		"email": "",
    		"phoneNumber": "12125551234",
    	}
    }

    Sample Response- JSON

    {
    	"success": true,
    	"description": null
    }
    DeleteContact

    Method : DELETE
    URI : /api/GroupText/DeleteContact?advertiserId={AdvertiserId}&contactId={ContactId}

    Request   
    ParameterTypeRequiredDescription
    advertiserIdStringRequiredUnique ID assigned to Advertiser Account by Publisher at provisioning.
    groupIdIntRequiredId of Group to be deleted

    Response  
    ParemeterTypeDescription
    successBooleanIndicates whether call was success or not.
    descriptionStringNullable. Descriptive text that describes user exceptions.
    eventCodeIntEvent code that can be used for debugging purposes with technical support.
    Note: This attribute will not be present on successful calls and only will be present for failures.

    Sample Header- JSON

    Authorization: Basic {YOUR_API_KEY}
    Accept: version=2; 

    Sample Response- JSON

    {
    	"success": true,
    	"description": null
    }
    GetGroupContacts

    This REST service is used to retrieve a complete list of all active Contacts in the Group.
    Method : GET
    URI : /api/GroupText/GetGroupContacts?advertiserId={AdvertiserId}&group{GroupId}

    Request   
    ParameterTypeRequiredDescription
    advertiserIdStringRequiredUnique ID assigned to Advertiser Account by Publisher at provisioning.
    groupIdIntRequiredUnique Id of Group

    Response  
    ParemeterTypeDescription
    payloadArray of ContactComplete information about each contact
    Note: This attribute will not be present on unsuccessful calls and only will be present for successes.
    successBooleanIndicates whether call was success or not.
    descriptionStringNullable. Descriptive text that describes user exceptions.
    eventCodeIntEvent code that can be used for debugging purposes with technical support.
    Note: This attribute will not be present on successful calls and only will be present for failures.

    Sample Header- JSON

    Authorization: Basic {YOUR_API_KEY}
    Accept: version=2; 

    Sample Response- JSON

    
    	"payload":	 [
    			{
    		 "id": 40,
    		 "firstName": "Bob",
    		 "lastName": "Smith",
    		 "email": "rsmith@gmail.com",
    		 "phoneNumber": "4045558520"
    	  },
    			{
    		 "id": 43,
    		 "firstName": "Sadie",
    		 "lastName": "Small",
    		 "email": "",
    		 "phoneNumber": "4045552490"
    	  }
    	],
    	"success": true,
    	"description": null
    }
    AddContactToGroup

    This REST service is used to add a contact to a Groups.
    Method : POST
    Format : JSON
    URI : /api/GroupText/AddContactToGroup

    Request   
    ParameterTypeRequiredDescription
    advertiserIdStringRequiredUnique ID assigned to Advertiser Account by Publisher at provisioning.
    contact/idIntRequiredId of Contact to be added to the Group
    group/idIntRequiredId of Group where Contact will be added

    Response  
    ParemeterTypeDescription
    successBooleanIndicates whether call was success or not.
    descriptionStringNullable. Descriptive text that describes user exceptions.
    eventCodeIntEvent code that can be used for debugging purposes with technical support.
    Note: This attribute will not be present on successful calls and only will be present for failures.

    Sample Header- JSON

    Authorization: Basic {YOUR_API_KEY}
    Accept: version=2; 
    {
    	"advertiserId": "05",
    	"contact": {
    		"id": 47
    	},
    	"group": {
    		"id": 44
    	}
    }

    Sample Response- JSON

    {
    	"success": true,
    	"description": null
    }
    DeleteContactFromGroup

    This REST service is used to delete a contact from a Group. The contact will not be deleted from the account.
    Method : DELETE
    URI : /api/GroupText/DeleteContactFromGroup?advertiserId={AdvertiserId}&contactId={ContactId}&groupId={GroupId}

    Request   
    ParameterTypeRequiredDescription
    advertiserIdStringRequiredUnique ID assigned to Advertiser Account by Publisher at provisioning.
    contactIdIntRequiredId of Contact to be deleted from the Group
    groupIdIntRequiredId of Group where Contact will be deleted from

    Response  
    ParemeterTypeDescription
    successBooleanIndicates whether call was success or not.
    descriptionStringNullable. Descriptive text that describes user exceptions.
    eventCodeIntEvent code that can be used for debugging purposes with technical support.
    Note: This attribute will not be present on successful calls and only will be present for failures.

    Sample Header- JSON

    Authorization: Basic {YOUR_API_KEY}
    Accept: version=2; 

    Sample Response- JSON

    {
    	"success": true,
    	"description": null
    }
    GetContactList

    This REST service is used to retrieve a complete list of active and inactive contacts.
    Method : GET
    URI : /api/GroupText/GetContactList?advertiserId={AdvertiserId}

    Request   
    ParameterTypeRequiredDescription
    advertiserIdStringRequiredUnique ID assigned to Advertiser Account by Publisher at provisioning.

    Response  
    ParemeterTypeDescription
    payloadArray of ContactComplete information about each contact
    Note: This attribute will not be present on unsuccessful calls and only will be present for successes.
    successBooleanIndicates whether call was success or not.
    descriptionStringNullable. Descriptive text that describes user exceptions.
    eventCodeIntEvent code that can be used for debugging purposes with technical support.
    Note: This attribute will not be present on successful calls and only will be present for failures.

    Sample Header-JSON

    Authorization: Basic {YOUR_API_KEY}
    Accept: version=2; 

    Sample Response- JSON

    {
    	"payload" : []
    		 "id": 50,
    		 "firstName": "Fred",
    		 "lastName": "Flintstone",
    		 "email": null,
    		 "phone": "4045551234",
    		 "createDate": "7/29/2015 4:46 PM",
    		 "status": "Active"
    	  },
    			{
    		 "id": 51,
    		 "firstName": "Wilma",
    		 "lastName": "Flinstone",
    		 "email": "wilma@bedrock.com",
    		 "phone": "404-555-2589",
    		 "createDate": "7/29/2015 4:46 PM",
    		 "status": "Active"
    	  }
    	],
    	"success": true,
    	"description": null
    }