SlideShare a Scribd company logo
1 of 15
Download to read offline
twilio
         CLOUD COMMUNICATIONS




      Designing the Best
Telecommunications API
   Tim Milliron, Director of Engineering
                            @timmilliron
Who is twilio?
          RESTful web APIs to automate
          Voice & SMS communications


      Voice             SMS           Phone
                                     Numbers
•   Inbound        • Incoming      • PhoneNumber
•   Outbound       • Outgoing        Provisioning
•   Mobile VoIP    • Short Codes   • ShortCode
•   Browser VoIP                     Applications
(415) 233-WAZA
    • Find & buy a number:
curl -u $U:$P
https://api.twilio.com/2010-04-01/Accounts/AC123/
AvailablePhoneNumbers/US/Local?Contains=415***WAZA

curl -u $U:$P -d “PhoneNumber=415233WAZA”
https://api.twilio.com/2010-04-01/Accounts/AC123/IncomingPhoneNumbers/


    • Make an outgoing call:
curl -u $U:$P -d “Url=www.example.com/outgoing.xml”
-d “From=4152339292” -d “To=4158675309”
https://api.twilio.com/2010-04-01/Accounts/AC123/Calls/



    • Receive an incoming call:
<Response>
    <Say>Thanks for calling the Waza Twilio number! Huzzah!</Say>
    <Sms>Heroku’s Waza Rocks!</Sms>
</Response>
7 Principles
#1 APIs are for Abstraction
Example: DIDs
  DID	
  (Direct	
  Inward	
  Dial)	
  —	
  Inbound-­‐only	
  phone	
  number	
  
  assigned	
  to	
  a	
  group	
  of	
  phone	
  lines	
  that	
  allows	
  a	
  
  phone	
  system	
  to	
  route	
  to	
  a	
  unique	
  location	
  or	
  person.	
  
  A	
  group	
  of	
  DIDs	
  is	
  often	
  assigned	
  to	
  a	
  single	
  trunk	
  
  group.	
  DID	
  numbers	
  are	
  not	
  sent	
  out	
  as	
  the	
  ANI	
  when	
  
  the	
  caller	
  places	
  an	
  outbound	
  call.



Developers don’t give a f*** about DIDs
  twilio’s API talks PhoneNumbers
  (they work for incoming & outgoing)
#2 What’s the noun?
Speak resources:
  GET api.twilio.com/.../Calls
  GET api.twilio.com/.../Calls/CA123
  POST api.twilio.com/.../Calls


Not RPC:
  GET api.twilio.com/.../GetCalls/
  POST api.twilio.com/.../PlaceCall
#3 Be RESTful
Hypermedia for sub-resource traversal:
  <Account>
     <Sid>AC123</Sid>
     <OwnerAccountSid>AC456</OwnerAccountSid>
     <FriendlyName>tim@twilio.com's Account</FriendlyName>
     <Status>active</Status>
     ...
     <Uri>
        /2010-04-01/Accounts/AC123
     </Uri>
     <SubresourceUris>
        <AvailablePhoneNumbers>
           /2010-04-01/Accounts/AC123/AvailablePhoneNumbers
        </AvailablePhoneNumbers>
        <Calls>
           /2010-04-01/Accounts/AC123/Calls
        </Calls>
        ...
     </SubresourceUris>
  </Account>
#3 Be RESTful
Hypermedia for list traversal:
 <SMSMessages page="0" numpages="16" pagesize="50" total="780"
 start="0" end="49" uri="/2010-04-01/Accounts/AC123/SMS/
 Messages" firstpageuri="/2010-04-01/Accounts/AC123/SMS/
 Messages?Page=0&PageSize=50" previouspageuri="" nextpageuri="/
 2010-04-01/Accounts/AC123/SMS/Messages?Page=1&PageSize=50"
 lastpageuri="/2010-04-01/Accounts/AC123/SMS/Messages?
 Page=15&PageSize=50">
    ...
 </SMSMessages>
#4 The API Giveth...
... but the API can’t (usually) taketh away


It’s much easier to add something
than to remove something
  ➡ Get it in developers’ hands,
      see what use cases develop.
  ➡ Then, aggressively add
      frequently-requested features
