Groups

Create Groups

Method: POST

URL: https://go.votomobile.org/api/v1/groups

Parameters:

  • api_key
  • name: name of group
  • description (optional): a brief description of the group [default: none]

Returns: id of new group

{"status":200,"message":"Group Created","data":{id: 430}}

Add one or more subscribers to one or more groups

Method: POST

URL: https://go.votomobile.org/api/v1/subscribers/groups

Parameters:

  • api_key
  • subscriber_ids: Specify the subscribers by subscriber id(s), separated by commas: e.g.: 200151, 200178, 200224
  • phone_numbers: (optional; can be provided in place of subscriber_ids) Specify the subscribers by phone number, separated by commas: e.g.: 233244289029,1290309345,232233290192.
Note that if multiple subscribers exist with the same phone number, this API request will affect all of them.
  • groups: the group id(s) of the groups the subscribers will be added to, separated by commas. Example; 1,45,56,34 *
Returns:
multiple subscriber id(s) as an array
{"status":200, "message":"Subscriber(s) Added To Group(s) Successfully", "data":{3123,2354,6767,8989}}

Remove subscriber(s) from group(s)

Method: DELETE

URL: https://go.votomobile.org/api/v1/subscribers/delete/groups

Parameters:

  • api_key
  • subscriber_ids: Specify the subscribers by subscriber id(s), separated by commas: e.g.: 200151, 200178, 200224
  • phone_numbers: (optional; can be provided in place of subscriber_ids) Specify the subscribers by phone number, separated by commas: e.g.: 233244289029,1290309345,44233290192.
Note that if multiple subscribers exist with the same phone number, this API request will affect all of them.
  • groups: the group id(s) of the groups the subscribers will be removed from, separated by commas. Example; 1,45,56,34

Returns:

{"status":200,"message":"Subscriber(s) successfully removed from group(s)","data":{}}

List Groups

Method: GET

URL: https://go.votomobile.org/api/v1/groups

Parameters:

  • api_key

Returns:

{
  "status":200,
  "message":"Group Details"
  "data":{
    "groups": [
       {
          id: 308,
          name: "Group A",
          description: "This is a short description of Group A",
          created_at:"2013-09-24 16:57:25",
          updated_at:"2013-09-24 17:58:25"
       },
       {
          id: 309,
          name: "Group B",
          description: "This is a short description of Group B",
          created_at:"2013-09-24 19:57:25",
          updated_at:"2013-09-24 22:58:25"
       }
    ]
  }
}

List Group Details

Method: GET

URL: https://go.votomobile.org/api/v1/groups/[group_id]

Parameters:

  • api_key
  • group_id

Returns:

{
 "status":200,
 "message":"Group Details",
 "data":{
    group:{
     id: 309,
     name: "Group B",
     description: "This is a short description of Group B",
     created_at:"2013-09-24 19:57:25",
     updated_at:"2013-09-24 22:58:25"
     }
   }
}

Modify Group Details

Method: PUT

URL: https://go.votomobile.org/api/v1/groups/[group_id]

Parameters: Specify only group parameters to be changed

  • api_key
  • group_name: name of group
  • group_description (optional): a brief description of the group [default: none]

Returns:

ID of the group

{"status":200,"message":"Group Modified","data": {id:309}}

Delete Group

Method: DELETE

URL: https://go.votomobile.org/api/v1/groups/[group_id]

Parameters: Specify group id to delete

  • api_key

Returns:

{"status":200,"message":"Succesfully deleted group"}