Skip to content
Ben edited this page Apr 25, 2015 · 1 revision

API Endpoints

POST /subscribers

Adds a new phone number to the SMS subscriber list, saving it to the the Google Fusion Table

Required Body Parameters

  • phone : 10-digit US phone number. It is reasonably permissive as far as format, and will accept XXX-XXX-XXXX, 1-XXX-XXX-XXXX, XXXXXXXXXX, (XXX) XXX-XXXX, etc. Numbers are normalized to just ten digits with no leading 1 on submission.

Returns

Subscriber object:

  • rowid: The ID assigned by Fusion Tables
  • phone: the subscriber phone number, normalized to format XXXXXXXXXX
  • createdAt: timestamp of the row's creation

DELETE /subscribers/:phone

Deletes an SMS subscriber from the fusion table. Note that this route takes the phone number as the route parameter rather than the rowid. Number should be ten digits, no leading 1, no spaces or punctuation.

Required Body Parameters

None

Returns

true if successful, error object with further information if unsuccessful.


POST /contacts - Not yet implemented

Adds a contact to the contacts table

Required body parameters

  • firstname
  • lastname
  • email

Optional body parameters

  • phone
  • address
  • city
  • state
  • zip

Returns*

Row object containing all the parameters listed above, plus rowid assigned by Fusion Tables


POST /sms - Not Yet Implemented

Receives incoming SMS messages from Twilio and routes them through the notifications service to reply to the user with the appropriate SMS.