#5 The Smallest API Possible...


                    twilio.com/
                     authorize



                   access_token=
                     xxxyyyzzz

/Calls?access_token=xxxyyyzzz
/IncomingPhoneNumbers?access_token=xxxyyyzzz
...
#5 The Smallest API Possible...


                    twilio.com/
                     authorize



                   account_sid=
                      AC678

/Calls
/IncomingPhoneNumbers
...
#6 ...But No Smaller
“As close to C as possible, but no closer”
 - Bjarne Stroustrup, creator of C++


Make the common case easy.

This works, and it’s generic:
   curl api.twilio.com/.../AvailablePhoneNumbers?
   Contains=510*******



But, this is what most developers want:
   curl api.twilio.com/.../AvailablePhoneNumbers?
   AreaCode=510
#7 Don’t Settle
• Late changes are OK
• Don’t be afraid to version
  (with good reason)
• Get feedback early, often, & throughout
     Discuss, spec, write, try it, rewrite
      discuss it some more, rewrite again
Process    Perspective
 Discuss      Developers
              Developers
  Spec
              Developers

  Build
twilio
        CLOUD COMMUNICATIONS




Tim Milliron, Director of Engineering
                         @timmilliron

More Related Content

What's hot

Twilio SMS - API for Sending & Receiving SMS Messages
Twilio SMS - API for Sending & Receiving SMS MessagesTwilio SMS - API for Sending & Receiving SMS Messages
Twilio SMS - API for Sending & Receiving SMS MessagesTwilio Inc
 
AWS Customer Presentation - Twilio
AWS Customer Presentation - TwilioAWS Customer Presentation - Twilio
AWS Customer Presentation - TwilioAmazon Web Services
 
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More FeaturesSmarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More FeaturesTwilio Inc
 
Twilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Real-time Communications OverviewTwilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Real-time Communications OverviewTwilio Inc
 
Twilio Signal 2016 Keynote
Twilio Signal 2016 Keynote Twilio Signal 2016 Keynote
Twilio Signal 2016 Keynote Twilio Inc
 
Twilio API: Build SMS Text Message Into Web Apps
Twilio API: Build SMS Text Message Into Web AppsTwilio API: Build SMS Text Message Into Web Apps
Twilio API: Build SMS Text Message Into Web AppsMindfire Solutions
 
What Can You Do With Twilio
What Can You Do With TwilioWhat Can You Do With Twilio
What Can You Do With TwilioTwilio Inc
 
Twilio Presentation
Twilio PresentationTwilio Presentation
Twilio PresentationChelsea Pugh
 
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIP
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIPTwilio Signal 2016 Build Your Own Cloud Enterprise VoIP
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIPTwilio Inc
 
Final Twilio Under the Radar 2009 Cloud
Final Twilio Under the Radar 2009 CloudFinal Twilio Under the Radar 2009 Cloud
Final Twilio Under the Radar 2009 CloudDealmaker Media
 
Tropo Presentation for TADHack
Tropo Presentation for TADHackTropo Presentation for TADHack
Tropo Presentation for TADHackAlan Quayle
 
Cloud Telephony Public
Cloud Telephony PublicCloud Telephony Public
Cloud Telephony PublicMark Plakias
 
Otra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefoníaOtra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefoníaMartin Perez
 
How the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsHow the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsPhil Leggetter
 
Create an IVR that Keeps Up with Your Customers
Create an IVR that Keeps Up with Your CustomersCreate an IVR that Keeps Up with Your Customers
Create an IVR that Keeps Up with Your CustomersTwilio Inc
 
Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Twilio Inc
 
Twilio MMS Deep Dive
Twilio MMS Deep DiveTwilio MMS Deep Dive
Twilio MMS Deep DiveTwilio Inc
 
Twilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-onsTwilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-onsTwilio Inc
 
Twilio using Groovy Grails
Twilio using Groovy GrailsTwilio using Groovy Grails
Twilio using Groovy GrailsAli Tanwir
 
Twilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Taking Your SMS App GlobalTwilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Taking Your SMS App GlobalTwilio Inc
 

What's hot (20)

Twilio SMS - API for Sending & Receiving SMS Messages
Twilio SMS - API for Sending & Receiving SMS MessagesTwilio SMS - API for Sending & Receiving SMS Messages
Twilio SMS - API for Sending & Receiving SMS Messages
 
AWS Customer Presentation - Twilio
AWS Customer Presentation - TwilioAWS Customer Presentation - Twilio
AWS Customer Presentation - Twilio
 
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More FeaturesSmarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
 
Twilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Real-time Communications OverviewTwilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Real-time Communications Overview
 
Twilio Signal 2016 Keynote
Twilio Signal 2016 Keynote Twilio Signal 2016 Keynote
Twilio Signal 2016 Keynote
 
Twilio API: Build SMS Text Message Into Web Apps
Twilio API: Build SMS Text Message Into Web AppsTwilio API: Build SMS Text Message Into Web Apps
Twilio API: Build SMS Text Message Into Web Apps
 
What Can You Do With Twilio
What Can You Do With TwilioWhat Can You Do With Twilio
What Can You Do With Twilio
 
Twilio Presentation
Twilio PresentationTwilio Presentation
Twilio Presentation
 
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIP
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIPTwilio Signal 2016 Build Your Own Cloud Enterprise VoIP
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIP
 
Final Twilio Under the Radar 2009 Cloud
Final Twilio Under the Radar 2009 CloudFinal Twilio Under the Radar 2009 Cloud
Final Twilio Under the Radar 2009 Cloud
 
Tropo Presentation for TADHack
Tropo Presentation for TADHackTropo Presentation for TADHack
Tropo Presentation for TADHack
 
Cloud Telephony Public
Cloud Telephony PublicCloud Telephony Public
Cloud Telephony Public
 
Otra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefoníaOtra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefonía
 
How the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsHow the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communications
 
Create an IVR that Keeps Up with Your Customers
Create an IVR that Keeps Up with Your CustomersCreate an IVR that Keeps Up with Your Customers
Create an IVR that Keeps Up with Your Customers
 
Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010
 
Twilio MMS Deep Dive
Twilio MMS Deep DiveTwilio MMS Deep Dive
Twilio MMS Deep Dive
 
Twilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-onsTwilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-ons
 
Twilio using Groovy Grails
Twilio using Groovy GrailsTwilio using Groovy Grails
Twilio using Groovy Grails
 
Twilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Taking Your SMS App GlobalTwilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Taking Your SMS App Global
 

Similar to 7 Principles of API Design - Waza

How to Implement Conversational IVR
How to Implement Conversational  IVRHow to Implement Conversational  IVR
How to Implement Conversational IVRkore.ai
 
Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012Michael Peacock
 
Twilio - Social App Workshop - 2010-07-24
Twilio - Social App Workshop - 2010-07-24Twilio - Social App Workshop - 2010-07-24
Twilio - Social App Workshop - 2010-07-24Twilio Inc
 
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016Codemotion
 
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016Cisco DevNet
 
How to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and ChatbotsHow to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and ChatbotsCisco DevNet
 
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...eCommConf
 
Subscribed 2017: Understanding Zuora’s API Framework
Subscribed 2017: Understanding Zuora’s API FrameworkSubscribed 2017: Understanding Zuora’s API Framework
Subscribed 2017: Understanding Zuora’s API FrameworkZuora, Inc.
 
Astricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installationsAstricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installationsOlle E Johansson
 
The Real World - Plugging the Enterprise Into It (nodejs)
The Real World - Plugging  the Enterprise Into It (nodejs)The Real World - Plugging  the Enterprise Into It (nodejs)
The Real World - Plugging the Enterprise Into It (nodejs)Aman Kohli
 
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...CA API Management
 
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar Moshe Kaplan
 
Contact Center fundamentals for Kids
Contact Center fundamentals for KidsContact Center fundamentals for Kids
Contact Center fundamentals for KidsJulian Frank
 
The Momentum of Collaboration and the Customer Experience
The Momentum of Collaboration and the Customer ExperienceThe Momentum of Collaboration and the Customer Experience
The Momentum of Collaboration and the Customer ExperienceAvaya Inc.
 
How serverless changes the cost paradigm
How serverless changes the cost paradigmHow serverless changes the cost paradigm
How serverless changes the cost paradigmYan Cui
 
SignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ CodetockSignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ CodetockSam Basu
 
Getting Started with Twilio
Getting Started with TwilioGetting Started with Twilio
Getting Started with TwilioMichael Kimsal
 
BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.Sumutiu Marius
 

Similar to 7 Principles of API Design - Waza (20)

How to Implement Conversational IVR
How to Implement Conversational  IVRHow to Implement Conversational  IVR
How to Implement Conversational IVR
 
Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012
 
Twilio - Social App Workshop - 2010-07-24
Twilio - Social App Workshop - 2010-07-24Twilio - Social App Workshop - 2010-07-24
Twilio - Social App Workshop - 2010-07-24
 
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016
 
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
 
How to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and ChatbotsHow to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and Chatbots
 
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...
 
Subscribed 2017: Understanding Zuora’s API Framework
Subscribed 2017: Understanding Zuora’s API FrameworkSubscribed 2017: Understanding Zuora’s API Framework
Subscribed 2017: Understanding Zuora’s API Framework
 
Astricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installationsAstricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installations
 
The Real World - Plugging the Enterprise Into It (nodejs)
The Real World - Plugging  the Enterprise Into It (nodejs)The Real World - Plugging  the Enterprise Into It (nodejs)
The Real World - Plugging the Enterprise Into It (nodejs)
 
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
 
Look Who's Talking
Look Who's TalkingLook Who's Talking
Look Who's Talking
 
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTCKamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
 
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
 
Contact Center fundamentals for Kids
Contact Center fundamentals for KidsContact Center fundamentals for Kids
Contact Center fundamentals for Kids
 
The Momentum of Collaboration and the Customer Experience
The Momentum of Collaboration and the Customer ExperienceThe Momentum of Collaboration and the Customer Experience
The Momentum of Collaboration and the Customer Experience
 
How serverless changes the cost paradigm
How serverless changes the cost paradigmHow serverless changes the cost paradigm
How serverless changes the cost paradigm
 
SignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ CodetockSignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ Codetock
 
Getting Started with Twilio
Getting Started with TwilioGetting Started with Twilio
Getting Started with Twilio
 
BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.
 

More from Twilio Inc

Salesforce’s Andy Kung on the Power of CRM Integrations
 Salesforce’s Andy Kung on the Power of CRM Integrations Salesforce’s Andy Kung on the Power of CRM Integrations
Salesforce’s Andy Kung on the Power of CRM IntegrationsTwilio Inc
 
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call CenterAll Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call CenterTwilio Inc
 
Why Mobile Messaging Works?
Why Mobile Messaging Works?Why Mobile Messaging Works?
Why Mobile Messaging Works?Twilio Inc
 
Understand How Consumers Use Messaging
Understand How Consumers Use MessagingUnderstand How Consumers Use Messaging
Understand How Consumers Use MessagingTwilio Inc
 
How To Track Calls Using Twilio?
How To Track Calls Using Twilio?How To Track Calls Using Twilio?
How To Track Calls Using Twilio?Twilio Inc
 
Twilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Inc
 
Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Technical Blogging Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Technical Blogging Twilio Inc
 
Twilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Serverless Contact CenterTwilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Serverless Contact CenterTwilio Inc
 
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + TwilioTwilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + TwilioTwilio Inc
 
Twilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 Leading An Open Hardware RevolutionTwilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 Leading An Open Hardware RevolutionTwilio Inc
 
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 IoT Using LittleBits and Twilio SMSTwilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 IoT Using LittleBits and Twilio SMSTwilio Inc
 
Twilio Signal 2016 Chaos Patterns
Twilio Signal 2016 Chaos PatternsTwilio Signal 2016 Chaos Patterns
Twilio Signal 2016 Chaos PatternsTwilio Inc
 
Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 How to Impact Non-profits Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 How to Impact Non-profits Twilio Inc
 
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Bringing P2P to the Masses with WebRTCTwilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Bringing P2P to the Masses with WebRTCTwilio Inc
 
Twilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Listing Services and Lead GenerationTwilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Listing Services and Lead GenerationTwilio Inc
 
Twilio Signal 2016 Bots
Twilio Signal 2016 BotsTwilio Signal 2016 Bots
Twilio Signal 2016 BotsTwilio Inc
 
Twilio Signal 2016 Omni-channel Routing Bots
Twilio Signal 2016 Omni-channel Routing BotsTwilio Signal 2016 Omni-channel Routing Bots
Twilio Signal 2016 Omni-channel Routing BotsTwilio Inc
 
Twilio Signal 2016 New Documentation
Twilio Signal 2016 New DocumentationTwilio Signal 2016 New Documentation
Twilio Signal 2016 New DocumentationTwilio Inc
 
Twilio Signal 2016 How to Build Next Generation Speech Analytics
Twilio Signal 2016 How to Build Next Generation Speech AnalyticsTwilio Signal 2016 How to Build Next Generation Speech Analytics
Twilio Signal 2016 How to Build Next Generation Speech AnalyticsTwilio Inc
 
Twilio Signal 2016 Designing Multi-party Call Flows
Twilio Signal 2016 Designing Multi-party Call FlowsTwilio Signal 2016 Designing Multi-party Call Flows
Twilio Signal 2016 Designing Multi-party Call FlowsTwilio Inc
 

More from Twilio Inc (20)

Salesforce’s Andy Kung on the Power of CRM Integrations
 Salesforce’s Andy Kung on the Power of CRM Integrations Salesforce’s Andy Kung on the Power of CRM Integrations
Salesforce’s Andy Kung on the Power of CRM Integrations
 
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call CenterAll Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
 
Why Mobile Messaging Works?
Why Mobile Messaging Works?Why Mobile Messaging Works?
Why Mobile Messaging Works?
 
Understand How Consumers Use Messaging
Understand How Consumers Use MessagingUnderstand How Consumers Use Messaging
Understand How Consumers Use Messaging
 
How To Track Calls Using Twilio?
How To Track Calls Using Twilio?How To Track Calls Using Twilio?
How To Track Calls Using Twilio?
 
Twilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC Reborn
 
Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Technical Blogging Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Technical Blogging
 
Twilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Serverless Contact CenterTwilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Serverless Contact Center
 
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + TwilioTwilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
 
Twilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 Leading An Open Hardware RevolutionTwilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 Leading An Open Hardware Revolution
 
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 IoT Using LittleBits and Twilio SMSTwilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
 
Twilio Signal 2016 Chaos Patterns
Twilio Signal 2016 Chaos PatternsTwilio Signal 2016 Chaos Patterns
Twilio Signal 2016 Chaos Patterns
 
Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 How to Impact Non-profits Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 How to Impact Non-profits
 
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Bringing P2P to the Masses with WebRTCTwilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
 
Twilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Listing Services and Lead GenerationTwilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Listing Services and Lead Generation
 
Twilio Signal 2016 Bots
Twilio Signal 2016 BotsTwilio Signal 2016 Bots
Twilio Signal 2016 Bots
 
Twilio Signal 2016 Omni-channel Routing Bots
Twilio Signal 2016 Omni-channel Routing BotsTwilio Signal 2016 Omni-channel Routing Bots
Twilio Signal 2016 Omni-channel Routing Bots
 
Twilio Signal 2016 New Documentation
Twilio Signal 2016 New DocumentationTwilio Signal 2016 New Documentation
Twilio Signal 2016 New Documentation
 
Twilio Signal 2016 How to Build Next Generation Speech Analytics
Twilio Signal 2016 How to Build Next Generation Speech AnalyticsTwilio Signal 2016 How to Build Next Generation Speech Analytics
Twilio Signal 2016 How to Build Next Generation Speech Analytics
 
Twilio Signal 2016 Designing Multi-party Call Flows
Twilio Signal 2016 Designing Multi-party Call FlowsTwilio Signal 2016 Designing Multi-party Call Flows
Twilio Signal 2016 Designing Multi-party Call Flows
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

7 Principles of API Design - Waza

  • 1. twilio CLOUD COMMUNICATIONS Designing the Best Telecommunications API Tim Milliron, Director of Engineering @timmilliron
  • 2. Who is twilio? RESTful web APIs to automate Voice & SMS communications Voice SMS Phone Numbers • Inbound • Incoming • PhoneNumber • Outbound • Outgoing Provisioning • Mobile VoIP • Short Codes • ShortCode • Browser VoIP Applications
  • 3. (415) 233-WAZA • Find & buy a number: curl -u $U:$P https://api.twilio.com/2010-04-01/Accounts/AC123/ AvailablePhoneNumbers/US/Local?Contains=415***WAZA curl -u $U:$P -d “PhoneNumber=415233WAZA” https://api.twilio.com/2010-04-01/Accounts/AC123/IncomingPhoneNumbers/ • Make an outgoing call: curl -u $U:$P -d “Url=www.example.com/outgoing.xml” -d “From=4152339292” -d “To=4158675309” https://api.twilio.com/2010-04-01/Accounts/AC123/Calls/ • Receive an incoming call: <Response> <Say>Thanks for calling the Waza Twilio number! Huzzah!</Say> <Sms>Heroku’s Waza Rocks!</Sms> </Response>
  • 5. #1 APIs are for Abstraction Example: DIDs DID  (Direct  Inward  Dial)  —  Inbound-­‐only  phone  number   assigned  to  a  group  of  phone  lines  that  allows  a   phone  system  to  route  to  a  unique  location  or  person.   A  group  of  DIDs  is  often  assigned  to  a  single  trunk   group.  DID  numbers  are  not  sent  out  as  the  ANI  when   the  caller  places  an  outbound  call. Developers don’t give a f*** about DIDs twilio’s API talks PhoneNumbers (they work for incoming & outgoing)
  • 6. #2 What’s the noun? Speak resources: GET api.twilio.com/.../Calls GET api.twilio.com/.../Calls/CA123 POST api.twilio.com/.../Calls Not RPC: GET api.twilio.com/.../GetCalls/ POST api.twilio.com/.../PlaceCall
  • 7. #3 Be RESTful Hypermedia for sub-resource traversal: <Account> <Sid>AC123</Sid> <OwnerAccountSid>AC456</OwnerAccountSid> <FriendlyName>tim@twilio.com's Account</FriendlyName> <Status>active</Status> ... <Uri> /2010-04-01/Accounts/AC123 </Uri> <SubresourceUris> <AvailablePhoneNumbers> /2010-04-01/Accounts/AC123/AvailablePhoneNumbers </AvailablePhoneNumbers> <Calls> /2010-04-01/Accounts/AC123/Calls </Calls> ... </SubresourceUris> </Account>
  • 8. #3 Be RESTful Hypermedia for list traversal: <SMSMessages page="0" numpages="16" pagesize="50" total="780" start="0" end="49" uri="/2010-04-01/Accounts/AC123/SMS/ Messages" firstpageuri="/2010-04-01/Accounts/AC123/SMS/ Messages?Page=0&PageSize=50" previouspageuri="" nextpageuri="/ 2010-04-01/Accounts/AC123/SMS/Messages?Page=1&PageSize=50" lastpageuri="/2010-04-01/Accounts/AC123/SMS/Messages? Page=15&PageSize=50"> ... </SMSMessages>
  • 9. #4 The API Giveth... ... but the API can’t (usually) taketh away It’s much easier to add something than to remove something ➡ Get it in developers’ hands, see what use cases develop. ➡ Then, aggressively add frequently-requested features
  • 10. #5 The Smallest API Possible... twilio.com/ authorize access_token= xxxyyyzzz /Calls?access_token=xxxyyyzzz /IncomingPhoneNumbers?access_token=xxxyyyzzz ...
  • 11. #5 The Smallest API Possible... twilio.com/ authorize account_sid= AC678 /Calls /IncomingPhoneNumbers ...
  • 12. #6 ...But No Smaller “As close to C as possible, but no closer” - Bjarne Stroustrup, creator of C++ Make the common case easy. This works, and it’s generic: curl api.twilio.com/.../AvailablePhoneNumbers? Contains=510******* But, this is what most developers want: curl api.twilio.com/.../AvailablePhoneNumbers? AreaCode=510
  • 13. #7 Don’t Settle • Late changes are OK • Don’t be afraid to version (with good reason) • Get feedback early, often, & throughout Discuss, spec, write, try it, rewrite discuss it some more, rewrite again
  • 14. Process Perspective Discuss Developers Developers Spec Developers Build
  • 15. twilio CLOUD COMMUNICATIONS Tim Milliron, Director of Engineering @timmilliron