TWILIO INC, 10-Q filed on 8/2/2019
Quarterly Report
v3.19.2
Document and Entity Information - shares
6 Months Ended
Jun. 30, 2019
Jul. 26, 2019
Entity Information [Line Items]    
Document Type 10-Q  
Document Quarterly Report true  
Document Period End Date Jun. 30, 2019  
Document Transition Report false  
Entity File Number 001-37806  
Entity Registrant Name TWILIO INC.  
Entity Incorporation, State or Country Code DE  
Entity Tax Identification Number 26-2574840  
Entity Address, Address Line One 375 Beale Street  
Entity Address, Address Line Two Suite 300  
Entity Address, City or Town San Francisco  
Entity Address, State or Province CA  
Entity Address, Postal Zip Code 94105  
City Area Code 415  
Local Phone Number 390-2337  
Entity Current Reporting Status Yes  
Entity Interactive Data Current Yes  
Entity Filer Category Large Accelerated Filer  
Entity Small Business false  
Entity Emerging Growth Company false  
Entity Shell Company false  
Title of 12(b) Security Class A Common Stock, par value $0.001 per share  
Trading Symbol TWLO  
Security Exchange Name NYSE  
Entity Central Index Key 0001447669  
Amendment Flag false  
Current Fiscal Year End Date --12-31  
Document Fiscal Year Focus 2019  
Document Fiscal Period Focus Q2  
Common Class A    
Entity Information [Line Items]    
Entity Common Stock, Shares Outstanding   121,541,496
Common Class B    
Entity Information [Line Items]    
Entity Common Stock, Shares Outstanding   14,346,097
v3.19.2
Condensed Consolidated Balance Sheets - USD ($)
$ in Thousands
Jun. 30, 2019
Dec. 31, 2018
Current assets:    
Cash and cash equivalents $ 535,911 $ 487,215
Short-term marketable securities 1,346,371 261,128
Accounts receivable, net 126,780 97,712
Prepaid expenses and other current assets 50,451 26,893
Total current assets 2,059,513 872,948
Restricted cash 862 18,119
Property and equipment, net 106,480 63,534
Operating right of use asset 151,946 0
Intangible assets, net 485,410 27,558
Goodwill 2,283,578 38,165
Other long-term assets 21,316 8,386
Total assets 5,109,105 1,028,710
Current liabilities:    
Accounts payable 29,361 18,495
Accrued expenses and other current liabilities 117,625 96,343
Deferred revenue and customer deposits 24,898 22,972
Operating lease liability, current 21,858 0
Financing lease liability, current 5,920 0
Note payable, current 2,119 0
Total current liabilities 201,781 137,810
Operating lease liability, noncurrent 138,819 0
Financing lease liability, noncurrent 7,752 0
Note payable, noncurrent 2,237 0
Convertible senior notes, net 446,177 434,496
Other long-term liabilities 15,479 18,169
Total liabilities 812,245 590,475
Commitments and contingencies (Note 12)
Stockholders’ equity:    
Preferred stock 0 0
Class A and Class B common stock 136 100
Additional paid-in capital 4,794,177 808,527
Accumulated other comprehensive income 3,303 1,282
Accumulated deficit (500,756) (371,674)
Total stockholders’ equity 4,296,860 438,235
Total liabilities and stockholders’ equity $ 5,109,105 $ 1,028,710
v3.19.2
Condensed Consolidated Statements of Operations - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Revenues:        
Revenue $ 275,039 $ 147,754 $ 508,178 $ 276,870
Cost of revenue 125,024 67,940 232,113 127,522
Gross profit 150,015 79,814 276,065 149,348
Operating expenses:        
Research and development 98,783 39,811 176,638 77,387
Sales and marketing 90,421 37,749 162,028 70,571
General and administrative 54,543 24,212 118,719 47,605
Total operating expenses 243,747 101,772 457,385 195,563
Loss from operations (93,732) (21,958) (181,320) (46,215)
Other expenses, net (880) (1,898) (1,516) (1,233)
Loss before provision for income taxes (94,612) (23,856) (182,836) (47,448)
Income tax benefit (provision) 2,033 (150) 53,754 (287)
Net loss attributable to common stockholders $ (92,579) $ (24,006) $ (129,082) $ (47,735)
Net loss per share attributable to common stockholders, basic and diluted (in dollars per share) $ (0.72) $ (0.25) $ (1.05) $ (0.50)
Weighted-average shares used to compute net loss per share attributable to common stockholders, basic and diluted 129,310,641 96,348,356 122,985,716 95,515,583
v3.19.2
Condensed Consolidated Statements of Comprehensive Loss - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Statement of Comprehensive Income [Abstract]        
Net loss $ (92,579) $ (24,006) $ (129,082) $ (47,735)
Other comprehensive income (loss):        
Unrealized gain (loss) on marketable securities 980 152 2,021 (165)
Foreign currency translation 0 (629) 0 102
Total other comprehensive income (loss) 980 (477) 2,021 (63)
Comprehensive loss attributable to common stockholders $ (91,599) $ (24,483) $ (127,061) $ (47,798)
v3.19.2
Condensed Consolidated Statements of Cash Flows - USD ($)
$ in Thousands
6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
CASH FLOWS FROM OPERATING ACTIVITIES:    
Net loss $ (129,082) $ (47,735)
Adjustments to reconcile net loss to net cash (used in) provided by operating activities:    
Depreciation and amortization 49,610 11,392
Right-of-use asset amortization 10,707 0
Net amortization of investment premium and discount (2,948) (237)
Amortization of debt discount and issuance costs 11,682 2,695
Stock-based compensation 129,064 38,546
Amortization of deferred commissions 1,585 478
Provision for doubtful accounts 697 1,515
Tax benefit related to release of valuation allowance (53,502) 0
Write-off of long lived assets 769 515
Other tax benefit realized in the period (692) 0
Changes in operating assets and liabilities:    
Accounts receivable (22,523) (26,048)
Prepaid expenses and other current assets (15,688) (2,847)
Other long-term assets (5,969) (1,908)
Accounts payable 8,306 12,566
Accrued expenses and other current liabilities 13,976 28,040
Deferred revenue and customer deposits 1,927 3,300
Operating right of use liability (9,367) 0
Long-term liabilities (2,371) (1,047)
Net cash (used in) provided by operating activities (13,819) 19,225
CASH FLOWS FROM INVESTING ACTIVITIES:    
Acquisitions, net of cash acquired 146,957 0
Purchases of marketable securities and other investments (1,377,072) (184,364)
Proceeds from sales and maturities of marketable securities 286,653 58,520
Capitalized software development costs (10,520) (9,958)
Purchases of long-lived assets (7,882) (2,315)
Net cash used in investing activities (961,864) (138,117)
CASH FLOWS FROM FINANCING ACTIVITIES:    
Proceeds from a public offering, net of underwriting discount 980,000 0
Payments of costs related to the public offering (347) 0
Proceeds from issuance of convertible senior notes 0 550,000
Payment of debt issuance costs 0 (12,513)
Purchase of capped call 0 (58,465)
Principal payments on notes payable (997) 0
Principal payments on financing leases (2,463) 0
Proceeds from exercises of stock options 25,255 13,715
Proceeds from shares issued under ESPP 8,254 4,474
Value of equity awards withheld for tax liabilities (2,580) (910)
Net cash provided by financing activities 1,007,122 496,301
Effect of exchange rate changes on cash, cash equivalents and restricted cash 0 818
NET INCREASE IN CASH, CASH EQUIVALENTS AND RESTRICTED CASH 31,439 378,227
CASH, CASH EQUIVALENTS AND RESTRICTED CASH—Beginning of period 505,334 120,788
CASH, CASH EQUIVALENTS AND RESTRICTED CASH —End of period 536,773 499,015
Cash paid for income taxes, net 48 321
Cash paid on finance leases 337 0
NON-CASH INVESTING AND FINANCING ACTIVITIES:    
Purchases of property, equipment and intangible assets, accrued but not paid 1,831 572
Purchases of property and equipment through finance leases 13,616 0
Acquisition holdback 4,230  
Acquisition - value of common stock issued, stock awards assumed and measurement period adjustments 2,843,392 0
Stock-based compensation capitalized in software development costs 3,244 2,909
Debt offering costs, accrued but not paid 0 467
Costs related to public offerings, accrued but not paid $ 606 $ 0
v3.19.2
Condensed Consolidated Statements of Stockholders Equity - USD ($)
$ in Thousands
Total
Common Stock
Common Class A
Common Stock
Common Class B
Additional Paid In Capital
Accumulated Other Comprehensive Income
Accumulated Deficit
Follow-on Public Offering
Common Class A
Balance (in shares) at Dec. 31, 2017   69,906,550 24,063,246        
Balance at Dec. 31, 2017 $ 359,846 $ 70 $ 24 $ 608,165 $ 2,025 $ (250,438)  
Increase (Decrease) in Stockholders' Equity [Roll Forward]              
Net loss (23,729)         (23,729)  
Adjustment to opening retained earnings due to adoption of ASC 606 713         713  
Exercise of vested stock options (in shares)     1,190,387        
Exercise of vested stock options 6,678   $ 1 6,677      
Vesting of early exercised stock options 21     21      
Vesting of restricted stock units (in shares)   491,501 52,716        
Value of equity awards withheld for tax liability (in shares)   (8,352) (4,380)        
Value of equity awards withheld for tax liability (371)     (371)      
Conversion of shares of Class B common stock into shares of Class A common stock (in shares)   1,358,716 (1,358,716)        
Conversion of shares of Class B common stock into shares of Class A common stock   $ 1 $ (1)        
Unrealized gain (loss) on marketable securities (317)       (317)    
Foreign currency translation 731       731    
Stock-based compensation 18,968     18,968      
Balance (in shares) at Mar. 31, 2018   71,748,415 23,943,253        
Balance at Mar. 31, 2018 362,540 $ 71 $ 24 633,460 2,439 (273,454)  
Balance (in shares) at Dec. 31, 2017   69,906,550 24,063,246        
Balance at Dec. 31, 2017 359,846 $ 70 $ 24 608,165 2,025 (250,438)  
Increase (Decrease) in Stockholders' Equity [Roll Forward]              
Unrealized gain (loss) on marketable securities (165)            
Foreign currency translation 102            
Balance (in shares) at Jun. 30, 2018   76,511,357 20,828,123        
Balance at Jun. 30, 2018 429,671 $ 75 $ 21 725,073 1,962 (297,460)  
Balance (in shares) at Dec. 31, 2017   69,906,550 24,063,246        
Balance at Dec. 31, 2017 359,846 $ 70 $ 24 608,165 2,025 (250,438)  
Balance (in shares) at Dec. 31, 2018   80,769,763 19,310,465        
Balance at Dec. 31, 2018 438,235 $ 80 $ 20 808,527 1,282 (371,674)  
Balance (in shares) at Mar. 31, 2018   71,748,415 23,943,253        
Balance at Mar. 31, 2018 362,540 $ 71 $ 24 633,460 2,439 (273,454)  
Increase (Decrease) in Stockholders' Equity [Roll Forward]              
Net loss (24,006)         (24,006)  
Exercise of vested stock options (in shares)     960,414        
Exercise of vested stock options 7,037   $ 1 7,036      
Vesting of early exercised stock options 4     4      
Vesting of restricted stock units (in shares)   457,495 40,070        
Value of equity awards withheld for tax liability (in shares)   (5,860) (5,888)        
Value of equity awards withheld for tax liability (539)     (539)      
Conversion of shares of Class B common stock into shares of Class A common stock (in shares)   4,109,726 (4,109,726)        
Conversion of shares of Class B common stock into shares of Class A common stock   $ 4 $ (4)        
Unrealized gain (loss) on marketable securities 152       152    
Foreign currency translation (629)       (629)    
Shares issued under ESPP (in shares)   201,581          
Shares issued under ESPP 4,474     4,474      
Issuance of debt conversion option 119,435     119,435      
Debt conversion option issuance costs (2,819)     (2,819)      
Capped call option issuance costs (58,465)     (58,465)      
Stock-based compensation 22,487     22,487      
Balance (in shares) at Jun. 30, 2018   76,511,357 20,828,123        
Balance at Jun. 30, 2018 429,671 $ 75 $ 21 725,073 1,962 (297,460)  
Balance (in shares) at Dec. 31, 2018   80,769,763 19,310,465        
Balance at Dec. 31, 2018 438,235 $ 80 $ 20 808,527 1,282 (371,674)  
Increase (Decrease) in Stockholders' Equity [Roll Forward]              
Net loss (36,503)         (36,503)  
Exercise of vested stock options (in shares)   748,679 1,023,984        
Exercise of vested stock options 15,328 $ 1 $ 1 15,326      
Vesting of early exercised stock options 9     9      
Vesting of restricted stock units (in shares)   641,406 39,360        
Value of equity awards withheld for tax liability (in shares)   (5,860) (4,431)        
Value of equity awards withheld for tax liability (1,062)     (1,062)      
Conversion of shares of Class B common stock into shares of Class A common stock (in shares)   4,339,519 (4,339,519)        
Conversion of shares of Class B common stock into shares of Class A common stock   $ 4 $ (4)        
Shares issued in acquisition (in shares)   23,555,081          
Shares issued in acquisition 2,658,898 $ 24   2,658,874      
Unrealized gain (loss) on marketable securities 1,041       1,041    
Equity awards assumed in acquisition 191,620     191,620      
Stock-based compensation 59,947     59,947      
Balance (in shares) at Mar. 31, 2019   110,048,588 16,029,859        
Balance at Mar. 31, 2019 3,327,513 $ 109 $ 17 3,733,241 2,323 (408,177)  
Balance (in shares) at Dec. 31, 2018   80,769,763 19,310,465        
Balance at Dec. 31, 2018 438,235 $ 80 $ 20 808,527 1,282 (371,674)  
Increase (Decrease) in Stockholders' Equity [Roll Forward]              
Unrealized gain (loss) on marketable securities 2,021            
Foreign currency translation 0            
Balance (in shares) at Jun. 30, 2019   121,377,614 14,384,746        
Balance at Jun. 30, 2019 4,296,860 $ 120 $ 16 4,794,177 3,303 (500,756)  
Balance (in shares) at Mar. 31, 2019   110,048,588 16,029,859        
Balance at Mar. 31, 2019 3,327,513 $ 109 $ 17 3,733,241 2,323 (408,177)  
Increase (Decrease) in Stockholders' Equity [Roll Forward]              
Net loss (92,579)         (92,579)  
Exercise of vested stock options (in shares)   313,924 503,797        
Exercise of vested stock options 9,927   $ 1 9,926      
Vesting of restricted stock units (in shares)   675,028 29,576        
Vesting of restricted stock units 1 $ 1          
Value of equity awards withheld for tax liability (in shares)   (5,934) (5,888)        
Value of equity awards withheld for tax liability (1,518)     (1,518)      
Conversion of shares of Class B common stock into shares of Class A common stock (in shares)   2,172,598 (2,172,598)        
Conversion of shares of Class B common stock into shares of Class A common stock   $ 2 $ (2)        
Shares issued in acquisition (in shares)             8,064,515
Shares issued in acquisition 980,000 $ 8   979,992      
Unrealized gain (loss) on marketable securities 980       980    
Foreign currency translation 0            
Shares issued under ESPP (in shares)   108,895          
Shares issued under ESPP 8,254     8,254      
Costs related to public offering (953)     (953)      
Equity awards assumed in acquisition (7,126)     (7,126)      
Stock-based compensation 72,361     72,361      
Balance (in shares) at Jun. 30, 2019   121,377,614 14,384,746        
Balance at Jun. 30, 2019 $ 4,296,860 $ 120 $ 16 $ 4,794,177 $ 3,303 $ (500,756)  
v3.19.2
Organization and Description of Business
6 Months Ended
Jun. 30, 2019
Organization, Consolidation and Presentation of Financial Statements [Abstract]  
Organization and Description of Business Organization and Description of Business
Twilio Inc. (the “Company”) was incorporated in the state of Delaware on March 13, 2008. The Company is the leader in the Cloud Communications Platform category and enables developers to build, scale and operate real-time communications within their software applications via simple-to-use Application Programming Interfaces (“API”). The power, flexibility, and reliability offered by the Company’s software building blocks empower entities of virtually every shape and size to build world-class engagement into their customer experience.
The Company’s headquarters are located in San Francisco, California, and the Company has subsidiaries in Australia, Bermuda, Colombia, Czech Republic, Estonia, France, Germany, Hong Kong, Ireland, Japan, the Netherlands, Singapore, Spain, Sweden, United Kingdom and the United States.
v3.19.2
Summary of Significant Accounting Policies
6 Months Ended
Jun. 30, 2019
Accounting Policies [Abstract]  
Summary of Significant Accounting Policies Summary of Significant Accounting Policies
(a)Basis of Presentation
The accompanying unaudited condensed consolidated financial statements have been prepared in accordance with generally accepted accounting principles in the United States of America (“U.S. GAAP”) and applicable rules and regulations of the Securities and Exchange Commission (“SEC”) regarding interim financial reporting. Certain information and note disclosures normally included in the financial statements prepared in accordance with U.S. GAAP have been condensed or omitted pursuant to such rules and regulations. Therefore, these condensed consolidated financial statements should be read in conjunction with the consolidated financial statements and notes included in our Annual Report on Form 10-K filed with the SEC on March 1, 2019 (“Annual Report”).
The condensed consolidated balance sheet as of December 31, 2018, included herein, was derived from the audited financial statements as of that date, but may not include all disclosures including certain notes required by U.S. GAAP on an annual reporting basis.
In the opinion of management, the accompanying unaudited condensed consolidated financial statements reflect all normal recurring adjustments necessary to present fairly the financial position, results of operations, comprehensive loss and cash flows for the interim periods, but are not necessarily indicative of the results of operations to be anticipated for the full year 2019 or any future period.
(b)Principles of Consolidation
The condensed consolidated financial statements include the Company and its wholly owned subsidiaries. All significant intercompany balances and transactions have been eliminated.
(c)Use of Estimates
The preparation of financial statements in conformity with U.S. GAAP requires management to make estimates and assumptions that affect the reported amounts of assets and liabilities and disclosure of contingent assets and liabilities at the date of the financial statements and the reported amounts of revenues and expenses during the reporting period. These estimates are used for, but not limited to, revenue allowances and returns; recoverability of long-lived and intangible assets; capitalization and useful life of the Company’s capitalized internal-use software development costs; fair value of acquired intangible assets and goodwill; accruals and contingencies. Estimates are based on historical experience and on various assumptions that the Company believes are reasonable under current circumstances. However, future events are subject to change and best estimates and judgments may require further adjustments; therefore, actual results could differ materially from those estimates. Management periodically evaluates such estimates and they are adjusted prospectively based upon such periodic evaluation.
(d)Concentration of Credit Risk
Financial instruments that potentially expose the Company to a concentration of credit risk consist primarily of cash, cash equivalents, marketable securities, restricted cash and accounts receivable. The Company maintains cash, cash equivalents, marketable securities and restricted cash with financial institutions that management believes are financially sound and have minimal credit risk exposure although the balances will exceed insured limits.
The Company sells its services to a wide variety of customers. If the financial condition or results of operations of any significant customers deteriorate substantially, operating results could be adversely affected. To reduce credit risk, management performs ongoing credit evaluations of the financial condition of significant customers. The Company does not require collateral from its credit customers and maintains reserves for estimated credit losses on customer accounts when considered necessary. Actual credit losses may differ from the Company’s estimates. During the three and six months ended June 30, 2019 and 2018, respectively, there was no customer organization that accounted for more than 10% of the Company’s total revenue.
As of June 30, 2019, and December 31, 2018, no customer organization represented more than 10% of the Company’s gross accounts receivable.
(e)Deferred Revenue and Customer Deposits

Deferred revenue is recorded when cash payments are received in advance of future usage on non-cancelable contracts. Customer refundable prepayments are recorded as customer deposits. During the three and six months ended June 30, 2019, the Company recognized $4.7 million and $15.4 million of revenue, respectively, and during the three and six months ended June 30, 2018, the Company recognized $3.6 million and $7.2 million of revenue, respectively, that was included in the deferred revenue and customer deposits balance as of the beginning of the year.
(f)Deferred Sales Commissions

The Company records an asset for the incremental costs of obtaining a contract with a customer, for example, sales commissions that are earned upon execution of contracts. The Company uses the portfolio of data method to determine the estimated period of benefit of capitalized commissions which is determined to be five years. Amortization expense related to these capitalized costs related to initial contracts, upsells and renewals, is recognized on a straight line basis over the estimated period of benefit of the capitalized commissions. Total net capitalized costs as of June 30, 2019, and December 31, 2018, were $17.5 million and $9.4 million, respectively, and are included in prepaid expenses and other current and long‑term assets in the accompanying condensed consolidated balance sheets. Amortization of these assets was $0.9 million and $1.6 million in the three and six months ended June 30, 2019, respectively, and $0.3 million and $0.5 million in the three and six months ended June 30, 2018, respectively, and is included in sales and marketing expense in the accompanying condensed consolidated statements of operations.
(g)     Recently Adopted Accounting Guidance

In February 2016, the Financial Accounting Standards Board (“FASB”) issued ASU 2016-02, "Leases (Topic 842)", which was further clarified in July 2018 by ASU 2018‑10, “Codification Improvements to Topic 842, Leases”, and ASU 2018‑11, “Leases-Targeted Improvements”. ASU 2018-10 provides narrow amendments to clarify how to apply certain aspects of the new lease standard. ASU 2018-11 addresses implementation issues related to the new lease standard. The standard is effective for interim and annual reporting periods beginning after December 15, 2018. Under the new standard, lessees are required to recognize in the balance sheet the right-of-use ("ROU") assets and lease liabilities that arise from operating leases. The Company adopted the standard using the optional alternative method on a prospective basis with an effective date as of the beginning of the Company’s fiscal year, January 1, 2019, and applied it to the operating leases that existed on that date. Prior year comparative financial information was not recast under the new standard and continues to be presented under ASC 840. The Company elected to utilize the package of practical expedients available for expired or existing contracts which allowed the Company to carryforward historical assessments of (a) whether contracts are or contain leases, (b) lease classification, and (c) initial direct costs. The Company elected the use of hindsight practical expedient in determining the lease term and assessing the likelihood that lease renewal, termination or purchase option will be exercised. The Company also elected to apply the short-term lease exception for all leases. Under the short-term lease exception, the Company will not recognize ROU assets or lease liabilities for leases that, at the acquisition date, have a remaining lease term of 12 months or less.

As a result of implementing this guidance, the Company recognized a $123.5 million net operating ROU asset and a $132.0 million operating lease liability in its condensed consolidated balance sheet as of January 1, 2019. The ROU asset was presented net of deferred rent of $9.0 million as of January 1, 2019, in the accompanying condensed consolidated balance sheet
and as a change within operating cash flows. In addition, on February 1, 2019, the Company acquired through its business combination with SendGrid approximately $33.7 million in operating ROU assets, $32.6 million in operating lease liability, $14.2 million in finance ROU assets and $13.6 million in finance lease liability.

The Company measured the lease liability at the present value of the future lease payments as of January 1, 2019. The Company used its incremental borrowing rate to discount the lease payments. The Company derived the discount rate, adjusted for differences in the term and payment patterns, from the information available at the adoption date. The right-of-use asset is valued at the amount of the lease liability adjusted for the remaining December 31, 2018, balance of unamortized lease incentives, prepaid rent and deferred rent. The lease liability is subsequently measured at the present value of unpaid future lease payments as of the reporting date with a corresponding adjustment to the right-of-use asset. Absent a lease modification, the Company will continue to utilize the January 1, 2019, incremental borrowing rate.

The Company recognizes lease costs on a straight-line basis and presents these costs as operating expenses within the consolidated statements of operations and comprehensive loss. The Company presents lease payments within the cash flows from operations within the consolidated statements of cash flows.

The financial results for the three and six months ended June 30, 2019, are presented under the new standard, while the comparative periods presented are not adjusted and continue to be reported in accordance with the Company’s historical accounting policy.
 
See Note 5, “Right-of-use Assets and Lease Liabilities” for further information.
 
In March 2019, the FASB issued ASU 2019-01, “Codification Improvements” to Leases (Topic 842). This pronouncement did not have a material impact on the Company's financial statements.

In August 2018, the FASB issued ASU 2018‑13, “Fair Value Measurement (Topic 820) Disclosure Framework-Changes to the Disclosure Requirements for Fair Value Measurement”. The amendments under ASU 2018‑13 remove, add and modify certain disclosure requirements on fair value measurements in ASC 820. The amendments are effective for interim and annual periods beginning after December 15, 2019. The Company early adopted this guidance effective April 1, 2019. The adoption of this guidance did not have a material impact on the Company’s consolidated financial statements.

In July 2018, the FASB issued ASU 2018-09, "Codification Improvements ", which does not prescribe any new accounting guidance, but instead makes minor improvements and clarifications of several topics. Certain updates are applicable immediately while others provide for a transition period to adopt as part of the next fiscal year beginning after December 15, 2018. The Company adopted this guidance effective April 1, 2019. The adoptions of this guidance did not have a material impact on the Company's consolidated financial statements.

In January 2017, the FASB issued ASU 2017‑04, “Simplifying the Test for Goodwill Impairment”, which removes the second step of the goodwill impairment test that requires a hypothetical purchase price allocation. A goodwill impairment will now be the amount by which a reporting unit’s carrying value exceeds its fair value, not to exceed the carrying amount of goodwill. This guidance is effective prospectively for interim and annual reporting periods beginning after December 15, 2019. The Company early adopted this guidance effective April 1, 2019. The adoption of this guidance did not have a material impact on the Company’s consolidated financial statements.

(h)    Recently Issued Accounting Guidance, Not yet Adopted
In August 2018, the FASB issued ASU 2018‑15, “Intangibles—Goodwill and Other—Internal‑Use Software (Subtopic 350‑40): Customer’s Accounting for Implementation Costs Incurred in a Cloud Computing Arrangement That is a Service Contract”. This standard aligns the requirements for capitalizing implementation costs incurred in a hosting arrangement that is a service contract with the requirements for capitalizing implementation costs incurred to develop or obtain internal‑use software. The standard is effective for interim and annual periods beginning after December 15, 2019, with early adoption permitted. The Company is currently evaluating the impact of the adoption of this standard on its consolidated financial statements.
In June 2016, the FASB issued ASU 2016‑13, “Financial Instruments—Credit Losses: Measurement of Credit Losses on Financial Instruments”, which changes the impairment model for most financial assets. The new model uses a forward‑looking expected loss method, which will generally result in earlier recognition of allowances for losses. In November 2018, the FASB issued ASU 2018‑19, “Codification Improvements to Topic 326, Financial Instruments—Credit
Losses”, which clarifies that receivables arising from operating leases are not within the scope of Topic 326, Financial Instruments—Credit Losses. Instead, impairment of receivables arising from operating leases should be accounted for in accordance with Topic 842, Leases. In April 2019, the FASB issued ASU 2019-04, "Codification  Improvements to Topic 326, Financial Instruments—Credit Losses, Topic 815, Derivatives and Hedging, and Topic 825, Financial Instruments," which clarifies treatment of certain credit losses. In May 2019, the FASB issued ASU 2019-05, "Financial Instruments — Credit Losses (Topic 326): Targeted Transition Relief", which permits an entity, upon adoption of ASU 2016-13, to irrevocably elect the fair value option (on an instrument-by-instrument basis) for eligible financial assets measured at amortized cost basis. These ASUs are effective for annual and interim periods beginning after December 15, 2019, and early adoption is permitted. The Company is evaluating the impact of this guidance on its consolidated financial statements
v3.19.2
Fair Value Measurements
6 Months Ended
Jun. 30, 2019
Fair Value Disclosures [Abstract]  
Fair Value Measurements Fair Value Measurements
The following tables provide the financial assets measured at fair value on a recurring basis as of June 30, 2019, and December 31, 2018, (in thousands):
 
 
Amortized
Cost or
Carrying
Value
 
Gross
Unrealized
Gains
 
Gross
Unrealized
Losses
Less Than
12 Months
 
Gross
Unrealized
Losses More
Than
12 Months
 
Fair Value Hierarchy as of
June 30, 2019
 
Aggregate
Fair Value
Level 1
 
Level 2
 
Level 3
Financial Assets:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Cash and cash equivalents:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Money market funds
 
$
275,838

 
$

 
$

 
$

 
$
275,838

 
$

 
$

 
$
275,838

Reverse repurchase agreements
 
75,000

 

 

 

 

 
75,000

 

 
75,000

Commercial paper
 
114,471

 

 

 

 
 
 
114,471

 
 
 
114,471

Total included in cash and cash equivalents
 
465,309

 

 

 

 
275,838

 
189,471

 

 
465,309

Marketable securities:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
U.S. Treasury securities
 
160,374

 
238

 
(1
)
 

 
160,611

 

 

 
160,611

Corporate debt securities and commercial paper
 
1,183,653

 
2,427

 
(309
)
 
(11
)
 
5,000

 
1,180,760

 

 
1,185,760

Total marketable securities
 
1,344,027

 
2,665

 
(310
)
 
(11
)
 
165,611

 
1,180,760

 

 
1,346,371

Strategic investment
 
5,000

 

 

 

 

 

 
5,000

 
5,000

Total financial assets
 
$
1,814,336

 
$
2,665

 
$
(310
)
 
$
(11
)
 
$
441,449

 
$
1,370,231

 
$
5,000

 
$
1,816,680



 
 
Amortized Cost or Carrying Value
 
Gross
Unrealized
Gains
 
Gross
Unrealized
Losses
Less Than
12 Months
 
Gross
Unrealized
Losses More
Than
12 Months
 
Fair Value Hierarchy as of
December 31, 2018
 
Aggregate
Fair Value
 
Level 1
 
Level 2
 
Level 3
Financial Assets:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Cash and cash equivalents:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Money market funds
 
$
420,234

 
$

 
$

 
$

 
$
420,234

 
$

 
$

 
$
420,234

Reverse repurchase agreements
 
35,000

 

 

 

 

 
35,000

 

 
35,000

Commercial paper
 
9,983

 

 

 

 

 
9,983

 

 
9,983

Total included in cash and cash equivalents
 
465,217

 

 

 

 
420,234

 
44,983

 

 
465,217

Marketable securities:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
U.S. Treasury securities
 
59,785

 

 
(7
)
 
(9
)
 
59,769

 

 

 
59,769

Corporate debt securities and commercial paper
 
201,683

 
23

 
(123
)
 
(224
)
 

 
201,359

 

 
201,359

Total marketable securities
 
261,468

 
23

 
(130
)
 
(233
)
 
59,769

 
201,359

 

 
261,128

Total financial assets
 
$
726,685

 
$
23

 
$
(130
)
 
$
(233
)
 
$
480,003

 
$
246,342

 
$

 
$
726,345


As the Company views its marketable securities as available to support current operations, it has classified all available for sale securities as short-term. As of June 30, 2019, and December 31, 2018, for fixed income securities that were in unrealized loss positions, the Company has determined that (i) it does not have the intent to sell any of these investments, and (ii) it is not more likely than not that it will be required to sell any of these investments before recovery of the entire amortized cost basis. In addition, as of June 30, 2019, and December 31, 2018, the Company anticipates that it will recover the entire amortized cost basis of such fixed income securities and has determined that no other-than-temporary impairments associated with credit losses were required to be recognized during the three and six months ended June 30, 2019 and 2018.
Interest earned on marketable securities was $2.6 million and $4.1 million in the three and six months ended June 30, 2019, respectively, and $0.7 million and $1.4 million in the three and six months ended June 30, 2018, respectively. The interest is recorded as other expense, net, in the accompanying condensed consolidated statements of operations.
The following table summarizes the contractual maturities of marketable securities as of June 30, 2019, and December 31, 2018, (in thousands):
 
As of June 30, 2019
 
As of December 31, 2018
 
Amortized
Cost
 
Aggregate
Fair Value
 
Amortized
Cost
 
Aggregate
Fair Value
Financial Assets:
 
 
 
 
 
 
 
Less than one year
$
687,642

 
$
688,388

 
$
261,468

 
$
261,128

One to two years
656,385

 
657,983

 

 

Total
$
1,344,027

 
$
1,346,371

 
$
261,468

 
$
261,128



The Company enters into reverse securities repurchase agreements, primarily for short-term investments with maturities of 90 days or less. As of June 30, 2019, and December 31, 2018, the Company was party to reverse repurchase agreements totaling $75.0 million and $35.0 million, respectively, which were reported in cash and equivalents in the accompanying condensed consolidated balance sheets. Under these reverse securities repurchase agreements, the Company typically lends available cash at a specified rate of interest and holds U.S. government securities as collateral during the term of the agreement. Collateral value is in excess of the amounts loaned under these agreements.
In May 2019, the Company made a strategic investment of $5.0 million into a privately held debt security in which the Company does not have a controlling interest or significant influence. The security and the bifurcated embedded derivatives are recorded at fair value in other long-term assets in the accompanying condensed consolidated balance sheet. Changes in fair value of the host contract will be recorded in the accumulated other comprehensive income in the Company's consolidated balance sheet, and changes in fair value of the bifurcated derivatives will be recorded in the consolidated statement of operations. The Company classifies its privately held debt security as a Level 3 investment within the fair value hierarchy based on the nature of the fair value inputs. No impairment was recognized for the three months ended June 30, 2019.
As of June 30, 2019, and December 31, 2018, the fair value of the 0.25% convertible senior notes due 2023 (the “Notes”), as further described in Note 9 below, was approximately $1,116.2 million and $743.4 million, respectively. The fair value of the Notes is determined based on the closing price on the last trading day of the reporting period and is classified as a Level 2 security within the fair value hierarchy.
As of June 30, 2019, the note payable assumed in the SendGrid acquisition, as further described in Note 9 below, is recorded at its carrying amount, which approximates its fair value based on the proximity of its effective interest rate to the current market rates. The note payable is classified as a Level 2 instrument within the fair value hierarchy.
v3.19.2
Property and Equipment
6 Months Ended
Jun. 30, 2019
Property, Plant and Equipment [Abstract]  
Property and Equipment Property and Equipment
Property and equipment consisted of the following (in thousands):
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Capitalized internal-use software development costs
 
$
85,145

 
$
72,647

Data center equipment (1)
 
14,795

 

Leasehold improvements
 
33,305

 
15,293

Office equipment
 
20,715

 
13,563

Furniture and fixtures (1)
 
7,273

 
4,918

Software
 
6,073

 
1,849

Total property and equipment
 
167,306

 
108,270

Less: accumulated depreciation and amortization
 
(60,826
)
 
(44,736
)
Total property and equipment, net
 
$
106,480

 
$
63,534

_______________
(1) 
Data center equipment and furniture and fixtures contain assets under finance leases. See Note 5 for further detail.
Depreciation and amortization expense was $9.1 million and $16.7 million for the three and six months ended June 30, 2019, respectively, and $4.3 million and $8.5 million for the three and six months ended June 30, 2018, respectively.
The Company capitalized $6.7 million and $13.7 million in internal-use software development costs in the three and six months ended June 30, 2019, respectively, and $6.7 million and $13.1 million in the three and six months ended June 30, 2018, respectively. Of this amount, stock-based compensation expense was $1.6 million and $3.2 million in the three and six months ended June 30, 2019, respectively, and $1.5 million and $2.9 million in the three and six months ended June 30, 2018, respectively.
Amortization of capitalized software development costs was $4.3 million and $8.1 million in the three and six months ended June 30, 2019, respectively, and $3.0 million and $5.7 million in the three and six months ended June 30, 2018, respectively.

v3.19.2
Right-of-Use Asset and Lease Liabilities
6 Months Ended
Jun. 30, 2019
Leases [Abstract]  
Right-of-Use Asset and Lease Liabilities Right-of-Use Asset and Lease Liabilities
The Company determines if an arrangement is a lease at inception. The Company presents the operating leases in long-term assets and current and long-term liabilities. Finance lease assets are included in property and equipment, net, and
finance lease liabilities are presented in current and long-term liabilities in the accompanying condensed consolidated balance sheet as of June 30, 2019.
Right-of-use ("ROU") assets represent the Company’s right to use an underlying asset for the lease term, and lease liabilities represent the Company’s obligation to make lease payments arising from the lease. Operating lease ROU assets and liabilities are recognized at commencement date based on the present value of lease payments over the lease term. As the Company’s leases do not generally provide an implicit rate, the Company uses its incremental borrowing rate based on the information available at commencement date in determining the present value of lease payments. The Company’s lease agreements may have lease and non-lease components, which the Company generally accounts for as a single lease component. The Company’s lease terms may include options to extend or terminate the lease when it is reasonably certain that the Company will exercise that option. Lease expense for lease payments is recognized on a straight-line basis over the lease term, and variable payments are recognized in the period they are incurred. The Company’s lease agreements do not contain any residual value guarantees. Leases with an initial term of 12 months or less are not recorded on the balance sheet.
The Company has entered into various operating lease agreements for data centers and office space, and various financing leases agreements for data center and office equipment and furniture.
As of June 30, 2019, the Company had 19 leased properties, with remaining lease terms of one year to 10 years, some of which include options to extend the leases for up to five years.
The components of lease expense recorded in the condensed consolidated statement of operations were as follows (in thousands):

 
Three Months Ended June 30, 2019
 
Six Months Ended June 30, 2019
Operating lease cost
 
$
8,273

 
$
15,446

Finance lease cost:
 

 
 
   Amortization of assets
 
1,526

 
2,689

   Interest on lease liabilities
 
189

 
337

Short-term lease cost
 
1,905

 
3,340

Variable lease cost
 
1,080

 
1,567

Total net lease cost
 
$
12,973

 
$
23,379


Supplemental balance sheet information related to leases was as follows (in thousands):
Leases
 
Classification
 
As of
June 30,
2019
Assets:
 

 

Operating lease assets
 
Operating right-of-use asset (a)
 
$
151,946

Finance lease assets
 
Property and equipment, net of accumulated depreciation (b)
 
12,970

Total leased assets
 

 
$
164,916


 

 
 
Liabilities:
 

 
 
Current
 

 
 
   Operating
 
Operating lease liability, current
 
$
21,858

   Finance
 
Financing lease liability, current
 
5,920

Noncurrent
 

 
 
   Operating
 
Operating lease liability, noncurrent
 
138,819

   Finance
 
Finance lease liability, noncurrent
 
7,752

Total lease liabilities
 

 
$
174,349

(a)
Operating lease assets are recorded net of accumulated amortization of $10.8 million as of June 30, 2019.
(b)
Finance lease assets are recorded net of accumulated depreciation of $2.7 million as of June 30, 2019.
Supplemental cash flow and other information related to leases was as follows (in thousands):

 
Six Months Ended June 30, 2019
Cash paid for amounts included in the measurement of lease liabilities:
 

Operating cash flows from operating leases
 
$
12,145

Operating cash flows from finance leases
 
$
337

Financing cash flows from finance leases
 
$
2,463


 

Weighted average remaining lease term (in years):
 

Operating leases
 
6.8

Finance leases
 
3.1


 

Weighted average discount rate:
 

Operating leases
 
5.8
%
Finance leases
 
5.2
%

Maturities of lease liabilities were as follows (in thousands):

 
As of June 30, 2019

 
Operating
Leases
 
Finance
Leases
2019 (remaining six months)
 
$
14,523

 
$
3,278

2020
 
30,523

 
6,015

2021
 
28,791

 
3,130

2022
 
28,249

 
807

2023
 
27,762

 
413

Thereafter
 
68,106

 
1,316

Total lease payments
 
197,954

 
14,959

Less: imputed interest
 
(37,277
)
 
(1,287
)
Total lease obligations
 
160,677

 
13,672

Less: current obligations
 
(21,858
)
 
(5,920
)
Long-term lease obligations
 
$
138,819

 
$
7,752


Disclosures related to periods prior to adoption of the New Lease Standard
Rent expense was $2.1 million and $4.2 million in the three and six months ended June 30, 2018, respectively.
As of June 30, 2019, the Company had an additional operating lease obligation of $1.8 million related to a lease that will commence during third quarter 2019 with a lease term of 2.0 years. The Company had additional operating and finance lease obligations of $43.6 million and $0.7 million, respectively, related to a lease that will commence during the second quarter of fiscal year 2020 with a lease term of 6.8 years.
Future minimum lease payment obligations under noncancelable operating and finance leases were as follows (in thousands):

 
As of December 31, 2018

 
Operating
Leases
 
Finance
Leases
2019
 
$
24,128

 
$
306

2020
 
29,527

 
512

2021
 
30,898

 
573

2022
 
30,492

 
590

2023
 
30,122

 
608

Thereafter
 
81,316

 
1,939

Total lease payments
 
$
226,483

 
$
4,528


Right-of-Use Asset and Lease Liabilities Right-of-Use Asset and Lease Liabilities
The Company determines if an arrangement is a lease at inception. The Company presents the operating leases in long-term assets and current and long-term liabilities. Finance lease assets are included in property and equipment, net, and
finance lease liabilities are presented in current and long-term liabilities in the accompanying condensed consolidated balance sheet as of June 30, 2019.
Right-of-use ("ROU") assets represent the Company’s right to use an underlying asset for the lease term, and lease liabilities represent the Company’s obligation to make lease payments arising from the lease. Operating lease ROU assets and liabilities are recognized at commencement date based on the present value of lease payments over the lease term. As the Company’s leases do not generally provide an implicit rate, the Company uses its incremental borrowing rate based on the information available at commencement date in determining the present value of lease payments. The Company’s lease agreements may have lease and non-lease components, which the Company generally accounts for as a single lease component. The Company’s lease terms may include options to extend or terminate the lease when it is reasonably certain that the Company will exercise that option. Lease expense for lease payments is recognized on a straight-line basis over the lease term, and variable payments are recognized in the period they are incurred. The Company’s lease agreements do not contain any residual value guarantees. Leases with an initial term of 12 months or less are not recorded on the balance sheet.
The Company has entered into various operating lease agreements for data centers and office space, and various financing leases agreements for data center and office equipment and furniture.
As of June 30, 2019, the Company had 19 leased properties, with remaining lease terms of one year to 10 years, some of which include options to extend the leases for up to five years.
The components of lease expense recorded in the condensed consolidated statement of operations were as follows (in thousands):

 
Three Months Ended June 30, 2019
 
Six Months Ended June 30, 2019
Operating lease cost
 
$
8,273

 
$
15,446

Finance lease cost:
 

 
 
   Amortization of assets
 
1,526

 
2,689

   Interest on lease liabilities
 
189

 
337

Short-term lease cost
 
1,905

 
3,340

Variable lease cost
 
1,080

 
1,567

Total net lease cost
 
$
12,973

 
$
23,379


Supplemental balance sheet information related to leases was as follows (in thousands):
Leases
 
Classification
 
As of
June 30,
2019
Assets:
 

 

Operating lease assets
 
Operating right-of-use asset (a)
 
$
151,946

Finance lease assets
 
Property and equipment, net of accumulated depreciation (b)
 
12,970

Total leased assets
 

 
$
164,916


 

 
 
Liabilities:
 

 
 
Current
 

 
 
   Operating
 
Operating lease liability, current
 
$
21,858

   Finance
 
Financing lease liability, current
 
5,920

Noncurrent
 

 
 
   Operating
 
Operating lease liability, noncurrent
 
138,819

   Finance
 
Finance lease liability, noncurrent
 
7,752

Total lease liabilities
 

 
$
174,349

(a)
Operating lease assets are recorded net of accumulated amortization of $10.8 million as of June 30, 2019.
(b)
Finance lease assets are recorded net of accumulated depreciation of $2.7 million as of June 30, 2019.
Supplemental cash flow and other information related to leases was as follows (in thousands):

 
Six Months Ended June 30, 2019
Cash paid for amounts included in the measurement of lease liabilities:
 

Operating cash flows from operating leases
 
$
12,145

Operating cash flows from finance leases
 
$
337

Financing cash flows from finance leases
 
$
2,463


 

Weighted average remaining lease term (in years):
 

Operating leases
 
6.8

Finance leases
 
3.1


 

Weighted average discount rate:
 

Operating leases
 
5.8
%
Finance leases
 
5.2
%

Maturities of lease liabilities were as follows (in thousands):

 
As of June 30, 2019

 
Operating
Leases
 
Finance
Leases
2019 (remaining six months)
 
$
14,523

 
$
3,278

2020
 
30,523

 
6,015

2021
 
28,791

 
3,130

2022
 
28,249

 
807

2023
 
27,762

 
413

Thereafter
 
68,106

 
1,316

Total lease payments
 
197,954

 
14,959

Less: imputed interest
 
(37,277
)
 
(1,287
)
Total lease obligations
 
160,677

 
13,672

Less: current obligations
 
(21,858
)
 
(5,920
)
Long-term lease obligations
 
$
138,819

 
$
7,752


Disclosures related to periods prior to adoption of the New Lease Standard
Rent expense was $2.1 million and $4.2 million in the three and six months ended June 30, 2018, respectively.
As of June 30, 2019, the Company had an additional operating lease obligation of $1.8 million related to a lease that will commence during third quarter 2019 with a lease term of 2.0 years. The Company had additional operating and finance lease obligations of $43.6 million and $0.7 million, respectively, related to a lease that will commence during the second quarter of fiscal year 2020 with a lease term of 6.8 years.
Future minimum lease payment obligations under noncancelable operating and finance leases were as follows (in thousands):

 
As of December 31, 2018

 
Operating
Leases
 
Finance
Leases
2019
 
$
24,128

 
$
306

2020
 
29,527

 
512

2021
 
30,898

 
573

2022
 
30,492

 
590

2023
 
30,122

 
608

Thereafter
 
81,316

 
1,939

Total lease payments
 
$
226,483

 
$
4,528


v3.19.2
Business Combinations
6 Months Ended
Jun. 30, 2019
Business Combinations [Abstract]  
Business Combinations Business Combinations
Fiscal 2019 Acquisitions
Capio, Inc.
In June 2019, the Company acquired all outstanding shares of Capio, Inc. ("Capio"), a developer and provider of an automatic speech recognition technology based in Sunnyvale, California, for a total purchase price of $14.4 million, paid in cash, of which $4.0 million was withheld by the Company for a period of 18 months and an additional $0.2 million was withheld for certain tax liabilities to be settled in the near term. These amounts are recorded in the long-term and short-term liabilities, respectively, in the accompanying condensed consolidated balance sheet as of June 30, 2019.

Additionally, the Company granted 43,556 restricted stock units of the Company's Class A common stock to former Capio stockholders that had a value of $5.9 million and are subject to vesting over a period of three years. The Company is recording stock-based compensation expense as the shares vest.

The acquisition was accounted for as a business combination and the total purchase price was allocated to the net tangible and intangible assets and liabilities based on their fair values on the acquisition date and the excess was recorded as goodwill. The acquired entity's results of operations have been included in the consolidated financial statements of the Company from the date of acquisition.

The following table presents the preliminary purchase price allocation recorded in the Company's condensed consolidated balance sheet as of June 30, 2019, (in thousands):
 
 
Total
Net tangible liabilities assumed
 
$
(542
)
Intangible assets (1)
 
7,610

Goodwill (2)
 
7,343

Total purchase price
 
$
14,411

_________________
(1) Identifiable finite-lived intangible assets were comprised of the following (in thousands):
 
 
Total
 
Estimated life
(in years)
Developed technology and software
 
$
6,390

 
6
Customer relationships
 
1,220

 
4
Total intangible assets acquired
 
$
7,610

 
 

(2) The goodwill is primarily attributable to the future cash flows to be realized from the acquired technology. The goodwill is not deductible for U.S. tax purposes.
The Company acquired a net deferred tax liability of $0.8 million in this business combination that is included in the long-term liabilities in the accompanying condensed consolidated balance sheet.
The estimated fair value of the intangible assets acquired was determined by the Company, and the Company considered and relied in part upon a valuation report of a third-party expert. The Company used an income approach to estimate the fair values of the identifiable intangible assets.
The Company incurred costs related to this acquisition of $0.8 million that were expensed as incurred and recorded in general and administrative expenses in the accompanying condensed consolidated statement of operation.
Pro forma results of operations for this acquisition are not presented as the financial impact to the Company's consolidated financial statements is immaterial.

SendGrid, Inc.
In February 2019, the Company acquired all outstanding shares of SendGrid, Inc. ("SendGrid"), the leading email API platform, by issuing 23.6 million shares of its Class A common stock with a total value of $2,658.9 million . The Company also assumed all of the outstanding stock options and restricted stock units of SendGrid as converted into stock options and restricted stock units, respectively, of the Company based on the conversion ratio provided in the Agreement and Plan of Merger and Reorganization, as amended (the "Merger Agreement").
The acquisition added additional products and services to the Company's offerings for its customers. With these additional products, the Company now offers an Email API and Marketing Campaigns product leveraging the Email API. The acquisition has also added new customers, new employees, technology and intellectual property assets.
The acquisition was accounted for as a business combination and the total purchase price was allocated to the net tangible and intangible assets and liabilities based on their fair values on the acquisition date and the excess was recorded as goodwill. The values assigned to the assets acquired and liabilities assumed are based on preliminary estimates of fair value available as of the date of this Quarterly Report on Form 10-Q and may be adjusted during the measurement period of up to 12 months from the date of acquisition as further information becomes available. In the three months ended June 30, 2019, the Company recorded a measurement period adjustment of $7.1 million to reduce its preliminary purchase price related to the value of the pre-combination services reflected in the assumed equity awards, and $7.0 million to reallocate value between the acquired intangible assets and goodwill. Both adjustments were recorded as a result of further refinement of the assumptions used in the process of valuation of these assets.
As of June 30, 2019, the primary areas that are still not finalized due to information that may become available and may result in further changes in the values assigned to various assets and liabilities include purchase consideration and purchase price, including related tax impact, and valuation of tangible and intangible assets.
The adjusted purchase price of $2,843.4 million reflects the $2,658.9 million fair value of 23.6 million shares of the Company's Class A common stock transferred as consideration for all outstanding shares of SendGrid, and the $184.5 million fair value of the pre-combination services of SendGrid employees reflected in the equity awards assumed by the Company on the acquisition date.
The fair value of the 23.6 million shares transferred as consideration was determined on the basis of the closing market price of the Company's Class A common stock on the acquisition date. The fair value of the equity awards was determined (a) for options, by using a Black-Scholes option pricing model with the applicable assumptions as of the acquisition date, and (b) for restricted stock units, by using the closing market price of the Company's Class A common stock on the acquisition date.
The unvested stock awards assumed on the acquisition date will continue to vest as the SendGrid employees provide services in the post acquisition period. The fair value of these awards will be recorded as share-based compensation expense over the respective vesting period of each award.
The purchase price components, as adjusted, are summarized in the following table (in thousands):
 
 
Total
Fair value of Class A common stock transferred
 
$
2,658,898

Fair value of the pre-combination service through equity awards
 
184,494

Total purchase price, as adjusted
 
$
2,843,392


The following table presents the preliminary purchase price allocation, as adjusted, recorded in the Company's condensed consolidated balance sheet as of June 30, 2019 (in thousands). The Company expects to continue to obtain information to assist it in determining the fair values of the net assets acquired on the acquisition date during the measurement period:
 
 
Total
Cash and cash equivalents
 
$
156,783

Accounts receivable and other current assets
 
11,636

Property and equipment, net
 
38,350

Operating right of use asset
 
33,742

Intangible assets
 
483,000

Other assets
 
1,664

Goodwill
 
2,238,070

Accounts payable and other liabilities
 
(11,115
)
Operating lease liability
 
(32,568
)
Financing lease liability
 
(13,616
)
Note payable
 
(5,387
)
Deferred tax liability
 
(57,167
)
Total purchase price
 
$
2,843,392

The Company acquired a net deferred tax liability of $57.2 million in this business combination that is included in long-term liabilities in the accompanying condensed consolidated balance sheet. This amount was offset by a release of a valuation allowance on deferred tax assets of $48.6 million.
Identifiable intangible assets are comprised of the following (in thousands):
 
 
Total
 
Estimated life
(in years)
Developed technology and software
 
$
294,000

 
7
Customer relationships
 
169,000

 
7
Trade names
 
20,000

 
5
Total intangible assets acquired
 
$
483,000

 
 

Developed technology consists of software products and domain knowledge around email delivery developed by SendGrid, which enables the delivery of email reliably and at scale. Customer relationships consists of contracts with platform users that purchase SendGrid’s products and services that carry distinct value. Trade names represent the Company’s right to the SendGrid trade names and associated design, as it exists as of the acquisition closing date.
The goodwill is primarily attributable to the future cash flows to be realized from the acquired platform technology, acquired intangibles, assembled workforce and operational synergies. Goodwill is not deductible for tax purposes.
The estimated fair value of the intangible assets acquired was determined by the Company, and the Company considered or relied in part upon a valuation report of a third‑party expert. The Company used an income approach to estimate the fair values of the developed technology, an incremental income approach to estimate the value of the customer relationships and a relief from royalty method to estimate the fair value of the trade name.

Net tangible assets were valued at their respective carrying amounts as of the acquisition date, as the Company believes that these amounts approximate their current fair values.
The acquired entity's results of operations were included in the Company's condensed consolidated financial statements from the date of acquisition, February 1, 2019. For the three and six months ended June 30, 2019, SendGrid contributed net operating revenue of $45.9 million and $74.5 million, respectively, which is reflected in the accompanying condensed consolidated statement of operations. Due to the integrated nature of the Company's operations, the Company believes that it is not practicable to separately identify earnings of SendGrid on a stand-alone basis.
During the three and six months ended June 30, 2019, the Company incurred costs related to this acquisition of $0.5 million and $12.9 million, respectively, that were expensed as incurred and recorded in general and administrative expenses in the accompanying condensed consolidated statement of operations.
The following pro forma condensed combined financial information gives effect to the acquisition of SendGrid as if it were consummated on January 1, 2018 (the beginning of the comparable prior reporting period), and includes pro forma adjustments related to the amortization of acquired intangible assets, share-based compensation expense and direct and incremental transaction costs reflected in the historical financial statements. Specifically, the following adjustments were made:     
For the three and six months ended June 30, 2019, the Company's and SendGrid's direct and incremental transaction costs of $0.5 million and $39.9 million, respectively, are excluded from pro forma condensed combined net loss.
For the three and six months ended June 30, 2018, the Company's direct and incremental transaction costs of $0.5 million and $12.9 million, respectively, are included in the pro forma condensed combined net loss.
In the three months ended June 30, 2019, the pro forma condensed combined net loss includes an increase to the valuation allowance of $0.6 million. In the six months ended June 30, 2019, the pro forma condensed combined net loss includes a reversal of the valuation allowance release of $48.6 million.
In the three and six months ended June 30, 2018, the pro forma condensed combined net loss includes a tax expense of $2.6 million and a tax benefit of $53.5 million, respectively, that would have resulted from the acquisition.
This data is presented for informational purposes only and is not intended to represent or be indicative of the results of operations that would have been reported had the acquisition occurred on January 1, 2018. It should not be taken as representative of future results of operations of the combined company.
The following table presents the pro forma condensed combined financial information (in thousands):
 
 
Three Months Ended June 30,
 
Six Months Ended June 30,
 
 
2019
 
2018
 
2019
 
2018
Revenue
 
$
275,039

 
$
183,429

 
$
521,924

 
$
345,114

Net loss attributable to common stockholders
 
$
(82,880
)
 
$
(53,858
)
 
$
(155,840
)
 
$
(73,339
)


v3.19.2
Goodwill and Intangible Assets
6 Months Ended
Jun. 30, 2019
Goodwill and Intangible Assets Disclosure [Abstract]  
Goodwill and intangible assets Goodwill and Intangible Assets
Goodwill
Goodwill balance as of June 30, 2019, and December 31, 2018, was as follows (in thousands):
 
 
Total
Balance as of December 31, 2018
 
$
38,165

Goodwill additions related to 2019 acquisitions
 
2,246,398

Measurement period adjustments
 
(985
)
Balance as of June 30, 2019
 
$
2,283,578



Intangible assets
Intangible assets consisted of the following (in thousands):
 
 
As of
June 30, 2019
 
 
Gross
 
Accumulated
Amortization
 
Net
Amortizable intangible assets:
 
 
 
 
 
 
Developed technology
 
$
328,598

 
$
(30,581
)
 
$
298,017

Customer relationships
 
178,374

 
(13,280
)
 
165,094

Supplier relationships
 
2,696

 
(1,240
)
 
1,456

Trade names
 
20,060

 
(1,727
)
 
18,333

Patent
 
2,439

 
(224
)
 
2,215

Total amortizable intangible assets
 
532,167

 
(47,052
)
 
485,115

Non-amortizable intangible assets:
 
 
 
 
 
 
Domain names
 
32

 

 
32

Trademarks
 
263

 

 
263

Total
 
$
532,462

 
$
(47,052
)
 
$
485,410


 
 
As of
December 31, 2018
 
 
Gross
 
Accumulated
Amortization
 
Net
Amortizable intangible assets:
 
 
 
 
 
 
Developed technology
 
$
28,209

 
$
(10,497
)
 
$
17,712

Customer relationships
 
8,153

 
(2,411
)
 
5,742

Supplier relationships
 
2,696

 
(973
)
 
1,723

Trade name
 
60

 
(60
)
 

Patent
 
2,264

 
(178
)
 
2,086

Total amortizable intangible assets
 
41,382

 
(14,119
)
 
27,263

Non-amortizable intangible assets:
 
 
 
 
 
 
Domain names
 
32

 

 
32

Trademarks
 
263

 

 
263

Total
 
$
41,677

 
$
(14,119
)
 
$
27,558


Amortization expense was $19.3 million and $32.9 million for the three and six months ended June 30, 2019, respectively, and $1.4 million and $2.8 million for the three and six months ended June 30, 2018, respectively.
Total estimated future amortization expense was as follows (in thousands):
 
 
As of
June 30,
2019
2019 (remaining six months)
 
$
39,878

2020
 
77,882

2021
 
76,371

2022
 
74,976

2023
 
72,786

Thereafter
 
143,222

Total
 
$
485,115


v3.19.2
Accrued Expenses and Other Liabilities
6 Months Ended
Jun. 30, 2019
Accrued Liabilities and Other Liabilities [Abstract]  
Accrued Expenses and Other Liabilities Accrued Expenses and Other Liabilities
Accrued expenses and other current liabilities consisted of the following (in thousands):
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Accrued payroll and related
 
$
15,717

 
$
9,886

Accrued bonus and commission
 
8,974

 
8,564

Accrued cost of revenue
 
34,523

 
29,901

Sales and other taxes payable
 
27,499

 
23,631

ESPP contributions
 
4,004

 
2,672

Deferred rent
 

 
1,418

VAT liability
 
2,528

 
2,217

Acquisition holdback
 
2,240

 

Accrued other expense
 
22,140

 
18,054

Total accrued expenses and other current liabilities
 
$
117,625

 
$
96,343


Other long-term liabilities consisted of the following (in thousands):
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Deferred rent
 
$

 
$
7,569

Deferred tax liability
 
9,077

 
5,181

Acquisition holdback
 
4,280

 
2,290

Capital lease obligation
 

 
2,170

Accrued other expense
 
2,122

 
959

Total other long-term liabilities
 
$
15,479

 
$
18,169


v3.19.2
Notes Payable
6 Months Ended
Jun. 30, 2019
Long-term Debt, Unclassified [Abstract]  
Notes Payable Notes Payable
(a) Convertible Senior Notes and Capped Call Transactions
In May 2018, the Company issued $550.0 million aggregate principal amount of 0.25% convertible senior notes due 2023 in a private placement, including $75.0 million aggregate principal amount of such Notes pursuant to the exercise in full of the over-allotment options of the initial purchasers (collectively, the “Notes”). The interest on the Notes is payable semi-annually in arrears on June 1 and December 1 of each year, beginning on December 1, 2018.
The Notes may bear special interest under specified circumstances relating to the Company’s failure to comply with its reporting obligations under the indenture relating to the issuance of Notes (the “indenture”) or if the Notes are not freely tradeable as required by the indenture. The Notes will mature on June 1, 2023, unless earlier repurchased or redeemed by the Company or converted pursuant to their terms. The total net proceeds from the debt offering, after deducting initial purchaser discounts and debt issuance costs, paid or payable by us, were approximately $537.0 million.
Each $1,000 principal amount of the Notes is initially convertible into 14.1040 shares of the Company’s Class A common stock par value $0.001, which is equivalent to an initial conversion price of approximately $70.90 per share. The conversion rate is subject to adjustment upon the occurrence of certain specified events but will not be adjusted for any accrued and unpaid special interest. In addition, upon the occurrence of a make-whole fundamental change, as defined in the indenture, the Company will, in certain circumstances, increase the conversion rate by a number of additional shares for a holder that elects to convert its Notes in connection with such make-whole fundamental change or during the relevant redemption period.
Prior to the close of business on the business day immediately preceding March 1, 2023, the Notes may be convertible at the option of the holders only under the following circumstances:
(1) during any calendar quarter commencing after September 30, 2018, and only during such calendar quarter, if the last reported sale price of the Class A common stock for at least 20 trading days (whether or not consecutive) in a
period of 30 consecutive trading days ending on, and including, the last trading day of the immediately preceding calendar quarter is more than or equal to 130% of the conversion price on each applicable trading day;
(2) during the five business days period after any five consecutive trading day period in which, for each trading day of that period, the trading price per $1,000 principal amount of Notes for such trading day was less than 98% of the product of the last reported sale price of the Class A common stock and the conversion rate on each such trading day;
(3) upon the Company’s notice that it is redeeming any or all of the Notes; or
(4) upon the occurrence of specified corporate events.
On or after March 1, 2023, until the close of business on the second scheduled trading day immediately preceding the maturity date, holders of the Notes may, at their option, convert all or a portion of their Notes regardless of the foregoing conditions.
Upon conversion, the Company will pay or deliver, as the case may be, cash, shares of Class A common stock, or a combination of cash and shares of Class A Common Stock, at the Company’s election.  It is the Company’s current intent to settle the principal amount of the Notes with cash.
During the three months ended June 30, 2019, the conditional conversion feature of the Notes was triggered as the last reported sale price of the Company's Class A common stock was more than or equal to 130% of the conversion price for at least 20 trading days (whether or not consecutive) in the period of 30 consecutive trading days ending on June 28, 2019 (the last trading day of the calendar quarter), and therefore the Notes are currently convertible, in whole or in part, at the option of the holders between July 1, 2019 through September 30, 2019. Whether the Notes will be convertible following such period will depend on the continued satisfaction of this condition or another conversion condition in the future. The Company may redeem the Notes, in whole or in part, at its option, on or after June 1, 2021 but before the 35th scheduled trading day before the maturity date, at a cash redemption price equal to 100% of the principal amount of the Notes to be redeemed, plus accrued and unpaid interest, if any, if the last reported sale price of the Class A Common Stock has been at least 130% of the conversion price then in effect for at least 20 trading days (whether or not consecutive) during any 30 consecutive trading days ending on, and including, the trading day immediately before the date the redemption notices were sent; and the trading day immediately before such notices were sent.
No sinking fund is provided for the Notes. Upon the occurrence of a fundamental change (as defined in the indenture) prior to the maturity date, holders may require the Company to repurchase all or a portion of the Notes for cash at a price equal to 100% of the principal amount of the Notes to be repurchased, plus any accrued and unpaid interest to, but excluding, the fundamental change repurchase date.
The Notes are senior unsecured obligations and will rank senior in right of payment to any of the Company’s indebtedness that is expressly subordinated in right of payment to the Notes; equal in right of payment with the Company’s existing and future liabilities that are not so subordinated; effectively subordinated to any of the Company’s secured indebtedness to the extent of the value of the assets securing such indebtedness; and structurally junior to all indebtedness and other liabilities (including trade payables) of current or future subsidiaries of the Company.
The foregoing description is qualified in its entirety by reference to the text of the indenture and the form of 0.25% convertible senior notes due 2023, which were filed as exhibits to the Company's Quarterly Report on Form 10-Q for the quarter ended June 30, 2018 and are incorporated herein by reference.
In accounting for the issuance of the Notes, the Company separated the Notes into liability and equity components.  The carrying amount of the liability component was calculated by measuring the fair value of a similar debt instrument that does not have an associated convertible feature. The carrying amount of the equity component representing the conversion option was $119.4 million and was determined by deducting the fair value of the liability component from the par value of the Notes. The equity component is not remeasured as long as it continues to meet the conditions for equity classification. The excess of the principal amount of the liability component over its carrying amount, or the debt discount, is amortized to interest expense at an annual effective interest rate of 5.7% over the contractual terms of the Notes.
In accounting for the transaction costs related to the Notes, the Company allocated the total amount incurred to the liability and equity components of the Notes based on the proportion of the proceeds allocated to the debt and equity components. Issuance costs attributable to the liability component were approximately $10.2 million, were recorded as an
additional debt discount and are amortized to interest expense using the effective interest method over the contractual terms of the Notes. Issuance costs attributable to the equity component were netted with the equity component in stockholders’ equity.
The net carrying amount of the liability component of the Notes was as follows (in thousands):
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Principal
 
$
550,000

 
$
550,000

Unamortized discount
 
(95,719
)
 
(106,484
)
Unamortized issuance costs
 
(8,104
)
 
(9,020
)
Net carrying amount
 
$
446,177

 
$
434,496

The net carrying amount of the equity component of the Notes was as follows (in thousands):
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Proceeds allocated to the conversion options (debt discount)
 
$
119,435

 
$
119,435

Issuance costs
 
(2,819
)
 
(2,819
)
Net carrying amount
 
$
116,616

 
$
116,616


The following table sets forth the interest expense recognized related to the Notes (in thousands):
 
 
Three Months Ended
June 30,
 
Six Months Ended
June 30,
 
 
2019
 
2018
 
2019
 
2018
Contractual interest expense
 
$
344

 
$
164

 
$
688

 
$
164

Amortization of debt issuance costs
 
458

 
211

 
916

 
211

Amortization of debt discount
 
5,383

 
2,484

 
10,766

 
2,484

Total interest expense related to the Notes
 
$
6,185

 
$
2,859

 
$
12,370

 
$
2,859


In connection with the offering of the Notes, the Company entered into privately-negotiated capped call transactions with certain counterparties (the “capped calls”). The capped calls each have an initial strike price of approximately $70.90 per share, subject to certain adjustments, which corresponds to the initial conversion price of the Notes. The capped calls have initial cap prices of $105.04 per share, subject to certain adjustments. The capped calls cover, subject to anti-dilution adjustments, approximately 7,757,200 shares of Class A Common Stock. The capped calls are generally intended to reduce or offset the potential dilution to the Class A Common Stock upon any conversion of the Notes with such reduction or offset, as the case may be, subject to a cap based on the cap price. The capped calls expire on the earlier of (i) the last day on which any convertible securities remain outstanding and (ii) June 1, 2023, subject to earlier exercise. The capped calls are subject to either adjustment or termination upon the occurrence of specified extraordinary events affecting the Company, including a merger event, a tender offer, and a nationalization, insolvency or delisting involving the Company. In addition, the capped calls are subject to certain specified additional disruption events that may give rise to a termination of the capped calls, including changes in law, insolvency filings, and hedging disruptions. The capped call transactions are recorded in stockholders’ equity and are not accounted for as derivatives. The net cost of $58.5 million incurred to purchase the capped call transactions was recorded as a reduction to additional paid-in capital in the accompanying condensed consolidated balance sheet.
(b) Note Payable
In connection with the SendGrid acquisition, the Company assumed a note payable that was an arrangement of SendGrid with a financing company to acquire software and related professional services in exchange for a note payable. As of June 30, 2019, the outstanding balance on the note payable was $4.4 million and is recorded in the current and long term liabilities and the related software is included in property and equipment, net, in the accompanying condensed consolidated balance sheet. The note payable bears effective interest at 6.6% per annum compounded monthly and matures in August 2021. Principal and interest payments of are as follows:
Year Ending December 31:
 
Principal
 
Interest
2019 (remaining six months)
 
$
1,036

 
$
129

2020
 
2,176

 
153

2021
 
1,144

 
22

Total payments related to the note
 
$
4,356

 
$
304


v3.19.2
Supplemental Balance Sheet Information
6 Months Ended
Jun. 30, 2019
Receivables [Abstract]  
Supplemental Balance Sheet Information Supplemental Balance Sheet Information
A roll‑forward of the Company’s reserves is as follows (in thousands):
(a)Allowance for doubtful accounts:
 
 
Three Months Ended
June 30,
 
Six Months Ended
June 30,
 
 
2019
 
2018
 
2019
 
2018
Balance, beginning of period
 
$
4,281

 
$
1,404

 
$
4,945

 
$
1,033

Additions
 
685

 
1,140

 
381

 
1,515

Assumed in acquisition
 

 

 
59

 

Write-offs
 
(193
)
 
(8
)
 
(612
)
 
(12
)
Balance, end of period
 
$
4,773

 
$
2,536

 
$
4,773

 
$
2,536


(b)Sales credit reserve:
 
 
Three Months Ended
June 30,
 
Six Months Ended
June 30,
 
 
2019
 
2018
 
2019
 
2018
Balance, beginning of period
 
$
2,831

 
$
1,702

 
$
3,015

 
$
1,761

Additions
 
2,862

 
1,544

 
5,266

 
2,651

Assumed in acquisition
 

 

 
277

 

Deductions against reserve
 
(2,617
)
 
(621
)
 
(5,482
)
 
(1,787
)
Balance, end of period
 
$
3,076

 
$
2,625

 
$
3,076

 
$
2,625


v3.19.2
Revenue by Geographic Area
6 Months Ended
Jun. 30, 2019
Revenue from Contract with Customer [Abstract]  
Revenue by Geographic Area Revenue by Geographic Area
Revenue by geographic area is based on the IP address or the mailing address at the time of registration. The following table sets forth revenue by geographic area (in thousands):
 
 
Three Months Ended
June 30,
 
Six Months Ended
June 30,
 
 
2019
 
2018
 
2019
 
2018
Revenue by geographic area:
 
 
 
 
 
 

 
 

United States
 
$
194,998

 
$
111,244

 
$
361,551

 
$
209,879

International
 
80,041

 
36,510

 
146,627

 
66,991

Total
 
$
275,039

 
$
147,754

 
$
508,178

 
$
276,870

Percentage of revenue by geographic area:
 
 
 
 
 
 

 
 

United States
 
71
%
 
75
%
 
71
%
 
76
%
International
 
29
%
 
25
%
 
29
%
 
24
%

Long-lived assets outside the United States were not significant.
v3.19.2
Commitments and Contingencies
6 Months Ended
Jun. 30, 2019
Commitments and Contingencies Disclosure [Abstract]  
Commitments and Contingencies Commitments and Contingencies
(a)Lease and Other Commitments
The Company entered into various non-cancelable operating lease agreements for its facilities that expire over the next 10 years. See Note 5 to these condensed consolidated financial statements for additional detail on the Company's operating and finance lease commitments.
In the three and six months ended June 30, 2019, the Company entered into several non-cancelable vendor agreements with terms from one to four years for a total purchase commitment of $9.7 million and $11.1 million, respectively. Additionally, as a result of its acquisition of SendGrid, the Company assumed a non-cancelable cloud services vendor contract that as of June 30, 2019, had a remaining value of $21.8 million and a remaining term of 2.9 years.
(b)Legal Matters
On April 30, 2015 and March 28, 2016, Telesign Corporation ("Telesign") filed lawsuits (which were subsequently consolidated) against the Company in the United States District Court, Central District of California (“Telesign I/II”). Telesign alleges in Telesign I/II that the Company is infringing four U.S. patents that it holds: U.S. Patent No. 7,945,034 (“034”), U.S. Patent No. 8,462,920 (“920”), U.S. Patent No. 8,687,038 (“038”) and U.S. Patent No. 9,300,792 (“792”). The consolidated Telesign I/II actions have been transferred to the United States District Court, Northern District. The patent infringement allegations in the lawsuit relate to the Company’s two-factor authentication use case, Authy and an API tool to find information about a phone number. Telesign seeks, among other things, to enjoin us from allegedly infringing the patents, along with damages for lost profits and damages based on a reasonable royalty.
On March 8, 2017, in response to a petition by the Company, the U.S. Patent and Trademark Officer (“PTO”) issued an order instituting an inter partes review for the ‘792 patent. On March 6, 2018, the PTO found all claims challenged by the Company in the inter partes review unpatentable. Telesign did not appeal the PTO’s decision, and it is final. On October 19, 2018, the district court granted the Company's motion that all remaining asserted claims of the asserted patents are invalid under 35 U.S.C. §101 and entered judgment in the Company’s favor.  On November 8, 2018, Telesign appealed the judgment to the United States Court of Appeals for the Federal Circuit where the case is now pending. Based on, among other things, final judgment being entered by the district court in the Company’s favor, the Company does not believe a loss is reasonably possible or estimable.
On December 1, 2016, the Company filed a patent infringement lawsuit against Telesign in the United States District Court, Northern District of California (“Telesign III”), alleging infringement of United States Patent No. 8,306,021 (“021”), United States Patent No. 8,837,465 (“465”), United States Patent No. 8,755,376 (“376”), United States Patent No. 8,736,051 (“051”), United States Patent No. 8,737,962 (“962”), United States Patent No. 9,270,833 (“833”), and United States Patent No. 9,226,217 (“217”). Telesign filed a motion to dismiss the complaint on January 25, 2017. In two orders, issued on March 31, 2017 and April 17, 2017, the court granted Telesign’s motion to dismiss with respect to the ‘962, ‘833, ‘051 and ‘217 patents, but denied Telesign’s motion to dismiss as to the ‘021, ‘465 and ‘376 patents. On August 23, 2017, Telesign petitioned the PTO for inter partes review of the ‘021, ‘465, and ‘376 patents. On March 9, 2018, the PTO denied Telesign’s petition for inter partes review of the ‘021 patent and granted Telesign’s petitions for inter partes review of the ‘465 and ‘376 patents. On March 6, 2019, the PTO found all claims challenged by Telesign in the inter partes review unpatentable. The Company has appealed the decisions to the United States Court of Appeals for the Federal Circuit. Telesign III is currently stayed pending resolution of the inter partes reviews (and appeals from them) of the ‘465 and ‘376 patents. The Company is seeking a judgment of infringement, a judgment of willful infringement, monetary and injunctive relief, enhanced damages, and an award of costs and expenses against Telesign.
On February 18, 2016, a putative class action complaint was filed in the Alameda County Superior Court in California, entitled Angela Flowers v. Twilio Inc. The complaint alleges that the Company’s products permit the interception, recording and disclosure of communications at a customer’s request and are in violation of the California Invasion of Privacy Act. The complaint seeks injunctive relief as well as monetary damages. On January 2, 2018, the court issued an order granting in part and denying in part the plaintiff’s class certification motion. The court certified two classes of individuals who, during specified time periods, allegedly sent or received certain communications involving the accounts of three of the Company’s customers that were recorded. Following mediation, on January 7, 2019, the parties signed a long form settlement agreement, providing for a payment of $10.0 million into a common fund and injunctive relief involving certain updates to Twilio’s Acceptable Use Policy and customer documentation. On January 15, 2019, the court entered an order granting preliminary approval of the settlement, and the parties signed an amended settlement agreement to conform to the court’s order. The court entered a final order and judgment approving the settlement on June 17, 2019. A final compliance hearing has been scheduled for February 25,
2020. Given insurance coverage, the Company continues to estimate its potential liability in the Flowers matter to be $1.7 million and carries this reserved amount in its condensed consolidated balance sheet as of June 30, 2019.
On September 1, 2015, Twilio was named as a defendant in a First Amended Complaint in a putative class action captioned Jeremy Bauman v. David Saxe, et al. pending in the United States District Court, District of Nevada relating to the alleged sending of unsolicited text messages to the plaintiffs and putative class members. The Company filed a motion to dismiss, which was granted, and on September 20, 2016 the plaintiff filed a Second Amended Complaint with additional allegations that the Company violated the Telephone Consumer Protection Act (“TCPA”), and the Nevada Deceptive Trade Practices Act (“NDTPA”), NRS 41.600(2)(e). On January 10, 2019, the court granted Plaintiffs’ motion for class certification under the TCPA and denied plaintiff’s request to certify a class under the NDTPA. On February 13, 2019, the court issued an order denying the Company’s motion to dismiss as to Plaintiffs’ TCPA claim and granting dismissal as to Plaintiffs’ NDTPA claim. On February 22, 2019, the court stayed the case and directed all parties to mediation, which was conducted on May 15, 2019. On May 17, 2019, the original defendants (the “Saxe Defendants”) and the Company entered an agreement, which among other things, obligates the Saxe Defendants to fully fund all monetary and non-monetary aspects of the settlement of the matter and to obtain the dismissal of the plaintiffs’ and the class’s claims against the Company with prejudice. On May 22, 2019 the plaintiffs and the Saxe Defendants filed a motion to stay the case noting that they had reached agreement on the material terms of a settlement and needed additional time to draft a settlement agreement for submission to the court for review and approval. The Company did not oppose that motion. Plaintiffs and the Saxe Defendants continue to negotiate an agreement for submittal to the court. Based on, among other things, the Company’s agreement with the Saxe Defendants, the Company does not believe a loss is reasonably possible or estimable.
In addition to the litigation discussed above, from time to time, the Company may be subject to legal actions and claims in the ordinary course of business. The Company has received, and may in the future continue to receive, claims from third parties asserting, among other things, infringement of their intellectual property rights. Future litigation may be necessary to defend itself, its partners and its customers by determining the scope, enforceability and validity of third‑party proprietary rights, or to establish its proprietary rights. The results of any current or future litigation cannot be predicted with certainty, and regardless of the outcome, litigation can have an adverse impact on the Company because of defense and settlement costs, diversion of management resources, and other factors.
Legal fees and other costs related to litigation and other legal proceedings are expensed as incurred and are included in general and administrative expenses in the accompanying condensed consolidated statements of operations.
(c)Indemnification Agreements
The Company has signed indemnification agreements with all of its board members and executive officers. The agreements indemnify the board members and executive officers from claims and expenses on actions brought against the individuals separately or jointly with the Company for certain indemnifiable events. Indemnifiable Events generally mean any event or occurrence related to the fact that the board member or the executive officer was or is acting in his or her capacity as a board member or an executive officer for the Company or was or is acting or representing the interests of the Company.
In the ordinary course of business and in connection with our financing and business combinations transactions, the Company enters into contractual arrangements under which it agrees to provide indemnification of varying scope and terms to business partners, customers and other parties with respect to certain matters, including, but not limited to, losses arising out of the breach of such agreements, intellectual property infringement claims made by third parties and other liabilities relating to or arising from the Company’s various products, or its acts or omissions. In these circumstances, payment may be conditional on the other party making a claim pursuant to the procedures specified in the particular contract. Further, the Company’s obligations under these agreements may be limited in terms of time and/or amount, and in some instances, the Company may have recourse against third parties for certain payments. The terms of such obligations may vary.
As of June 30, 2019 and December 31, 2018, no material amounts were accrued.
(d)Other Taxes
The Company conducts operations in many tax jurisdictions throughout the United States. In many of these jurisdictions, non-income-based taxes, such as sales and use and telecommunications taxes are assessed on the Company’s operations. Prior to March 2017, the Company had not billed nor collected these taxes from its customers and, in accordance with U.S. GAAP, recorded a provision for its tax exposure in these jurisdictions when it was both probable that a liability had been incurred and the amount of the exposure could be reasonably estimated. These estimates included several key assumptions
including, but not limited to, the taxability of the Company’s services, the jurisdictions in which its management believes it has nexus, and the sourcing of revenues to those jurisdictions. Starting in March 2017, the Company began collecting these taxes from customers in certain jurisdictions, and since then, has expanded the number of jurisdictions where these taxes are being collected. Effective January 2018, the Company began to collect taxes in one additional jurisdiction and accordingly, from January 2018, the Company is not recording an additional provision for its exposure for new activities in that jurisdiction. The Company expects to continue to expand the number of jurisdictions where these taxes will be collected in the future. Simultaneously, the Company was and continues to be in discussions with certain states regarding its prior state sales and other taxes, if any, that the Company may owe.
As of June 30, 2019 and December 31, 2018, the liability recorded for these taxes was $26.1 million and $22.6 million, respectively.
In the event other jurisdictions challenge management’s assumptions and analysis, the actual exposure could differ materially from the current estimates.
v3.19.2
Stockholders' Equity
6 Months Ended
Jun. 30, 2019
Stockholders' Equity Note [Abstract]  
Stockholders' Equity Stockholders’ Equity
(a)Preferred Stock
As of June 30, 2019 and December 31, 2018 , the Company had authorized 100,000,000 shares of preferred stock, par value $0.001, of which no shares were issued and outstanding.
(b)Common Stock
As of June 30, 2019 and December 31, 2018, the Company had authorized 1,000,000,000 shares of Class A common stock and 100,000,000 shares of Class B common stock, each par value $0.001 per share. As of June 30, 2019 and December 31, 2018, 121,377,614 shares and 80,769,763 shares of Class A common stock and 14,384,746 shares and 19,310,465 shares of Class B common stock, respectively, were issued and outstanding. Holders of Class A and Class B common stock are entitled to one vote per share and 10 votes per share, respectively, and the shares of Class A common stock and Class B common stock are identical, except for voting and conversion rights.
The Company had reserved shares of common stock for issuance as follows:
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Stock options issued and outstanding
 
9,125,950

 
7,978,369

Nonvested restricted stock units issued and outstanding
 
8,926,529

 
8,262,902

Class A common stock reserved for Twilio.org
 
776,334

 
572,676

Stock-based awards available for grant under 2016 Plan
 
15,727,925

 
9,313,354

Stock-based awards available for grant under 2016 ESPP
 
3,984,686

 
3,092,779

Class A common stock reserved for the convertible senior notes
 
10,472,165

 
10,472,165

Total
 
49,013,589

 
39,692,245



(c)     Public Equity Offering
In June 2019, the Company completed a public equity offering in which the Company sold 8,064,515 shares of its Class A common stock, which included 1,051,893 shares sold pursuant to the exercise by the underwriters of an option to purchase additional shares, at a public offering price of $124.00 per share. The Company received aggregate proceeds of $979.0 million after deducting underwriting discounts and offering expenses paid and payable by the Company.
v3.19.2
Stock-Based Compensation
6 Months Ended
Jun. 30, 2019
Share-based Payment Arrangement [Abstract]  
Stock-Based Compensation Stock-Based Compensation 
2008 Stock Option Plan
The Company maintained a stock plan, the 2008 Stock Option Plan, as amended and restated (the “2008 Plan”), which allowed the Company to grant incentive (“ISO”), non‑statutory (“NSO”) stock options and restricted stock units (“RSU”) to its employees, directors and consultants to participate in the Company’s future performance through stock‑based awards at the discretion of the board of directors. Under the 2008 Plan, options to purchase the Company’s common stock could not be granted at a price less than fair value in the case of ISOs and NSOs. Fair value was determined by the board of directors, in good faith, with input from valuation consultants. On June 22, 2016, the plan was terminated in connection with the Company’s IPO. Accordingly, no shares are available for future issuance under the 2008 Plan. The 2008 Plan continues to govern outstanding equity awards granted thereunder. The Company’s right of first refusal for outstanding equity awards granted under the 2008 Plan terminated upon completion of the IPO. Options granted include provisions for early exercisability.
2016 Stock Option Plan
The Company’s 2016 Stock Option and Incentive Plan (the “2016 Plan”) became effective on June 21, 2016. The 2016 Plan provides for the grant of ISOs, NSOs, restricted stock, RSUs, stock appreciation rights, unrestricted stock awards, performance share awards, dividend equivalent rights and cash-based awards to employees, directors and consultants of the Company. A total of 11,500,000 shares of the Company’s Class A common stock were initially reserved for issuance under the 2016 Plan. These available shares automatically increase each January 1, beginning on January 1, 2017, by 5% of the number of shares of the Company’s Class A and Class B common stock outstanding on the immediately preceding December 31, or such lesser number of shares as determined by the Company’s compensation committee. On January 1, 2019 and 2018, the shares available for grant under the 2016 Plan were automatically increased by 5,004,011 shares and 4,698,490 shares, respectively.
Under the 2016 Plan, the stock options are granted at a price per share not less than 100% of the fair market value per share of the underlying common stock on the date of grant. Under both plans, stock options generally expire 10 years from the date of grant and vest over periods determined by the board of directors. The vesting period for new-hire options and restricted stock units is generally a four-year term from the date of grant, at a rate of 25% after one year, then monthly or quarterly, respectively, on a straight-line basis thereafter. In July 2017, the Company began granting restricted stock units to existing employees that vest in equal quarterly installments over a four year service period.
SendGrid Equity Awards Assumed in Acquisition

In connection with its acquisition of SendGrid, the Company assumed all stock options and restricted stock units issued under SendGrid’s 2009, 2012 or 2017 Stock Incentive Plans that were outstanding on the date of acquisition. The assumed equity awards will continue to be outstanding and will be governed by the provisions of their respective plans. Additionally, the Company assumed shares of SendGrid common stock that were reserved and available for issuance under SendGrid's 2017 Equity Incentive Plan, on an as converted basis. These shares can be utilized for future equity grants under the Company’s 2016 Plan, to the extent permitted by New York Stock Exchange rules.

2016 Employee Stock Purchase Plan
The Company’s Employee Stock Purchase Plan (“2016 ESPP”) became effective on June 21, 2016. A total of 2,400,000 shares of the Company’s Class A common stock were initially reserved for issuance under the 2016 ESPP. These available shares will automatically increase each January 1, beginning on January 1, 2017, by the lesser of 1,800,000 shares of the common stock, 1% of the number of shares of the Company’s Class A and Class B common stock outstanding on the immediately preceding December 31 or such lesser number of shares as determined by the Company’s compensation committee. On January 1, 2019 and 2018, the shares available for grant under the 2016 Plan were automatically increased by 1,000,802 shares and 939,698 shares, respectively.
The 2016 ESPP allows eligible employees to purchase shares of the Company’s Class A common stock at a discount of up to 15% through payroll deductions of their eligible compensation, subject to any plan limitations. Except for the initial offering period, the 2016 ESPP provides for separate six-month offering periods beginning in May and November of each fiscal year, starting in May 2017.
On each purchase date, eligible employees will purchase the Company’s stock at a price per share equal to 85% of the lesser of (i) the fair market value of the Company’s Class A common stock on the offering date or (ii) the fair market value of the Company’s Class A common stock on the purchase date.
In the three months ended June 30, 2019 and 2018, 108,895 and 201,581 shares of Class A common stock were purchased under the 2016 ESPP, respectively, and 101,885 shares are expected to be purchased in the fourth quarter of 2019. As of June 30, 2019, total unrecognized compensation cost related to the 2016 ESPP was $3.2 million, which will be amortized over a weighted-average period of 0.4 years.
Stock options activity under the 2008 Plan and 2016 Plan was as follows:
Stock Options
 
 
Number of
options
outstanding
 
Weighted-
average
exercise
price
(per share)
 
Weighted-
average
remaining
contractual
term
(in years)
 
Aggregate
intrinsic
value
(in thousands)
Outstanding options as of December 31, 2018
 
7,423,369

 
$
16.07

 
6.80
 
$
534,640

Granted
 
905,180

 
118.41

 

 


Assumed in acquisition
 
2,978,555

 
14.91

 

 


Exercised
 
(2,590,384
)
 
9.75

 

 


Forfeited and canceled
 
(145,770
)
 
26.12

 

 


Outstanding options as of June 30, 2019
 
8,570,950

 
$
28.21

 
7.05
 
$
926,868

Options vested and exercisable as of June 30, 2019
 
4,783,817

 
$
11.50

 
6.03
 
$
597,243


Aggregate intrinsic value represents the difference between the fair value of the Company’s Class A common stock as reported on the New York Stock Exchange and the exercise price of outstanding “in-the-money” options. The aggregate intrinsic value of stock options exercised was $100.8 million and $287.8 million in the three and six months ended June 30, 2019, respectively, and $43.4 million and $74.5 million in the three and six months ended June 30, 2018, respectively.
The total estimated grant date fair value of options vested was $19.5 million and $42.5 million in the three and six months ended June 30, 2019, respectively, and $4.8 million and $12.8 million in three and six months ended June 30, 2018, respectively.
The weighted-average grant-date fair value of options granted was $63.4 and $58.2 in the three and six months ended June 30, 2019, respectively, and $19.1 and $15.7 in the three and six months ended June 30, 2018, respectively.
On February 28, 2017, the Company granted a total of 555,000 shares of performance-based stock options in three distinct awards to an employee with grant date fair values of $13.48 , $10.26 and $8.41 per share for a total grant value of $5.9 million. The first half of each award vests upon satisfaction of a performance condition and the remainder vests thereafter in equal monthly installments over a two year period. The achievement window expires after 4.3 years from the date of grant and the stock options expire seven years after the date of grant. The stock options are amortized over a derived service period, as adjusted, of 3.1 years, 3.9 years and 4.6 years, respectively. The stock options value and the derived service period were estimated using the Monte-Carlo simulation model. The following table summarizes the details of the performance options:

 
Number of
options
outstanding
 
Weighted-
average
exercise
price
(per share)
 
Weighted-
average
remaining
contractual
term
(in years)
 
Aggregate
intrinsic
value
(in thousands)
Outstanding options as of December 31, 2018
 
555,000

 
$
31.72

 
6.00
 
$

Granted
 

 

 

 


Exercised
 

 

 

 


Forfeited and canceled
 

 

 

 


Outstanding options as of June 30, 2019
 
555,000

 
$
31.72

 
4.67
 
$
58,070

Options vested and exercisable as of June 30, 2019
 
265,937

 
$
31.72

 
4.67
 
$
27,825


As of June 30, 2019, total unrecognized compensation cost related to nonvested stock options was $155.2 million, which will be amortized on a ratable basis over a weighted-average period of 2.2 years.


Restricted Stock Units

 
Number of
awards
outstanding
 
Weighted-
average
grant date
fair value
(per share)
 
Aggregate
intrinsic
value
(in thousands)
Nonvested RSUs as of December 31, 2018
 
8,262,902

 
$
42.70

 
$
729,373

Granted
 
1,886,838

 
125.14

 

Assumed in acquisition
 
561,999

 
112.88

 

Vested
 
(1,385,370
)
 
40.32

 

Forfeited and canceled
 
(399,840
)
 
$
54.13

 

Nonvested RSUs as of June 30, 2019
 
8,926,529

 
$
65.36

 
$
1,217,132


As of June 30, 2019, total unrecognized compensation cost related to nonvested RSUs was $532.0 million, which will be amortized over a weighted-average period of 2.9 years.
Valuation Assumptions
The fair value of employee stock options was estimated on the date of grant using the following assumptions in the Black-Scholes option pricing model:

 
Three Months Ended
June 30,
 
Six Months Ended
June 30,
Employee Stock Options:
 
2019
 
2018
 
2019
 
2018
Fair value of common stock
 
$127.96
 
$41.22
 
$111.32 - $130.65
 
$33.01 - $41.22
Expected term (in years)
 
6.08
 
6.08
 
0.33 - 6.08
 
6.08
Expected volatility
 
49.19%
 
44.16%
 
48.31% - 66.46%
 
44.09% - 44.16%
Risk-free interest rate
 
2.44%
 
2.86%
 
2.39% - 2.51%
 
2.74% - 2.86%
Dividend rate
 
—%
 
—%
 
—%
 
—%

Employee Stock Purchase Plan:
 
Three Months Ended
June 30,
 
Six Months Ended
June 30,

 
2019
 
2018
 
2019
 
2018
Expected term (in years)
 
0.50
 
0.50
 
0.50
 
0.50
Expected volatility
 
50.34%
 
39.78%
 
50.34%
 
39.78%
Risk-free interest rate
 
2.43%
 
2.09%
 
2.43%
 
2.09%
Dividend rate
 
—%
 
—%
 
—%
 
—%

The following assumptions were used in the Monte Carlo simulation model to estimate the grant date fair value and the derived service period of the performance options:
Asset volatility
 
40%
Equity volatility
 
45%
Discount rate
 
14%
Stock price at grant date
 
$31.72

Stock-Based Compensation Expense
The Company recorded the total stock-based compensation expense as follows (in thousands). In the three and six months ended June 30, 2019, the stock-based compensation expense associated with awards assumed in the SendGrid acquisition was $26.0 million and $46.7 million, respectively.

 
Three Months Ended
June 30,
 
Six Months Ended
June 30,

 
2019
 
2018
 
2019
 
2018
Cost of revenue
 
$
1,623

 
$
266

 
$
3,432

 
$
488

Research and development
 
33,701

 
9,749

 
59,040

 
17,621

Sales and marketing
 
14,564

 
5,049

 
26,313

 
8,908

General and administrative
 
20,852

 
5,942

 
40,279

 
11,529

Total
 
$
70,740

 
$
21,006

 
$
129,064

 
$
38,546


v3.19.2
Net Loss Per Share Attributable to Common Stockholders
6 Months Ended
Jun. 30, 2019
Earnings Per Share [Abstract]  
Net Loss Per Share Attributable to Common Stockholders Net Loss Per Share Attributable to Common Stockholders
Basic and diluted net loss per common share is presented in conformity with the two-class method required for participating securities.
Class A and Class B common stock are the only outstanding equity in the Company. The rights of the holders of Class A and Class B common stock are identical, except with respect to voting and conversion. Each share of Class A common stock is entitled to one vote per share and each share of Class B common stock is entitled to 10 votes per share. Shares of Class B common stock may be converted into Class A common stock at any time at the option of the stockholder and are automatically converted into Class A common stock upon sale or transfer, subject to certain limited exceptions.
Basic net loss per share attributable to common stockholders is computed using the weighted-average number of common shares outstanding during the period. Diluted net loss per share attributable to common stockholders is computed using the weighted-average number of common shares and, if dilutive, potential common shares outstanding during the period. The dilutive effect of these potential common shares is reflected in diluted earnings per share by application of the treasury stock method.
The following table sets forth the calculation of basic and diluted net loss per share attributable to common stockholders during the periods presented (in thousands, except share and per share data):

 
Three Months Ended
June 30,
 
Six Months Ended
June 30,

 
2019
 
2018
 
2019
 
2018
Net loss attributable to common stockholders
 
$
(92,579
)
 
$
(24,006
)
 
$
(129,082
)
 
$
(47,735
)
Weighted-average shares used to compute net loss per share attributable to common stockholders, basic and diluted
 
129,310,641

 
96,348,356

 
122,985,716

 
95,515,583

Net loss per share attributable to common stockholders, basic and diluted
 
$
(0.72
)
 
$
(0.25
)
 
$
(1.05
)
 
$
(0.50
)

The following outstanding shares of common stock equivalents were excluded from the calculation of the diluted net loss per share attributable to common stockholders because their effect would have been anti-dilutive:

 
As of June 30,

 
2019
 
2018
Stock options issued and outstanding
 
9,125,950

 
9,527,562

Nonvested restricted stock units issued and outstanding
 
8,926,529

 
7,705,589

Class A common stock reserved for Twilio.org
 
776,334

 
635,014

Class A common stock committed under 2016 ESPP
 
101,885

 
131,581

Conversion spread*
 
3,626,721

 

Unvested shares subject to repurchase
 

 
334

Total
 
22,557,419

 
18,000,080

_________
* Since the Company expects to settle the principal amount of its outstanding convertible senior notes in cash and any excess in shares of the Company's Class A common stock, the Company uses the treasury stock method for calculating any potential dilutive effect of the conversion spread on diluted net income per share, if applicable. The conversion spread will have a dilutive impact on diluted net income per share of Class A common stock when the average market price of the Company's Class A common stock for a given period exceeds the conversion price of $70.90 per share for the Notes. The conversion spread is calculated using the average market price of Class A common stock during the period, consistent with the treasury stock method.
v3.19.2
Income Taxes
6 Months Ended
Jun. 30, 2019
Income Tax Disclosure [Abstract]  
Income Taxes Income Taxes
    
The Company recorded the following income tax benefit (provision):
 
 
Three Months Ended
June 30,
 
Six Months Ended
June 30,
 
 
2019
 
2018
 
2019
 
2018
Income tax benefit (provision)
 
$
2,033

 
$
(150
)
 
$
53,754

 
$
(287
)

    
In connection with the SendGrid acquisition, the Company recorded a net deferred tax liability which provides an additional source of taxable income to support the realization of the pre-existing deferred tax assets and, accordingly, during the three and six months ended June 30, 2019, the Company released a total of $1.1 million and $52.7 million, respectively, of its U.S. valuation allowance. In the three months ended June 30, 2019, the Company also released $0.7 million of its valuation allowance in connection with its acquisition of Capio, Inc. The Company continues to maintain a valuation allowance for its U.S. Federal and state net deferred tax assets.

The provision for income taxes recorded in the three and six months ended June 30, 2018, consists primarily of income taxes and withholding taxes in foreign jurisdictions in which the Company conducts business. The Company’s U.S. operations have been in a loss position and the Company maintains a full valuation allowance against its U.S. deferred tax assets.
v3.19.2
Summary of Significant Accounting Policies (Policies)
6 Months Ended
Jun. 30, 2019
Accounting Policies [Abstract]  
Basis of Presentation Basis of Presentation
The accompanying unaudited condensed consolidated financial statements have been prepared in accordance with generally accepted accounting principles in the United States of America (“U.S. GAAP”) and applicable rules and regulations of the Securities and Exchange Commission (“SEC”) regarding interim financial reporting. Certain information and note disclosures normally included in the financial statements prepared in accordance with U.S. GAAP have been condensed or omitted pursuant to such rules and regulations. Therefore, these condensed consolidated financial statements should be read in conjunction with the consolidated financial statements and notes included in our Annual Report on Form 10-K filed with the SEC on March 1, 2019 (“Annual Report”).
The condensed consolidated balance sheet as of December 31, 2018, included herein, was derived from the audited financial statements as of that date, but may not include all disclosures including certain notes required by U.S. GAAP on an annual reporting basis.
In the opinion of management, the accompanying unaudited condensed consolidated financial statements reflect all normal recurring adjustments necessary to present fairly the financial position, results of operations, comprehensive loss and cash flows for the interim periods, but are not necessarily indicative of the results of operations to be anticipated for the full year 2019 or any future period.
Principles of Consolidation Principles of Consolidation
The condensed consolidated financial statements include the Company and its wholly owned subsidiaries. All significant intercompany balances and transactions have been eliminated.
Use of Estimates Use of Estimates
The preparation of financial statements in conformity with U.S. GAAP requires management to make estimates and assumptions that affect the reported amounts of assets and liabilities and disclosure of contingent assets and liabilities at the date of the financial statements and the reported amounts of revenues and expenses during the reporting period. These estimates are used for, but not limited to, revenue allowances and returns; recoverability of long-lived and intangible assets; capitalization and useful life of the Company’s capitalized internal-use software development costs; fair value of acquired intangible assets and goodwill; accruals and contingencies. Estimates are based on historical experience and on various assumptions that the Company believes are reasonable under current circumstances. However, future events are subject to change and best estimates and judgments may require further adjustments; therefore, actual results could differ materially from those estimates. Management periodically evaluates such estimates and they are adjusted prospectively based upon such periodic evaluation.
Concentration of Credit Risk Concentration of Credit Risk
Financial instruments that potentially expose the Company to a concentration of credit risk consist primarily of cash, cash equivalents, marketable securities, restricted cash and accounts receivable. The Company maintains cash, cash equivalents, marketable securities and restricted cash with financial institutions that management believes are financially sound and have minimal credit risk exposure although the balances will exceed insured limits.
The Company sells its services to a wide variety of customers. If the financial condition or results of operations of any significant customers deteriorate substantially, operating results could be adversely affected. To reduce credit risk, management performs ongoing credit evaluations of the financial condition of significant customers. The Company does not require collateral from its credit customers and maintains reserves for estimated credit losses on customer accounts when considered necessary. Actual credit losses may differ from the Company’s estimates.
Deferred Revenue and Customer Deposits and Deferred Sales Commissions Deferred Revenue and Customer Deposits

Deferred revenue is recorded when cash payments are received in advance of future usage on non-cancelable contracts. Customer refundable prepayments are recorded as customer deposits. During the three and six months ended June 30, 2019, the Company recognized $4.7 million and $15.4 million of revenue, respectively, and during the three and six months ended June 30, 2018, the Company recognized $3.6 million and $7.2 million of revenue, respectively, that was included in the deferred revenue and customer deposits balance as of the beginning of the year.
(f)Deferred Sales Commissions

The Company records an asset for the incremental costs of obtaining a contract with a customer, for example, sales commissions that are earned upon execution of contracts. The Company uses the portfolio of data method to determine the estimated period of benefit of capitalized commissions which is determined to be five years. Amortization expense related to these capitalized costs related to initial contracts, upsells and renewals, is recognized on a straight line basis over the estimated period of benefit of the capitalized commissions.
Recently Accounting Guidance Recently Adopted Accounting Guidance

In February 2016, the Financial Accounting Standards Board (“FASB”) issued ASU 2016-02, "Leases (Topic 842)", which was further clarified in July 2018 by ASU 2018‑10, “Codification Improvements to Topic 842, Leases”, and ASU 2018‑11, “Leases-Targeted Improvements”. ASU 2018-10 provides narrow amendments to clarify how to apply certain aspects of the new lease standard. ASU 2018-11 addresses implementation issues related to the new lease standard. The standard is effective for interim and annual reporting periods beginning after December 15, 2018. Under the new standard, lessees are required to recognize in the balance sheet the right-of-use ("ROU") assets and lease liabilities that arise from operating leases. The Company adopted the standard using the optional alternative method on a prospective basis with an effective date as of the beginning of the Company’s fiscal year, January 1, 2019, and applied it to the operating leases that existed on that date. Prior year comparative financial information was not recast under the new standard and continues to be presented under ASC 840. The Company elected to utilize the package of practical expedients available for expired or existing contracts which allowed the Company to carryforward historical assessments of (a) whether contracts are or contain leases, (b) lease classification, and (c) initial direct costs. The Company elected the use of hindsight practical expedient in determining the lease term and assessing the likelihood that lease renewal, termination or purchase option will be exercised. The Company also elected to apply the short-term lease exception for all leases. Under the short-term lease exception, the Company will not recognize ROU assets or lease liabilities for leases that, at the acquisition date, have a remaining lease term of 12 months or less.

As a result of implementing this guidance, the Company recognized a $123.5 million net operating ROU asset and a $132.0 million operating lease liability in its condensed consolidated balance sheet as of January 1, 2019. The ROU asset was presented net of deferred rent of $9.0 million as of January 1, 2019, in the accompanying condensed consolidated balance sheet
and as a change within operating cash flows. In addition, on February 1, 2019, the Company acquired through its business combination with SendGrid approximately $33.7 million in operating ROU assets, $32.6 million in operating lease liability, $14.2 million in finance ROU assets and $13.6 million in finance lease liability.

The Company measured the lease liability at the present value of the future lease payments as of January 1, 2019. The Company used its incremental borrowing rate to discount the lease payments. The Company derived the discount rate, adjusted for differences in the term and payment patterns, from the information available at the adoption date. The right-of-use asset is valued at the amount of the lease liability adjusted for the remaining December 31, 2018, balance of unamortized lease incentives, prepaid rent and deferred rent. The lease liability is subsequently measured at the present value of unpaid future lease payments as of the reporting date with a corresponding adjustment to the right-of-use asset. Absent a lease modification, the Company will continue to utilize the January 1, 2019, incremental borrowing rate.

The Company recognizes lease costs on a straight-line basis and presents these costs as operating expenses within the consolidated statements of operations and comprehensive loss. The Company presents lease payments within the cash flows from operations within the consolidated statements of cash flows.

The financial results for the three and six months ended June 30, 2019, are presented under the new standard, while the comparative periods presented are not adjusted and continue to be reported in accordance with the Company’s historical accounting policy.
 
See Note 5, “Right-of-use Assets and Lease Liabilities” for further information.
 
In March 2019, the FASB issued ASU 2019-01, “Codification Improvements” to Leases (Topic 842). This pronouncement did not have a material impact on the Company's financial statements.

In August 2018, the FASB issued ASU 2018‑13, “Fair Value Measurement (Topic 820) Disclosure Framework-Changes to the Disclosure Requirements for Fair Value Measurement”. The amendments under ASU 2018‑13 remove, add and modify certain disclosure requirements on fair value measurements in ASC 820. The amendments are effective for interim and annual periods beginning after December 15, 2019. The Company early adopted this guidance effective April 1, 2019. The adoption of this guidance did not have a material impact on the Company’s consolidated financial statements.

In July 2018, the FASB issued ASU 2018-09, "Codification Improvements ", which does not prescribe any new accounting guidance, but instead makes minor improvements and clarifications of several topics. Certain updates are applicable immediately while others provide for a transition period to adopt as part of the next fiscal year beginning after December 15, 2018. The Company adopted this guidance effective April 1, 2019. The adoptions of this guidance did not have a material impact on the Company's consolidated financial statements.

In January 2017, the FASB issued ASU 2017‑04, “Simplifying the Test for Goodwill Impairment”, which removes the second step of the goodwill impairment test that requires a hypothetical purchase price allocation. A goodwill impairment will now be the amount by which a reporting unit’s carrying value exceeds its fair value, not to exceed the carrying amount of goodwill. This guidance is effective prospectively for interim and annual reporting periods beginning after December 15, 2019. The Company early adopted this guidance effective April 1, 2019. The adoption of this guidance did not have a material impact on the Company’s consolidated financial statements.

(h)    Recently Issued Accounting Guidance, Not yet Adopted
In August 2018, the FASB issued ASU 2018‑15, “Intangibles—Goodwill and Other—Internal‑Use Software (Subtopic 350‑40): Customer’s Accounting for Implementation Costs Incurred in a Cloud Computing Arrangement That is a Service Contract”. This standard aligns the requirements for capitalizing implementation costs incurred in a hosting arrangement that is a service contract with the requirements for capitalizing implementation costs incurred to develop or obtain internal‑use software. The standard is effective for interim and annual periods beginning after December 15, 2019, with early adoption permitted. The Company is currently evaluating the impact of the adoption of this standard on its consolidated financial statements.
In June 2016, the FASB issued ASU 2016‑13, “Financial Instruments—Credit Losses: Measurement of Credit Losses on Financial Instruments”, which changes the impairment model for most financial assets. The new model uses a forward‑looking expected loss method, which will generally result in earlier recognition of allowances for losses. In November 2018, the FASB issued ASU 2018‑19, “Codification Improvements to Topic 326, Financial Instruments—Credit
Losses”, which clarifies that receivables arising from operating leases are not within the scope of Topic 326, Financial Instruments—Credit Losses. Instead, impairment of receivables arising from operating leases should be accounted for in accordance with Topic 842, Leases. In April 2019, the FASB issued ASU 2019-04, "Codification  Improvements to Topic 326, Financial Instruments—Credit Losses, Topic 815, Derivatives and Hedging, and Topic 825, Financial Instruments," which clarifies treatment of certain credit losses. In May 2019, the FASB issued ASU 2019-05, "Financial Instruments — Credit Losses (Topic 326): Targeted Transition Relief", which permits an entity, upon adoption of ASU 2016-13, to irrevocably elect the fair value option (on an instrument-by-instrument basis) for eligible financial assets measured at amortized cost basis. These ASUs are effective for annual and interim periods beginning after December 15, 2019, and early adoption is permitted. The Company is evaluating the impact of this guidance on its consolidated financial statements
v3.19.2
Fair Value Measurements (Tables)
6 Months Ended
Jun. 30, 2019
Fair Value Disclosures [Abstract]  
Schedule of financial assets measured at fair value on a recurring basis
The following tables provide the financial assets measured at fair value on a recurring basis as of June 30, 2019, and December 31, 2018, (in thousands):
 
 
Amortized
Cost or
Carrying
Value
 
Gross
Unrealized
Gains
 
Gross
Unrealized
Losses
Less Than
12 Months
 
Gross
Unrealized
Losses More
Than
12 Months
 
Fair Value Hierarchy as of
June 30, 2019
 
Aggregate
Fair Value
Level 1
 
Level 2
 
Level 3
Financial Assets:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Cash and cash equivalents:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Money market funds
 
$
275,838

 
$

 
$

 
$

 
$
275,838

 
$

 
$

 
$
275,838

Reverse repurchase agreements
 
75,000

 

 

 

 

 
75,000

 

 
75,000

Commercial paper
 
114,471

 

 

 

 
 
 
114,471

 
 
 
114,471

Total included in cash and cash equivalents
 
465,309

 

 

 

 
275,838

 
189,471

 

 
465,309

Marketable securities:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
U.S. Treasury securities
 
160,374

 
238

 
(1
)
 

 
160,611

 

 

 
160,611

Corporate debt securities and commercial paper
 
1,183,653

 
2,427

 
(309
)
 
(11
)
 
5,000

 
1,180,760

 

 
1,185,760

Total marketable securities
 
1,344,027

 
2,665

 
(310
)
 
(11
)
 
165,611

 
1,180,760

 

 
1,346,371

Strategic investment
 
5,000

 

 

 

 

 

 
5,000

 
5,000

Total financial assets
 
$
1,814,336

 
$
2,665

 
$
(310
)
 
$
(11
)
 
$
441,449

 
$
1,370,231

 
$
5,000

 
$
1,816,680



 
 
Amortized Cost or Carrying Value
 
Gross
Unrealized
Gains
 
Gross
Unrealized
Losses
Less Than
12 Months
 
Gross
Unrealized
Losses More
Than
12 Months
 
Fair Value Hierarchy as of
December 31, 2018
 
Aggregate
Fair Value
 
Level 1
 
Level 2
 
Level 3
Financial Assets:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Cash and cash equivalents:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Money market funds
 
$
420,234

 
$

 
$

 
$

 
$
420,234

 
$

 
$

 
$
420,234

Reverse repurchase agreements
 
35,000

 

 

 

 

 
35,000

 

 
35,000

Commercial paper
 
9,983

 

 

 

 

 
9,983

 

 
9,983

Total included in cash and cash equivalents
 
465,217

 

 

 

 
420,234

 
44,983

 

 
465,217

Marketable securities:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
U.S. Treasury securities
 
59,785

 

 
(7
)
 
(9
)
 
59,769

 

 

 
59,769

Corporate debt securities and commercial paper
 
201,683

 
23

 
(123
)
 
(224
)
 

 
201,359

 

 
201,359

Total marketable securities
 
261,468

 
23

 
(130
)
 
(233
)
 
59,769

 
201,359

 

 
261,128

Total financial assets
 
$
726,685

 
$
23

 
$
(130
)
 
$
(233
)
 
$
480,003

 
$
246,342

 
$

 
$
726,345


Schedule of contractual maturities of marketable securities
The following table summarizes the contractual maturities of marketable securities as of June 30, 2019, and December 31, 2018, (in thousands):
 
As of June 30, 2019
 
As of December 31, 2018
 
Amortized
Cost
 
Aggregate
Fair Value
 
Amortized
Cost
 
Aggregate
Fair Value
Financial Assets:
 
 
 
 
 
 
 
Less than one year
$
687,642

 
$
688,388

 
$
261,468

 
$
261,128

One to two years
656,385

 
657,983

 

 

Total
$
1,344,027

 
$
1,346,371

 
$
261,468

 
$
261,128


v3.19.2
Property and Equipment (Tables)
6 Months Ended
Jun. 30, 2019
Property, Plant and Equipment [Abstract]  
Schedule of property and equipment
Property and equipment consisted of the following (in thousands):
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Capitalized internal-use software development costs
 
$
85,145

 
$
72,647

Data center equipment (1)
 
14,795

 

Leasehold improvements
 
33,305

 
15,293

Office equipment
 
20,715

 
13,563

Furniture and fixtures (1)
 
7,273

 
4,918

Software
 
6,073

 
1,849

Total property and equipment
 
167,306

 
108,270

Less: accumulated depreciation and amortization
 
(60,826
)
 
(44,736
)
Total property and equipment, net
 
$
106,480

 
$
63,534

_______________
(1) 
Data center equipment and furniture and fixtures contain assets under finance leases. See Note 5 for further detail.
v3.19.2
Right-of-Use Asset and Lease Liabilities (Tables)
6 Months Ended
Jun. 30, 2019
Leases [Abstract]  
Lease, Cost
The components of lease expense recorded in the condensed consolidated statement of operations were as follows (in thousands):

 
Three Months Ended June 30, 2019
 
Six Months Ended June 30, 2019
Operating lease cost
 
$
8,273

 
$
15,446

Finance lease cost:
 

 
 
   Amortization of assets
 
1,526

 
2,689

   Interest on lease liabilities
 
189

 
337

Short-term lease cost
 
1,905

 
3,340

Variable lease cost
 
1,080

 
1,567

Total net lease cost
 
$
12,973

 
$
23,379


Supplemental cash flow and other information related to leases was as follows (in thousands):

 
Six Months Ended June 30, 2019
Cash paid for amounts included in the measurement of lease liabilities:
 

Operating cash flows from operating leases
 
$
12,145

Operating cash flows from finance leases
 
$
337

Financing cash flows from finance leases
 
$
2,463


 

Weighted average remaining lease term (in years):
 

Operating leases
 
6.8

Finance leases
 
3.1


 

Weighted average discount rate:
 

Operating leases
 
5.8
%
Finance leases
 
5.2
%

Assets and Liabilities, Lessee
Supplemental balance sheet information related to leases was as follows (in thousands):
Leases
 
Classification
 
As of
June 30,
2019
Assets:
 

 

Operating lease assets
 
Operating right-of-use asset (a)
 
$
151,946

Finance lease assets
 
Property and equipment, net of accumulated depreciation (b)
 
12,970

Total leased assets
 

 
$
164,916


 

 
 
Liabilities:
 

 
 
Current
 

 
 
   Operating
 
Operating lease liability, current
 
$
21,858

   Finance
 
Financing lease liability, current
 
5,920

Noncurrent
 

 
 
   Operating
 
Operating lease liability, noncurrent
 
138,819

   Finance
 
Finance lease liability, noncurrent
 
7,752

Total lease liabilities
 

 
$
174,349

(a)
Operating lease assets are recorded net of accumulated amortization of $10.8 million as of June 30, 2019.
(b)
Finance lease assets are recorded net of accumulated depreciation of $2.7 million as of June 30, 2019.
Lessee, Operating Lease, Liability, Maturity
Maturities of lease liabilities were as follows (in thousands):

 
As of June 30, 2019

 
Operating
Leases
 
Finance
Leases
2019 (remaining six months)
 
$
14,523

 
$
3,278

2020
 
30,523

 
6,015

2021
 
28,791

 
3,130

2022
 
28,249

 
807

2023
 
27,762

 
413

Thereafter
 
68,106

 
1,316

Total lease payments
 
197,954

 
14,959

Less: imputed interest
 
(37,277
)
 
(1,287
)
Total lease obligations
 
160,677

 
13,672

Less: current obligations
 
(21,858
)
 
(5,920
)
Long-term lease obligations
 
$
138,819

 
$
7,752


Finance Lease, Liability, Maturity
Maturities of lease liabilities were as follows (in thousands):

 
As of June 30, 2019

 
Operating
Leases
 
Finance
Leases
2019 (remaining six months)
 
$
14,523

 
$
3,278

2020
 
30,523

 
6,015

2021
 
28,791

 
3,130

2022
 
28,249

 
807

2023
 
27,762

 
413

Thereafter
 
68,106

 
1,316

Total lease payments
 
197,954

 
14,959

Less: imputed interest
 
(37,277
)
 
(1,287
)
Total lease obligations
 
160,677

 
13,672

Less: current obligations
 
(21,858
)
 
(5,920
)
Long-term lease obligations
 
$
138,819

 
$
7,752


Schedule of Future Minimum Rental Payments for Operating Leases
Future minimum lease payment obligations under noncancelable operating and finance leases were as follows (in thousands):

 
As of December 31, 2018

 
Operating
Leases
 
Finance
Leases
2019
 
$
24,128

 
$
306

2020
 
29,527

 
512

2021
 
30,898

 
573

2022
 
30,492

 
590

2023
 
30,122

 
608

Thereafter
 
81,316

 
1,939

Total lease payments
 
$
226,483

 
$
4,528


Schedule of Future Minimum Lease Payments for Capital Leases
Future minimum lease payment obligations under noncancelable operating and finance leases were as follows (in thousands):

 
As of December 31, 2018

 
Operating
Leases
 
Finance
Leases
2019
 
$
24,128

 
$
306

2020
 
29,527

 
512

2021
 
30,898

 
573

2022
 
30,492

 
590

2023
 
30,122

 
608

Thereafter
 
81,316

 
1,939

Total lease payments
 
$
226,483

 
$
4,528


v3.19.2
Business Combinations (Tables)
6 Months Ended
Jun. 30, 2019
Business Combinations [Abstract]  
Purchase price components
The purchase price components, as adjusted, are summarized in the following table (in thousands):
 
 
Total
Fair value of Class A common stock transferred
 
$
2,658,898

Fair value of the pre-combination service through equity awards
 
184,494

Total purchase price, as adjusted
 
$
2,843,392


Schedule of purchase price allocation
The following table presents the preliminary purchase price allocation recorded in the Company's condensed consolidated balance sheet as of June 30, 2019, (in thousands):
 
 
Total
Net tangible liabilities assumed
 
$
(542
)
Intangible assets (1)
 
7,610

Goodwill (2)
 
7,343

Total purchase price
 
$
14,411

_________________
(1) Identifiable finite-lived intangible assets were comprised of the following (in thousands):
 
 
Total
 
Estimated life
(in years)
Developed technology and software
 
$
6,390

 
6
Customer relationships
 
1,220

 
4
Total intangible assets acquired
 
$
7,610

 
 

(2) The goodwill is primarily attributable to the future cash flows to be realized from the acquired technology. The goodwill is not deductible for U.S. tax purposes.
The following table presents the preliminary purchase price allocation, as adjusted, recorded in the Company's condensed consolidated balance sheet as of June 30, 2019 (in thousands). The Company expects to continue to obtain information to assist it in determining the fair values of the net assets acquired on the acquisition date during the measurement period:
 
 
Total
Cash and cash equivalents
 
$
156,783

Accounts receivable and other current assets
 
11,636

Property and equipment, net
 
38,350

Operating right of use asset
 
33,742

Intangible assets
 
483,000

Other assets
 
1,664

Goodwill
 
2,238,070

Accounts payable and other liabilities
 
(11,115
)
Operating lease liability
 
(32,568
)
Financing lease liability
 
(13,616
)
Note payable
 
(5,387
)
Deferred tax liability
 
(57,167
)
Total purchase price
 
$
2,843,392

Schedule of identifiable finite-lived intangible assets
Identifiable intangible assets are comprised of the following (in thousands):
 
 
Total
 
Estimated life
(in years)
Developed technology and software
 
$
294,000

 
7
Customer relationships
 
169,000

 
7
Trade names
 
20,000

 
5
Total intangible assets acquired
 
$
483,000

 
 

Schedule of pro forma information
The following table presents the pro forma condensed combined financial information (in thousands):
 
 
Three Months Ended June 30,
 
Six Months Ended June 30,
 
 
2019
 
2018
 
2019
 
2018
Revenue
 
$
275,039

 
$
183,429

 
$
521,924

 
$
345,114

Net loss attributable to common stockholders
 
$
(82,880
)
 
$
(53,858
)
 
$
(155,840
)
 
$
(73,339
)


v3.19.2
Goodwill and Intangible Assets (Tables)
6 Months Ended
Jun. 30, 2019
Goodwill and Intangible Assets Disclosure [Abstract]  
Schedule of goodwill balance
Goodwill balance as of June 30, 2019, and December 31, 2018, was as follows (in thousands):
 
 
Total
Balance as of December 31, 2018
 
$
38,165

Goodwill additions related to 2019 acquisitions
 
2,246,398

Measurement period adjustments
 
(985
)
Balance as of June 30, 2019
 
$
2,283,578



Schedule of intangible assets
Intangible assets consisted of the following (in thousands):
 
 
As of
June 30, 2019
 
 
Gross
 
Accumulated
Amortization
 
Net
Amortizable intangible assets:
 
 
 
 
 
 
Developed technology
 
$
328,598

 
$
(30,581
)
 
$
298,017

Customer relationships
 
178,374

 
(13,280
)
 
165,094

Supplier relationships
 
2,696

 
(1,240
)
 
1,456

Trade names
 
20,060

 
(1,727
)
 
18,333

Patent
 
2,439

 
(224
)
 
2,215

Total amortizable intangible assets
 
532,167

 
(47,052
)
 
485,115

Non-amortizable intangible assets:
 
 
 
 
 
 
Domain names
 
32

 

 
32

Trademarks
 
263

 

 
263

Total
 
$
532,462

 
$
(47,052
)
 
$
485,410


 
 
As of
December 31, 2018
 
 
Gross
 
Accumulated
Amortization
 
Net
Amortizable intangible assets:
 
 
 
 
 
 
Developed technology
 
$
28,209

 
$
(10,497
)
 
$
17,712

Customer relationships
 
8,153

 
(2,411
)
 
5,742

Supplier relationships
 
2,696

 
(973
)
 
1,723

Trade name
 
60

 
(60
)
 

Patent
 
2,264

 
(178
)
 
2,086

Total amortizable intangible assets
 
41,382

 
(14,119
)
 
27,263

Non-amortizable intangible assets:
 
 
 
 
 
 
Domain names
 
32

 

 
32

Trademarks
 
263

 

 
263

Total
 
$
41,677

 
$
(14,119
)
 
$
27,558


Schedule of total estimated future amortization expense Total estimated future amortization expense was as follows (in thousands):
 
 
As of
June 30,
2019
2019 (remaining six months)
 
$
39,878

2020
 
77,882

2021
 
76,371

2022
 
74,976

2023
 
72,786

Thereafter
 
143,222

Total
 
$
485,115


v3.19.2
Accrued Expenses and Other Liabilities (Tables)
6 Months Ended
Jun. 30, 2019
Accrued Liabilities and Other Liabilities [Abstract]  
Schedule of accrued expenses and other current liabilities
Accrued expenses and other current liabilities consisted of the following (in thousands):
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Accrued payroll and related
 
$
15,717

 
$
9,886

Accrued bonus and commission
 
8,974

 
8,564

Accrued cost of revenue
 
34,523

 
29,901

Sales and other taxes payable
 
27,499

 
23,631

ESPP contributions
 
4,004

 
2,672

Deferred rent
 

 
1,418

VAT liability
 
2,528

 
2,217

Acquisition holdback
 
2,240

 

Accrued other expense
 
22,140

 
18,054

Total accrued expenses and other current liabilities
 
$
117,625

 
$
96,343


Schedule of other long-term liabilities
Other long-term liabilities consisted of the following (in thousands):
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Deferred rent
 
$

 
$
7,569

Deferred tax liability
 
9,077

 
5,181

Acquisition holdback
 
4,280

 
2,290

Capital lease obligation
 

 
2,170

Accrued other expense
 
2,122

 
959

Total other long-term liabilities
 
$
15,479

 
$
18,169


v3.19.2
Notes Payable (Tables)
6 Months Ended
Jun. 30, 2019
Long-term Debt, Unclassified [Abstract]  
Schedule of net carrying amount of the liability and equity components of the Notes
The net carrying amount of the liability component of the Notes was as follows (in thousands):
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Principal
 
$
550,000

 
$
550,000

Unamortized discount
 
(95,719
)
 
(106,484
)
Unamortized issuance costs
 
(8,104
)
 
(9,020
)
Net carrying amount
 
$
446,177

 
$
434,496

The net carrying amount of the equity component of the Notes was as follows (in thousands):
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Proceeds allocated to the conversion options (debt discount)
 
$
119,435

 
$
119,435

Issuance costs
 
(2,819
)
 
(2,819
)
Net carrying amount
 
$
116,616

 
$
116,616


Schedule of interest expense recognized related to the Notes
The following table sets forth the interest expense recognized related to the Notes (in thousands):
 
 
Three Months Ended
June 30,
 
Six Months Ended
June 30,
 
 
2019
 
2018
 
2019
 
2018
Contractual interest expense
 
$
344

 
$
164

 
$
688

 
$
164

Amortization of debt issuance costs
 
458

 
211

 
916

 
211

Amortization of debt discount
 
5,383

 
2,484

 
10,766

 
2,484

Total interest expense related to the Notes
 
$
6,185

 
$
2,859

 
$
12,370

 
$
2,859


Schedule of principal and interest payments Principal and interest payments of are as follows:
Year Ending December 31:
 
Principal
 
Interest
2019 (remaining six months)
 
$
1,036

 
$
129

2020
 
2,176

 
153

2021
 
1,144

 
22

Total payments related to the note
 
$
4,356

 
$
304


v3.19.2
Supplemental Balance Sheet Information (Tables)
6 Months Ended
Jun. 30, 2019
Receivables [Abstract]  
Schedule of the allowance for doubtful accounts Allowance for doubtful accounts:
 
 
Three Months Ended
June 30,
 
Six Months Ended
June 30,
 
 
2019
 
2018
 
2019
 
2018
Balance, beginning of period
 
$
4,281

 
$
1,404

 
$
4,945

 
$
1,033

Additions
 
685

 
1,140

 
381

 
1,515

Assumed in acquisition
 

 

 
59

 

Write-offs
 
(193
)
 
(8
)
 
(612
)
 
(12
)
Balance, end of period
 
$
4,773

 
$
2,536

 
$
4,773

 
$
2,536


Schedule of the sales credit reserve Sales credit reserve:
 
 
Three Months Ended
June 30,
 
Six Months Ended
June 30,
 
 
2019
 
2018
 
2019
 
2018
Balance, beginning of period
 
$
2,831

 
$
1,702

 
$
3,015

 
$
1,761

Additions
 
2,862

 
1,544

 
5,266

 
2,651

Assumed in acquisition
 

 

 
277

 

Deductions against reserve
 
(2,617
)
 
(621
)
 
(5,482
)
 
(1,787
)
Balance, end of period
 
$
3,076

 
$
2,625

 
$
3,076

 
$
2,625


v3.19.2
Revenue by Geographic Area (Tables)
6 Months Ended
Jun. 30, 2019
Revenue from Contract with Customer [Abstract]  
Schedule of revenue by geographic area
Revenue by geographic area is based on the IP address or the mailing address at the time of registration. The following table sets forth revenue by geographic area (in thousands):
 
 
Three Months Ended
June 30,
 
Six Months Ended
June 30,
 
 
2019
 
2018
 
2019
 
2018
Revenue by geographic area:
 
 
 
 
 
 

 
 

United States
 
$
194,998

 
$
111,244

 
$
361,551

 
$
209,879

International
 
80,041

 
36,510

 
146,627

 
66,991

Total
 
$
275,039

 
$
147,754

 
$
508,178

 
$
276,870

Percentage of revenue by geographic area:
 
 
 
 
 
 

 
 

United States
 
71
%
 
75
%
 
71
%
 
76
%
International
 
29
%
 
25
%
 
29
%
 
24
%

v3.19.2
Stockholders' Equity (Tables)
6 Months Ended
Jun. 30, 2019
Stockholders' Equity Note [Abstract]  
Schedule of reserved shares of common stock for issuance
The Company had reserved shares of common stock for issuance as follows:
 
 
As of
June 30,
2019
 
As of
December 31,
2018
Stock options issued and outstanding
 
9,125,950

 
7,978,369

Nonvested restricted stock units issued and outstanding
 
8,926,529

 
8,262,902

Class A common stock reserved for Twilio.org
 
776,334

 
572,676

Stock-based awards available for grant under 2016 Plan
 
15,727,925

 
9,313,354

Stock-based awards available for grant under 2016 ESPP
 
3,984,686

 
3,092,779

Class A common stock reserved for the convertible senior notes
 
10,472,165

 
10,472,165

Total
 
49,013,589

 
39,692,245


v3.19.2
Stock-Based Compensation (Tables)
6 Months Ended
Jun. 30, 2019
Stock-Based Compensation  
Schedule of restricted stock unit activity

 
Number of
awards
outstanding
 
Weighted-
average
grant date
fair value
(per share)
 
Aggregate
intrinsic
value
(in thousands)
Nonvested RSUs as of December 31, 2018
 
8,262,902

 
$
42.70

 
$
729,373

Granted
 
1,886,838

 
125.14

 

Assumed in acquisition
 
561,999

 
112.88

 

Vested
 
(1,385,370
)
 
40.32

 

Forfeited and canceled
 
(399,840
)
 
$
54.13

 

Nonvested RSUs as of June 30, 2019
 
8,926,529

 
$
65.36

 
$
1,217,132


Schedule of valuation assumptions, options
The following assumptions were used in the Monte Carlo simulation model to estimate the grant date fair value and the derived service period of the performance options:
Asset volatility
 
40%
Equity volatility
 
45%
Discount rate
 
14%
Stock price at grant date
 
$31.72

Schedule of valuation assumptions, ESOP
Employee Stock Purchase Plan:
 
Three Months Ended
June 30,
 
Six Months Ended
June 30,

 
2019
 
2018
 
2019
 
2018
Expected term (in years)
 
0.50
 
0.50
 
0.50
 
0.50
Expected volatility
 
50.34%
 
39.78%
 
50.34%
 
39.78%
Risk-free interest rate
 
2.43%
 
2.09%
 
2.43%
 
2.09%
Dividend rate
 
—%
 
—%
 
—%
 
—%

Schedule of stock based compensation expense
The Company recorded the total stock-based compensation expense as follows (in thousands). In the three and six months ended June 30, 2019, the stock-based compensation expense associated with awards assumed in the SendGrid acquisition was $26.0 million and $46.7 million, respectively.

 
Three Months Ended
June 30,
 
Six Months Ended
June 30,

 
2019
 
2018
 
2019
 
2018
Cost of revenue
 
$
1,623

 
$
266

 
$
3,432

 
$
488

Research and development
 
33,701

 
9,749

 
59,040

 
17,621

Sales and marketing
 
14,564

 
5,049

 
26,313

 
8,908

General and administrative
 
20,852

 
5,942

 
40,279

 
11,529

Total
 
$
70,740

 
$
21,006

 
$
129,064

 
$
38,546


Employee and nonemployee stock options  
Stock-Based Compensation  
Schedule of stock options activity
Stock Options
 
 
Number of
options
outstanding
 
Weighted-
average
exercise
price
(per share)
 
Weighted-
average
remaining
contractual
term
(in years)
 
Aggregate
intrinsic
value
(in thousands)
Outstanding options as of December 31, 2018
 
7,423,369

 
$
16.07

 
6.80
 
$
534,640

Granted
 
905,180

 
118.41

 

 


Assumed in acquisition
 
2,978,555

 
14.91

 

 


Exercised
 
(2,590,384
)
 
9.75

 

 


Forfeited and canceled
 
(145,770
)
 
26.12

 

 


Outstanding options as of June 30, 2019
 
8,570,950

 
$
28.21

 
7.05
 
$
926,868

Options vested and exercisable as of June 30, 2019
 
4,783,817

 
$
11.50

 
6.03
 
$
597,243


Performance-based stock options  
Stock-Based Compensation  
Schedule of stock options activity The following table summarizes the details of the performance options:

 
Number of
options
outstanding
 
Weighted-
average
exercise
price
(per share)
 
Weighted-
average
remaining
contractual
term
(in years)
 
Aggregate
intrinsic
value
(in thousands)
Outstanding options as of December 31, 2018
 
555,000

 
$
31.72

 
6.00
 
$

Granted
 

 

 

 


Exercised
 

 

 

 


Forfeited and canceled
 

 

 

 


Outstanding options as of June 30, 2019
 
555,000

 
$
31.72

 
4.67
 
$
58,070

Options vested and exercisable as of June 30, 2019
 
265,937

 
$
31.72

 
4.67
 
$
27,825


Employee stock options  
Stock-Based Compensation  
Schedule of valuation assumptions, options
The fair value of employee stock options was estimated on the date of grant using the following assumptions in the Black-Scholes option pricing model:

 
Three Months Ended
June 30,
 
Six Months Ended
June 30,
Employee Stock Options:
 
2019
 
2018
 
2019
 
2018
Fair value of common stock
 
$127.96
 
$41.22
 
$111.32 - $130.65
 
$33.01 - $41.22
Expected term (in years)
 
6.08
 
6.08
 
0.33 - 6.08
 
6.08
Expected volatility
 
49.19%
 
44.16%
 
48.31% - 66.46%
 
44.09% - 44.16%
Risk-free interest rate
 
2.44%
 
2.86%
 
2.39% - 2.51%
 
2.74% - 2.86%
Dividend rate
 
—%
 
—%
 
—%
 
—%

v3.19.2
Net Loss Per Share Attributable to Common Stockholders (Tables)
6 Months Ended
Jun. 30, 2019
Earnings Per Share [Abstract]  
Schedule of the calculation of basic and diluted net loss per share attributable to common stockholders
The following table sets forth the calculation of basic and diluted net loss per share attributable to common stockholders during the periods presented (in thousands, except share and per share data):

 
Three Months Ended
June 30,
 
Six Months Ended
June 30,

 
2019
 
2018
 
2019
 
2018
Net loss attributable to common stockholders
 
$
(92,579
)
 
$
(24,006
)
 
$
(129,082
)
 
$
(47,735
)
Weighted-average shares used to compute net loss per share attributable to common stockholders, basic and diluted
 
129,310,641

 
96,348,356

 
122,985,716

 
95,515,583

Net loss per share attributable to common stockholders, basic and diluted
 
$
(0.72
)
 
$
(0.25
)
 
$
(1.05
)
 
$
(0.50
)

Schedule of common stock equivalents excluded from the computation of the diluted net loss per share attributable to common stockholders
The following outstanding shares of common stock equivalents were excluded from the calculation of the diluted net loss per share attributable to common stockholders because their effect would have been anti-dilutive:

 
As of June 30,

 
2019
 
2018
Stock options issued and outstanding
 
9,125,950

 
9,527,562

Nonvested restricted stock units issued and outstanding
 
8,926,529

 
7,705,589

Class A common stock reserved for Twilio.org
 
776,334

 
635,014

Class A common stock committed under 2016 ESPP
 
101,885

 
131,581

Conversion spread*
 
3,626,721

 

Unvested shares subject to repurchase
 

 
334

Total
 
22,557,419

 
18,000,080

_________
* Since the Company expects to settle the principal amount of its outstanding convertible senior notes in cash and any excess in shares of the Company's Class A common stock, the Company uses the treasury stock method for calculating any potential dilutive effect of the conversion spread on diluted net income per share, if applicable. The conversion spread will have a dilutive impact on diluted net income per share of Class A common stock when the average market price of the Company's Class A common stock for a given period exceeds the conversion price of $70.90 per share for the Notes. The conversion spread is calculated using the average market price of Class A common stock during the period, consistent with the treasury stock method.
v3.19.2
Summary of Significant Accounting Policies - Revenue Recognition (Details) - USD ($)
$ in Millions
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Accounting Policies [Abstract]        
Revenue recognized out of adjusted deferred revenue balance $ 4.7 $ 3.6 $ 15.4 $ 7.2
v3.19.2
Summary of Significant Accounting Policies - Deferred Sales Commissions (Details) - USD ($)
$ in Millions
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Dec. 31, 2018
Deferred Sales Commissions          
Total net capitalized costs $ 17.5   $ 17.5   $ 9.4
Amortization of capitalized costs of obtaining a contract $ 0.9 $ 0.3 $ 1.6 $ 0.5  
Incremental commission costs of obtaining new contracts          
Deferred Sales Commissions          
Amortization period for deferred incremental commission costs of obtaining new contracts 5 years   5 years    
v3.19.2
Summary of Significant Accounting Policies - Recent Accounting Guidance (Details) - USD ($)
$ in Thousands
Jun. 30, 2019
Feb. 28, 2019
Feb. 01, 2019
Jan. 01, 2019
Dec. 31, 2018
Business Acquisition [Line Items]          
Operating right of use asset $ 151,946     $ 123,500 $ 0
Total lease obligations $ 160,677     132,000  
Deferred rent credit       $ 9,000  
SendGrid          
Business Acquisition [Line Items]          
Operating right of use asset   $ 33,742 $ 33,700    
Operating lease liability   32,568 32,600    
Finance lease right of use asset     14,200    
Financing lease liability   $ 13,616 $ 13,600    
v3.19.2
Fair Value Measurements - Assets Measured at Fair Value on a Recurring Basis (Details) - USD ($)
3 Months Ended
Jun. 30, 2019
May 31, 2019
Dec. 31, 2018
Fair Value Measurements, Financial Assets      
Cash and cash equivalents $ 465,309,000   $ 465,217,000
Total amortized cost 1,344,027,000   261,468,000
Marketable securities, accumulated gross unrealized gain, before tax 2,665,000   23,000
Marketable securities, gross unrealized losses less than 12 months (310,000)   (130,000)
Marketable securities, gross unrealized losses more than 12 months (11,000)   (233,000)
Marketable securities, aggregate fair value 1,346,371,000   261,128,000
Strategic investment 5,000,000    
Total financial assets, amortized cost or carrying value 1,814,336,000   726,685,000
Total financial assets 1,816,680,000   726,345,000
Note receivable   $ 5,000,000.0  
Impairment of debt security 0    
U.S. Treasury securities      
Fair Value Measurements, Financial Assets      
Total amortized cost 160,374,000   59,785,000
Marketable securities, accumulated gross unrealized gain, before tax 238,000    
Marketable securities, gross unrealized losses less than 12 months (1,000)   (7,000)
Marketable securities, gross unrealized losses more than 12 months     (9,000)
Marketable securities, aggregate fair value 160,611,000   59,769,000
Corporate debt securities and commercial paper      
Fair Value Measurements, Financial Assets      
Total amortized cost 1,183,653,000   201,683,000
Marketable securities, accumulated gross unrealized gain, before tax 2,427,000   23,000
Marketable securities, gross unrealized losses less than 12 months (309,000)   (123,000)
Marketable securities, gross unrealized losses more than 12 months (11,000)   (224,000)
Marketable securities, aggregate fair value 1,185,760,000   201,359,000
Level 1      
Fair Value Measurements, Financial Assets      
Cash and cash equivalents 275,838,000   420,234,000
Marketable securities, aggregate fair value 165,611,000   59,769,000
Total financial assets 441,449,000   480,003,000
Level 1 | U.S. Treasury securities      
Fair Value Measurements, Financial Assets      
Marketable securities, aggregate fair value 160,611,000   59,769,000
Level 1 | Corporate debt securities and commercial paper      
Fair Value Measurements, Financial Assets      
Marketable securities, aggregate fair value 5,000,000    
Level 2      
Fair Value Measurements, Financial Assets      
Cash and cash equivalents 189,471,000   44,983,000
Marketable securities, aggregate fair value 1,180,760,000   201,359,000
Total financial assets 1,370,231,000   246,342,000
Level 2 | U.S. Treasury securities      
Fair Value Measurements, Financial Assets      
Marketable securities, aggregate fair value 0    
Level 2 | Corporate debt securities and commercial paper      
Fair Value Measurements, Financial Assets      
Marketable securities, aggregate fair value 1,180,760,000   201,359,000
Level 3      
Fair Value Measurements, Financial Assets      
Strategic investment 5,000,000    
Total financial assets 5,000,000    
Carrying Value | Money market funds      
Fair Value Measurements, Financial Assets      
Cash and cash equivalents 275,838,000   420,234,000
Carrying Value | Reverse repurchase agreements      
Fair Value Measurements, Financial Assets      
Cash and cash equivalents 75,000,000   35,000,000
Carrying Value | Commercial paper      
Fair Value Measurements, Financial Assets      
Cash and cash equivalents 114,471,000   9,983,000
Aggregate Fair Value | Money market funds      
Fair Value Measurements, Financial Assets      
Cash and cash equivalents 275,838,000   420,234,000
Aggregate Fair Value | Reverse repurchase agreements      
Fair Value Measurements, Financial Assets      
Cash and cash equivalents 75,000,000.0   35,000,000.0
Aggregate Fair Value | Commercial paper      
Fair Value Measurements, Financial Assets      
Cash and cash equivalents 114,471,000   9,983,000
Aggregate Fair Value | Level 1 | Money market funds      
Fair Value Measurements, Financial Assets      
Cash and cash equivalents 275,838,000   420,234,000
Aggregate Fair Value | Level 2 | Reverse repurchase agreements      
Fair Value Measurements, Financial Assets      
Cash and cash equivalents 75,000,000   35,000,000
Aggregate Fair Value | Level 2 | Commercial paper      
Fair Value Measurements, Financial Assets      
Cash and cash equivalents $ 114,471,000   $ 9,983,000
v3.19.2
Fair Value Measurements - Marketable Securities (Details) - USD ($)
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Dec. 31, 2018
Marketable Securities          
Other-than-temporary impairments associated with credit losses $ 0   $ 0    
Interest earned on marketable securities 2,600,000 $ 700,000 4,100,000 $ 1,400,000  
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]          
Cash and cash equivalents 465,309,000   465,309,000   $ 465,217,000
Aggregate Fair Value | Reverse repurchase agreements          
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]          
Cash and cash equivalents $ 75,000,000.0   $ 75,000,000.0   $ 35,000,000.0
v3.19.2
Fair Value Measurements - Contractual Maturities (Details) - USD ($)
$ in Thousands
Jun. 30, 2019
Dec. 31, 2018
Fair Value Disclosures [Abstract]    
Less than one year, amortized cost $ 687,642 $ 261,468
One to two years, amortized cost 656,385 0
Total amortized cost 1,344,027 261,468
Less than one year, aggregate fair value 688,388 261,128
One to two years, aggregate fair value 657,983 0
Total aggregate fair value $ 1,346,371 $ 261,128
v3.19.2
Fair Value Measurements - Convertible Senior Notes (Details) - Convertible senior notes, 0.25%, due 2023 - USD ($)
$ in Millions
Jun. 30, 2019
Dec. 31, 2018
May 31, 2018
Fair Value Measurements, Liabilities      
Interest rate (as a percent)     0.25%
Level 2      
Fair Value Measurements, Liabilities      
Fair value of the notes $ 1,116.2 $ 743.4  
v3.19.2
Property and Equipment - Property and Equipment, Net (Details) - USD ($)
$ in Thousands
Jun. 30, 2019
Dec. 31, 2018
Property and Equipment    
Total property and equipment $ 167,306 $ 108,270
Less: accumulated depreciation and amortization (60,826) (44,736)
Total property and equipment, net 106,480 63,534
Capitalized internal-use software development costs    
Property and Equipment    
Total property and equipment 85,145 72,647
Data center equipment    
Property and Equipment    
Total property and equipment 14,795 0
Leasehold improvements    
Property and Equipment    
Total property and equipment 33,305 15,293
Office equipment    
Property and Equipment    
Total property and equipment 20,715 13,563
Furniture and fixtures    
Property and Equipment    
Total property and equipment 7,273 4,918
Software    
Property and Equipment    
Total property and equipment $ 6,073 $ 1,849
v3.19.2
Property and Equipment - Depreciation and Amortization Expense (Details) - USD ($)
$ in Millions
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Property, Plant and Equipment [Abstract]        
Depreciation and amortization $ 9.1 $ 4.3 $ 16.7 $ 8.5
v3.19.2
Property and Equipment - Capitalized Software Development Costs (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Property and Equipment        
Capitalized software development costs $ 6,700 $ 6,700 $ 13,700 $ 13,100
Stock-based compensation capitalized in software development costs 1,600 1,500 3,244 2,909
Amortization of capitalized software development costs $ 4,300 $ 3,000 $ 8,100 $ 5,700
v3.19.2
Right-of-Use Asset and Lease Liabilities - Narrative (Details)
$ in Millions
3 Months Ended 6 Months Ended
Jun. 30, 2018
USD ($)
Jun. 30, 2019
USD ($)
property
Jun. 30, 2018
USD ($)
Lessee, Lease, Description [Line Items]      
Number of leased properties | property   19  
Renewal option   5 years  
Operating leases, rent expense $ 2.1   $ 4.2
Minimum      
Lessee, Lease, Description [Line Items]      
Term of lease   1 year  
Maximum      
Lessee, Lease, Description [Line Items]      
Term of lease   10 years  
Leases Commencing Q3 2019      
Lessee, Lease, Description [Line Items]      
Operating lease, not yet commenced, liability   $ 1.8  
Operating lease, not yet commenced, term of contract   2 years  
Leases Commencing Q2 2020      
Lessee, Lease, Description [Line Items]      
Operating lease, not yet commenced, liability   $ 43.6  
Finance lease not yet commenced, liability   $ 0.7  
Lease not yet commenced, term of contract   6 years 9 months 18 days  
v3.19.2
Right-of-Use Asset and Lease Liabilities - Components of Lease Expense (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2019
Leases [Abstract]    
Operating lease cost $ 8,273 $ 15,446
Finance Lease, Cost [Abstract]    
Amortization of assets 1,526 2,689
Interest on lease liabilities 189 337
Short-term lease cost 1,905 3,340
Variable lease cost 1,080 1,567
Total net lease cost $ 12,973 $ 23,379
v3.19.2
Right-of-Use Asset and Lease Liabilities - Balance Sheet Classification of Lease Assets and Liabilities (Details) - USD ($)
$ in Thousands
Jun. 30, 2019
Jan. 01, 2019
Dec. 31, 2018
ASSETS      
Operating lease assets $ 151,946 $ 123,500 $ 0
Finance lease assets 12,970    
Total leased assets 164,916    
Current liabilities:      
Operating 21,858   0
Finance 5,920   0
Noncurrent liabilities      
Operating 138,819   0
Finance 7,752   $ 0
Total lease liabilities 174,349    
Operating lease accumulated amortization 10,800    
Finance lease accumulated depreciation $ 2,700    
v3.19.2
Right-of-Use Asset and Lease Liabilities - Supplemental Cash Flows (Details)
$ in Thousands
6 Months Ended
Jun. 30, 2019
USD ($)
Cash paid for amounts included in the measurement of lease liabilities:  
Operating cash flows from operating leases $ 12,145
Operating cash flows from finance leases 337
Financing cash flows from finance leases $ 2,463
Weighted Average Remaining Lease Term [Abstract]  
Operating leases 6 years 9 months 18 days
Finance leases 3 years 1 month 6 days
Weighted Average Discount Rate [Abstract]  
Operating leases 5.80%
Finance leases 5.20%
v3.19.2
Right-of-Use Asset and Lease Liabilities - Lease Maturities (Details) - USD ($)
$ in Thousands
Jun. 30, 2019
Jan. 01, 2019
Dec. 31, 2018
Maturity Of Operating Lease Liabilities      
2019 (remaining six months) $ 14,523    
2020 30,523    
2021 28,791    
2022 28,249    
2023 27,762    
Thereafter 68,106    
Total lease payments 197,954    
Less: imputed interest (37,277)    
Total lease obligations 160,677 $ 132,000  
Less: current obligations (21,858)   $ 0
Long-term lease obligations 138,819   0
Maturity Of Finance Lease Liabilities      
2019 (remaining six months) 3,278    
2020 6,015    
2021 3,130    
2022 807    
2023 413    
Thereafter 1,316    
Total lease payments 14,959    
Less: imputed interest (1,287)    
Total lease obligations 13,672    
Less: current obligations (5,920)   0
Long-term lease obligations $ 7,752   $ 0
v3.19.2
Right-of-Use Asset and Lease Liabilities - Lease Maturities Prior To Adoption of New Lease Standard (Details)
$ in Thousands
Dec. 31, 2018
USD ($)
Operating Leases  
2019 $ 24,128
2020 29,527
2021 30,898
2022 30,492
2023 30,122
Thereafter 81,316
Total minimum lease payments 226,483
Finance Leases  
2019 306
2020 512
2021 573
2022 590
2023 608
Thereafter 1,939
Total minimum lease payments $ 4,528
v3.19.2
Business Combinations - Consideration (Details) - USD ($)
$ in Thousands
1 Months Ended 3 Months Ended 6 Months Ended
Jun. 30, 2019
Feb. 28, 2019
Jun. 30, 2019
Mar. 31, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Acquisition              
Amount held for tax liabilities $ 200            
Goodwill, purchase accounting adjustments           $ (2,843,392) $ 0
Fair value of the pre-combination service through equity awards     $ (7,126) $ 191,620      
Release of valuation allowance on deferred tax assets     600     48,600  
Capio              
Acquisition              
Total purchase price, as adjusted 14,400            
Amount of purchase price placed into an escrow account $ 4,000            
Escrow effective period 18 months            
Grants (in shares) 43,556            
Aggregate value $ 5,900   5,900     5,900  
Weighted average remaining contractual term (in years) 3 years            
Net deferred tax liability $ 800   800     800  
Acquisition related costs           800  
Release of valuation allowance on deferred tax assets     700        
SendGrid              
Acquisition              
Total purchase price, as adjusted   $ 2,843,392          
Net deferred tax liability   $ 57,167          
Acquisition related costs     500   $ 500 39,900 $ 12,900
Shares issuable as part of acquisition (in shares)   23,600,000          
Fair value of Class A common stock transferred   $ 2,658,898          
Goodwill, purchase accounting adjustments     7,100        
Goodwill, transfers     7,000        
Fair value of the pre-combination service through equity awards   $ 184,494          
Revenues     45,900     74,500  
General and administrative | SendGrid              
Acquisition              
Acquisition related costs     $ 500     $ 12,900  
v3.19.2
Business Combinations - Purchase Price Allocation (Details) - USD ($)
$ in Thousands
Jun. 30, 2019
Feb. 28, 2019
Feb. 01, 2019
Dec. 31, 2018
Acquisition        
Goodwill $ 2,283,578     $ 38,165
Capio        
Acquisition        
Net tangible liabilities assumed (542)      
Intangible assets 7,610      
Goodwill 7,343      
Deferred tax liability (800)      
Total purchase price 14,411      
SendGrid        
Acquisition        
Cash and cash equivalents   $ 156,783    
Accounts receivable and other current assets   11,636    
Property and equipment, net   38,350    
Operating right of use asset   33,742 $ 33,700  
Intangible assets $ 483,000 483,000    
Other assets   1,664    
Goodwill   2,238,070    
Accounts payable and other liabilities   (11,115)    
Operating lease liability   (32,568) (32,600)  
Financing lease liability   (13,616) $ (13,600)  
Note payable   (5,387)    
Deferred tax liability   (57,167)    
Total purchase price   $ 2,843,392    
v3.19.2
Business Combinations - Identifiable Finite-lived Intangible Assets (Details) - USD ($)
$ in Thousands
1 Months Ended
Jun. 30, 2019
Feb. 28, 2019
Capio    
Acquisition    
Intangible assets $ 7,610  
Capio | Developed technology    
Acquisition    
Intangible assets $ 6,390  
Estimated life (in years) 6 years  
Capio | Customer relationships    
Acquisition    
Intangible assets $ 1,220  
Estimated life (in years) 4 years  
SendGrid    
Acquisition    
Intangible assets $ 483,000 $ 483,000
SendGrid | Developed technology    
Acquisition    
Intangible assets 294,000  
Estimated life (in years)   7 years
SendGrid | Customer relationships    
Acquisition    
Intangible assets 169,000  
Estimated life (in years)   7 years
SendGrid | Trade names    
Acquisition    
Intangible assets $ 20,000  
Estimated life (in years)   5 years
v3.19.2
Business Combinations - Pro Forma Information (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Business Acquisition [Line Items]        
Release of valuation allowance on deferred tax assets $ 600   $ 48,600  
Valuation allowance     53,502 $ 0
Revenue 275,039 $ 183,429 521,924 345,114
Net loss attributable to common stockholders (82,880) (53,858) (155,840) (73,339)
SendGrid        
Business Acquisition [Line Items]        
Acquisition related costs 500 $ 500 39,900 12,900
Valuation allowance (2,600)     $ 53,500
SendGrid | General and administrative        
Business Acquisition [Line Items]        
Acquisition related costs $ 500   $ 12,900  
v3.19.2
Goodwill and Intangible Assets - Goodwill Rollforward (Details)
$ in Thousands
6 Months Ended
Jun. 30, 2019
USD ($)
Goodwill  
Balance (beginning of period) $ 38,165
Goodwill additions related to 2019 acquisitions 2,246,398
Measurement period adjustments (985)
Balance (end of period) $ 2,283,578
v3.19.2
Goodwill and Intangible Assets - Intangible Assets (Details) - USD ($)
$ in Thousands
Jun. 30, 2019
Dec. 31, 2018
Amortizable intangible assets:    
Gross $ 532,167 $ 41,382
Accumulated Amortization (47,052) (14,119)
Net 485,115 27,263
Intangible assets, gross 532,462 41,677
Total 485,410 27,558
Domain names    
Amortizable intangible assets:    
Non-amortizable intangible assets: 32 32
Trademarks    
Amortizable intangible assets:    
Non-amortizable intangible assets: 263 263
Developed technology    
Amortizable intangible assets:    
Gross 328,598 28,209
Accumulated Amortization (30,581) (10,497)
Net 298,017 17,712
Customer relationships    
Amortizable intangible assets:    
Gross 178,374 8,153
Accumulated Amortization (13,280) (2,411)
Net 165,094 5,742
Supplier relationships    
Amortizable intangible assets:    
Gross 2,696 2,696
Accumulated Amortization (1,240) (973)
Net 1,456 1,723
Trade names    
Amortizable intangible assets:    
Gross 20,060 60
Accumulated Amortization (1,727) (60)
Net 18,333 0
Patent    
Amortizable intangible assets:    
Gross 2,439 2,264
Accumulated Amortization (224) (178)
Net $ 2,215 $ 2,086
v3.19.2
Goodwill and Intangible Assets - Amortization Expense (Details) - USD ($)
$ in Millions
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Goodwill and Intangible Assets Disclosure [Abstract]        
Amortization expense $ 19.3 $ 1.4 $ 32.9 $ 2.8
v3.19.2
Goodwill and Intangible Assets - Total Estimated Future Amortization Expense (Details) - USD ($)
$ in Thousands
Jun. 30, 2019
Dec. 31, 2018
Intangible Assets    
2019 (remaining six months) $ 39,878  
2020 77,882  
2021 76,371  
2022 74,976  
2023 72,786  
Thereafter 143,222  
Net $ 485,115 $ 27,263
v3.19.2
Accrued Expenses and Other Liabilities - Accrued Expenses and Other Liabilities (Details) - USD ($)
$ in Thousands
Jun. 30, 2019
Dec. 31, 2018
Accrued Liabilities and Other Liabilities [Abstract]    
Accrued payroll and related $ 15,717 $ 9,886
Accrued bonus and commission 8,974 8,564
Accrued cost of revenue 34,523 29,901
Sales and other taxes payable 27,499 23,631
ESPP contributions 4,004 2,672
Deferred rent 0 1,418
VAT liability 2,528 2,217
Acquisition holdback 2,240 0
Accrued other expense 22,140 18,054
Total accrued expenses and other current liabilities $ 117,625 $ 96,343
v3.19.2
Accrued Expenses and Other Liabilities - Long-term Liabilities (Details) - USD ($)
$ in Thousands
Jun. 30, 2019
Dec. 31, 2018
Accrued Liabilities and Other Liabilities [Abstract]    
Deferred rent $ 0 $ 7,569
Deferred tax liability 9,077 5,181
Acquisition holdback 4,280 2,290
Capital lease obligation 0 2,170
Accrued other expense 2,122 959
Total other long-term liabilities $ 15,479 $ 18,169
v3.19.2
Notes Payable - Issuance (Details) - USD ($)
1 Months Ended
May 31, 2018
Jun. 30, 2019
Dec. 31, 2018
Convertible senior notes, 0.25%, due 2023      
Debt Instrument [Line Items]      
Aggregate principal amount   $ 550,000,000 $ 550,000,000.0
Interest rate (as a percent) 0.25%    
Net proceeds from the debt offering $ 537,000,000.0    
Convertible senior notes, 0.25%, due 2023 - over-allotment      
Debt Instrument [Line Items]      
Aggregate principal amount $ 75,000,000.0    
v3.19.2
Notes Payable - Terms (Details)
$ / shares in Units, $ in Thousands
1 Months Ended 6 Months Ended
May 31, 2018
USD ($)
$ / shares
Jun. 30, 2019
USD ($)
D
$ / shares
Dec. 31, 2018
USD ($)
$ / shares
Debt Instrument [Line Items]      
Common stock, par value (in dollars per share) | $ / shares   $ 0.001  
Effective percentage   5.70%  
Common Class A      
Debt Instrument [Line Items]      
Common stock, par value (in dollars per share) | $ / shares $ 0.001 $ 0.001 $ 0.001
Convertible senior notes, 0.25%, due 2023      
Debt Instrument [Line Items]      
Threshold trading days | D   20  
Consecutive trading period | D   30  
Minimum sale price of stock as a percentage of the conversion price   130.00%  
Number of consecutive trading days of threshold Notes trading price for conversion eligibility to follow | D   5  
Trading price as a percentage of the product of common stock sale price and conversion rate   98.00%  
Percentage of principal amount of the Notes   100.00%  
Interest rate (as a percent) 0.25%    
Carrying amount of equity component | $   $ 119,435 $ 119,435
Debt issuance costs | $ $ 10,200 $ 8,104 $ 9,020
Convertible senior notes, 0.25%, due 2023 | Common Class A      
Debt Instrument [Line Items]      
Conversion ratio 14.1040    
Capped calls      
Debt Instrument [Line Items]      
Initial strike price (in dollars per share) | $ / shares $ 70.90    
v3.19.2
Notes Payable - Net Carrying Amount (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended 12 Months Ended
Jun. 30, 2019
Jun. 30, 2019
Dec. 31, 2018
May 31, 2018
Net carrying amount of the equity component of the Notes        
Issuance costs $ (953)      
Convertible senior notes, 0.25%, due 2023        
Net carrying amount of the liability component of the Notes        
Aggregate principal amount 550,000 $ 550,000 $ 550,000  
Unamortized discount (95,719) (95,719) (106,484)  
Unamortized issuance costs (8,104) (8,104) (9,020) $ (10,200)
Net carrying amount 446,177 446,177 434,496  
Net carrying amount of the equity component of the Notes        
Proceeds allocated to the conversion options (debt discount) 119,435 119,435 119,435  
Issuance costs   (2,819) (2,819)  
Net carrying amount $ 116,616 $ 116,616 $ 116,616  
v3.19.2
Notes Payable - Interest Expense (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Interest expense recognized related to the Notes        
Amortization of debt issuance costs     $ 11,682 $ 2,695
Convertible senior notes, 0.25%, due 2023        
Interest expense recognized related to the Notes        
Contractual interest expense $ 344 $ 164 688 164
Amortization of debt issuance costs 458 211 916 211
Amortization of debt discount 5,383 2,484 10,766 2,484
Total interest expense related to the Notes $ 6,185 $ 2,859 $ 12,370 $ 2,859
v3.19.2
Notes Payable - Capped Calls (Details) - USD ($)
$ / shares in Units, $ in Thousands
1 Months Ended 6 Months Ended
May 31, 2018
Jun. 30, 2019
Jun. 30, 2018
Capped calls      
Net cost to purchase the transactions   $ 0 $ 58,465
Capped calls      
Capped calls      
Initial strike price (in dollars per share) $ 70.90    
Initial cap price (in dollars per share) $ 105.04    
Number of shares covered 7,757,200    
Net cost to purchase the transactions $ 58,500    
v3.19.2
Notes Payable - Note Payable (Details)
$ in Thousands
Jun. 30, 2019
USD ($)
Debt Instrument [Line Items]  
Effective percentage 5.70%
SendGrid  
Debt Instrument [Line Items]  
Note payable $ 4,400
Effective percentage 6.60%
Notes Payable  
Principal  
2019 (remaining six months) $ 1,036
2020 2,176
2021 1,144
Net carrying amount 4,356
Interest  
2019 (remaining six months) 129
2020 153
2021 22
Total interest $ 304
v3.19.2
Supplemental Balance Sheet Information - Allowance for Doubtful Accounts (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Allowance for doubtful accounts        
Balance, beginning of period $ 4,281 $ 1,404 $ 4,945 $ 1,033
Additions 685 1,140 381 1,515
Assumed in acquisition 0 0 59 0
Write-offs (193) (8) (612) (12)
Balance, end of period $ 4,773 $ 2,536 $ 4,773 $ 2,536
v3.19.2
Supplemental Balance Sheet Information - Sales Credit Reserve (Details) - Sales credit reserve - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Sales credit reserve        
Balance, beginning of period $ 2,831 $ 1,702 $ 3,015 $ 1,761
Additions 2,862 1,544 5,266 2,651
Assumed in acquisition 0 0 277 0
Deductions against reserve (2,617) (621) (5,482) (1,787)
Balance, end of period $ 3,076 $ 2,625 $ 3,076 $ 2,625
v3.19.2
Revenue by Geographic Area - Revenue by Geographic Area (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Revenue by geographic area        
Revenue $ 275,039 $ 147,754 $ 508,178 $ 276,870
United States        
Revenue by geographic area        
Revenue 194,998 111,244 361,551 209,879
International        
Revenue by geographic area        
Revenue $ 80,041 $ 36,510 $ 146,627 $ 66,991
v3.19.2
Revenue by Geographic Area - Percentage of Revenue by Geographic Area (Details) - Revenue from Contract with Customer Benchmark - Geographic Concentration Risk
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
United States        
Percentage of revenue by geographic area        
Percentage of revenue (as a percent) 71.00% 75.00% 71.00% 76.00%
International        
Percentage of revenue by geographic area        
Percentage of revenue (as a percent) 29.00% 25.00% 29.00% 24.00%
v3.19.2
Commitments and Contingencies - Other Commitments (Details) - USD ($)
$ in Millions
1 Months Ended 3 Months Ended 6 Months Ended
Feb. 28, 2019
Jun. 30, 2019
Jun. 30, 2019
Long-term Purchase Commitment [Line Items]      
Total purchase commitments   $ 9.7 $ 11.1
SendGrid      
Long-term Purchase Commitment [Line Items]      
Purchase obligation $ 21.8    
Term of non-cancellable agreement 2 years 10 months 24 days    
Minimum      
Long-term Purchase Commitment [Line Items]      
Term of lease   1 year 1 year
Term of non-cancellable agreement   2 years 2 years
Maximum      
Long-term Purchase Commitment [Line Items]      
Term of lease   10 years 10 years
Term of non-cancellable agreement   4 years 4 years
v3.19.2
Commitments and Contingencies - Legal Matters (Details)
$ in Millions
Jan. 07, 2019
USD ($)
Jun. 30, 2019
USD ($)
Jan. 02, 2018
class
Legal Matters      
Settlement awarded to other party $ 10.0    
Estimated probable loss   $ 1.7  
Pending Litigation      
Legal Matters      
Number of classes of individuals who allegedly sent or received certain communications | class     2
Number of customers' accounts involved in the complaint     3
v3.19.2
Commitments and Contingencies - Indemnification Agreements (Details) - USD ($)
Jun. 30, 2019
Dec. 31, 2018
Indemnification Agreements    
Loss Contingencies [Line Items]    
Amount accrued $ 0 $ 0
v3.19.2
Commitments and Contingencies - Other taxes (Details) - USD ($)
$ in Millions
Jun. 30, 2019
Dec. 31, 2018
Commitments and Contingencies Disclosure [Abstract]    
Liability for uncertain tax positions $ 26.1 $ 22.6
v3.19.2
Stockholders' Equity - Preferred Stock (Details) - $ / shares
Jun. 30, 2019
Dec. 31, 2018
Preferred Stock    
Preferred stock, authorized (in shares) 100,000,000 100,000,000
Preferred stock, par value (in dollars per share) $ 0.001 $ 0.001
Preferred stock, issued (in shares) 0 0
Preferred stock, outstanding (in shares) 0 0
v3.19.2
Stockholders' Equity - Common Stock (Details)
Jun. 30, 2019
Vote
$ / shares
shares
Dec. 31, 2018
$ / shares
shares
May 31, 2018
$ / shares
Common Stock      
Common stock, par value (in dollars per share) | $ / shares $ 0.001    
Common Class A      
Common Stock      
Common stock, authorized (in shares) 1,000,000,000 1,000,000,000  
Common stock, par value (in dollars per share) | $ / shares $ 0.001 $ 0.001 $ 0.001
Common stock, issued (in shares) 121,377,614 80,769,763  
Common stock, outstanding (in shares) 121,377,614 80,769,763  
Votes per share | Vote 1    
Common Class B      
Common Stock      
Common stock, authorized (in shares) 100,000,000 100,000,000  
Common stock, par value (in dollars per share) | $ / shares $ 0.001 $ 0.001  
Common stock, issued (in shares) 14,384,746 19,310,465  
Common stock, outstanding (in shares) 14,384,746 19,310,465  
Votes per share | Vote 10    
v3.19.2
Stockholders' Equity - Common Stock Shares Reserved (Details) - shares
Jun. 30, 2019
Dec. 31, 2018
Stockholders' Equity    
Total 49,013,589 39,692,245
2016 Stock Option and Incentive Plan    
Stockholders' Equity    
Stock-based awards available for grant under 2016 Plan 15,727,925 9,313,354
Common Class A    
Stockholders' Equity    
Class A common stock reserved for Twilio.org 776,334 572,676
Class A common stock reserved for the convertible senior notes 10,472,165 10,472,165
Stock options issued and outstanding    
Stockholders' Equity    
Stock options issued and outstanding 9,125,950 7,978,369
Nonvested restricted stock units issued and outstanding    
Stockholders' Equity    
Nonvested restricted stock units issued and outstanding 8,926,529 8,262,902
Class A common stock committed under 2016 ESPP    
Stockholders' Equity    
Stock-based awards available for grant under 2016 Plan 3,984,686 3,092,779
v3.19.2
Stockholders' Equity Stockholders' Equity - Follow-on Public Offering (Details) - USD ($)
$ / shares in Units, $ in Thousands
1 Months Ended 3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2019
Jun. 30, 2019
Jun. 30, 2018
Class of Stock [Line Items]        
Stock price at grant date (in dollars per share) $ 124.00 $ 124.00 $ 124.00  
Proceeds from a public offering, net of underwriting discount $ 979,000   $ 980,000 $ 0
Common Class A | Follow-on Public Offering        
Class of Stock [Line Items]        
Shares sold (in shares) 8,064,515 8,064,515    
Common Class A | Over-Allotment Option, FPO        
Class of Stock [Line Items]        
Shares sold (in shares) 1,051,893      
v3.19.2
Stock-Based Compensation - 2008 Stock Option Plan (Details)
Jun. 30, 2019
shares
2008 Stock Option Plan  
Stock Based Compensation  
Shares available for future issuance (in shares) 0
v3.19.2
Stock-Based Compensation - 2016 Stock Option Plan (Details) - shares
6 Months Ended
Jan. 01, 2019
Jan. 01, 2018
Jun. 30, 2019
Jun. 21, 2016
Stock Based Compensation        
Increase in shares available for grant (in shares) 1,000,802 939,698    
Employee and nonemployee stock options        
Stock Based Compensation        
Expiration term     10 years  
Employee and nonemployee stock options | New Hires        
Stock Based Compensation        
Vesting period     4 years  
Employee and nonemployee stock options | First vesting | New Hires        
Stock Based Compensation        
Percentage of vesting rights     25.00%  
Vesting period     1 year  
Nonvested restricted stock units issued and outstanding        
Stock Based Compensation        
Vesting period     4 years  
Nonvested restricted stock units issued and outstanding | First vesting | New Hires        
Stock Based Compensation        
Percentage of vesting rights     25.00%  
Vesting period     1 year  
2016 Stock Option and Incentive Plan        
Stock Based Compensation        
Maximum automatic annual increase as a percentage of outstanding common shares     5.00%  
Increase in shares available for grant (in shares) 5,004,011 4,698,490    
2016 Stock Option and Incentive Plan | Common Class A        
Stock Based Compensation        
Shares reserved for issuance (in shares)       11,500,000
2016 Stock Option and Incentive Plan | Employee and nonemployee stock options        
Stock Based Compensation        
Minimum grant price as a percentage of fair market value per share of the underlying common stock on the date of grant (as a percent)     100.00%  
v3.19.2
Stock-Based Compensation - 2016 Employee Stock Purchase Plan (Details) - USD ($)
$ in Millions
3 Months Ended 6 Months Ended
Jan. 01, 2019
Jan. 01, 2018
Dec. 31, 2019
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 21, 2016
Stock Based Compensation              
Increase in shares available for grant (in shares) 1,000,802 939,698          
Unrecognized compensation cost, other than options       $ 3.2   $ 3.2  
Weighted-average period (in years)           4 months 24 days  
Class A common stock committed under 2016 ESPP              
Stock Based Compensation              
Maximum automatic annual increase as a percentage of outstanding common shares       1.00%   1.00%  
Maximum automatic annual increase (in shares)       1,800,000   1,800,000  
Common Class A | Class A common stock committed under 2016 ESPP              
Stock Based Compensation              
Shares reserved for issuance (in shares)             2,400,000
Discount from market price, offering date (as a percent)           15.00%  
Discount from market price, purchase date (as a percent)           15.00%  
Purchase price, percentage of fair market value (as a percent)           85.00%  
Shares purchased (in shares)       108,895 201,581    
Scenario, Forecast              
Stock Based Compensation              
Shares purchased (in shares)     101,885        
v3.19.2
Stock-Based Compensation - Stock Option Activity (Details) - Employee and nonemployee stock options
$ / shares in Units, $ in Thousands
6 Months Ended 12 Months Ended
Jun. 30, 2019
USD ($)
$ / shares
shares
Dec. 31, 2018
USD ($)
$ / shares
shares
Number of options outstanding    
Outstanding options as of the beginning of the period (in shares) | shares 7,423,369  
Granted (in shares) | shares 905,180  
Assumed in acquisition (in shares) | shares 2,978,555  
Exercised (in shares) | shares (2,590,384)  
Forfeited and cancelled (in shares) | shares (145,770)  
Outstanding options as of the end of the period (in shares) | shares 8,570,950 7,423,369
Weighted- average exercise price (per share)    
Outstanding options as of the beginning of the period (in dollars per share) | $ / shares $ 16.07  
Granted (in dollars per share) | $ / shares 118.41  
Assumed in acquisition (in dollars per share) | $ / shares 14.91  
Exercised (in dollars per share) | $ / shares 9.75  
Forfeited and cancelled (in dollars per share) | $ / shares 26.12  
Outstanding options as of the end of the period (in dollars per share) | $ / shares $ 28.21 $ 16.07
Weighted- average remaining contractual term (in years)    
Weighted-average remaining contractual term (in years) 7 years 18 days 6 years 9 months 18 days
Aggregate intrinsic value | $ $ 926,868 $ 534,640
Options vested and exercisable and options vested and expected to vest    
Options vested and exercisable - number of options outstanding (in shares) | shares 4,783,817  
Options vested and exercisable - weighted-average exercise price (in dollars per share) | $ / shares $ 11.50  
Options vested and exercisable - weighted-average remaining contractual term 6 years 10 days  
Options vested and exercisable - aggregate intrinsic value | $ $ 597,243  
v3.19.2
Stock-Based Compensation - Stock Options - Additional Information (Details) - Employee and nonemployee stock options - USD ($)
$ / shares in Units, $ in Millions
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Stock Based Compensation        
Aggregate intrinsic value of stock options exercised $ 100.8 $ 43.4 $ 287.8 $ 74.5
Grant date fair value of options vested $ 19.5 $ 4.8 $ 42.5 $ 12.8
Weighted-average grant date fair value of options granted (in dollars per share) $ 63.4 $ 19.1 $ 58.2 $ 15.7
v3.19.2
Stock-Based Compensation - Performance-Based Stock Options (Details)
$ / shares in Units, $ in Thousands
6 Months Ended 12 Months Ended
Feb. 28, 2017
USD ($)
$ / shares
shares
Jun. 30, 2019
USD ($)
$ / shares
shares
Dec. 31, 2018
USD ($)
$ / shares
shares
Performance-based stock options      
Stock-Based Compensation      
Number of distinct awards 3    
Total grant value | $ $ 5,900    
Vesting period upon satisfaction of performance condition 2 years    
Performance condition achievement window 4 years 3 months 18 days    
Expiration term 7 years    
Number of options outstanding      
Outstanding options as of the beginning of the period (in shares) | shares   555,000  
Granted (in shares) | shares 555,000 0  
Exercised (in shares) | shares   0  
Forfeited and cancelled (in shares) | shares   0  
Outstanding options as of the end of the period (in shares) | shares   555,000 555,000
Weighted- average exercise price (per share)      
Outstanding options as of the beginning of the period (in dollars per share)   $ 31.72  
Granted (in dollars per share)   0  
Exercised (in dollars per share)   0  
Forfeited and cancelled (in dollars per share)   0  
Outstanding options as of the end of the period (in dollars per share)   $ 31.72 $ 31.72
Weighted-average remaining contractual term      
Weighted-average remaining contractual term (in years)   4 years 8 months 1 day 6 years
Aggregate intrinsic value | $   $ 58,070 $ 0
Options vested and exercisable      
Options vested and exercisable - number of options outstanding (in shares) | shares   265,937  
Options vested and exercisable - weighted-average exercise price (in dollars per share)   $ 31.72  
Options vested and exercisable - weighted-average remaining contractual term   4 years 8 months 1 day  
Options vested and exercisable - aggregate intrinsic value | $   $ 27,825  
$13.48 grant date fair value      
Stock-Based Compensation      
Grant date fair value (in dollars per share) $ 13.48    
Derived service period as adjusted 3 years 1 month 6 days    
$10.26 grant date fair value      
Stock-Based Compensation      
Grant date fair value (in dollars per share) $ 10.26    
Derived service period as adjusted 3 years 10 months 24 days    
$8.41 grant date fair value      
Stock-Based Compensation      
Grant date fair value (in dollars per share) $ 8.41    
Derived service period as adjusted 4 years 7 months 6 days    
v3.19.2
Stock-Based Compensation - Stock Options - Unrecognized Compensation Cost (Details)
$ in Millions
6 Months Ended
Jun. 30, 2019
USD ($)
Stock Based Compensation  
Weighted-average period (in years) 4 months 24 days
Stock options issued and outstanding  
Stock Based Compensation  
Unrecognized compensation cost, options $ 155.2
Weighted-average period (in years) 2 years 2 months 12 days
v3.19.2
Stock-Based Compensation - Restricted Stock Units Activity (Details) - Nonvested restricted stock units issued and outstanding - USD ($)
$ / shares in Units, $ in Thousands
6 Months Ended
Jun. 30, 2019
Dec. 31, 2018
Number of awards outstanding    
Nonvested RSUs at the beginning of the period (in shares) 8,262,902  
Granted (in shares) 1,886,838  
Assumed in SendGrid acquisition (in shares) 561,999  
Vested (in shares) (1,385,370)  
Forfeited and canceled (in shares) (399,840)  
Nonvested RSUs at the end of the period (in shares) 8,926,529  
Weighted- average grant date fair value (per share)    
Nonvested RSUs at the beginning of the period (in dollars per share) $ 42.70  
Granted (in dollars per share) 125.14  
Assumed in SendGrid acquisition (in dollars per share) 112.88  
Vested (in dollars per share) 40.32  
Forfeited and canceled (in dollars per share) 54.13  
Nonvested RSUs at the end of the period (in dollars per share) $ 65.36  
Aggregate intrinsic value (in thousands)    
Aggregate intrinsic value $ 1,217,132 $ 729,373
v3.19.2
Stock-Based Compensation - Restricted Stock Units - Unrecognized Compensation Cost (Details)
$ in Millions
6 Months Ended
Jun. 30, 2019
USD ($)
Stock Based Compensation  
Unrecognized compensation cost, other than options $ 3.2
Weighted-average period (in years) 4 months 24 days
Nonvested restricted stock units issued and outstanding  
Stock Based Compensation  
Unrecognized compensation cost, other than options $ 532.0
Weighted-average period (in years) 2 years 10 months 24 days
v3.19.2
Stock-Based Compensation - Valuation Assumptions (Details) - $ / shares
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Valuation Assumptions        
Stock price at grant date (in dollars per share) $ 124.00   $ 124.00  
Employee stock options        
Valuation Assumptions        
Fair value of common stock (in dollars per share) $ 127.96 $ 41.22    
Expected term (in years) 6 years 1 month 6 days 6 years 1 month 6 days   6 years 1 month 6 days
Expected volatility, low end of range (as a percent) 49.19% 44.16% 48.31% 44.09%
Expected volatility, high end of range (as a percent) 49.19% 44.16% 66.46% 44.16%
Risk-free interest rate, low end of range (as a percent) 2.44% 2.86% 2.39% 2.74%
Risk-free interest rate, high end of range (as a percent) 2.44% 2.86% 2.51% 2.86%
Dividend rate (as a percent) 0.00% 0.00% 0.00% 0.00%
Class A common stock committed under 2016 ESPP        
Valuation Assumptions        
Expected term (in years) 6 months 6 months 6 months 6 months
Expected volatility, high end of range (as a percent) 50.34% 39.78% 50.34% 39.78%
Risk-free interest rate, high end of range (as a percent) 2.43% 2.09% 2.43% 2.09%
Dividend rate (as a percent) 0.00% 0.00% 0.00% 0.00%
Performance-based stock options        
Valuation Assumptions        
Asset volatility (as a percent)     40.00%  
Equity volatility (as a percent)     45.00%  
Discount rate (as a percent)     14.00%  
Stock price at grant date (in dollars per share) $ 31.72   $ 31.72  
Minimum | Employee stock options        
Valuation Assumptions        
Fair value of common stock (in dollars per share)     $ 111.32 $ 33.01
Expected term (in years)     3 months 18 days  
Maximum | Employee stock options        
Valuation Assumptions        
Fair value of common stock (in dollars per share)     $ 130.65 $ 44.12
Expected term (in years)     6 years 1 month 6 days  
v3.19.2
Stock-Based Compensation - Stock-Based Compensation Expense (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Stock-Based Compensation Expense        
Stock-based compensation expense $ 70,740 $ 21,006 $ 129,064 $ 38,546
Cost of revenue        
Stock-Based Compensation Expense        
Stock-based compensation expense 1,623 266 3,432 488
Research and development        
Stock-Based Compensation Expense        
Stock-based compensation expense 33,701 9,749 59,040 17,621
Sales and marketing        
Stock-Based Compensation Expense        
Stock-based compensation expense 14,564 5,049 26,313 8,908
General and administrative        
Stock-Based Compensation Expense        
Stock-based compensation expense 20,852 $ 5,942 40,279 $ 11,529
SendGrid        
Stock-Based Compensation Expense        
Stock-based compensation expense $ 26,000   $ 46,700  
v3.19.2
Net Loss per Share Attributable to Common Stockholders - General Information (Details)
Jun. 30, 2019
Vote
Common Class A  
Net Loss Per Share Attributable to Common Stockholders  
Votes per share 1
Common Class B  
Net Loss Per Share Attributable to Common Stockholders  
Votes per share 10
v3.19.2
Net Loss Per Share Attributable to Common Stockholders - Basic and Diluted Net Loss per Share Attributable to Common Stockholders (Details) - USD ($)
$ / shares in Units, $ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Net Loss Per Share Attributable to Common Stockholders        
Net loss attributable to common stockholders $ (92,579) $ (24,006) $ (129,082) $ (47,735)
Weighted-average shares used to compute net loss per share attributable to common stockholders, basic and diluted 129,310,641 96,348,356 122,985,716 95,515,583
Net loss per share attributable to common stockholders, basic and diluted (in dollars per share) $ (0.72) $ (0.25) $ (1.05) $ (0.50)
v3.19.2
Net Loss Per Share Attributable to Common Stockholders - Anti-Dilutive Securities (Details) - $ / shares
6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Anti-dilutive securities    
Total 22,557,419 18,000,080
Conversion price (in dollars per share) $ 70.90  
Stock options issued and outstanding    
Anti-dilutive securities    
Total 9,125,950 9,527,562
Nonvested restricted stock units issued and outstanding    
Anti-dilutive securities    
Total 8,926,529 7,705,589
Class A common stock reserved for Twilio.org    
Anti-dilutive securities    
Total 776,334 635,014
Class A common stock committed under 2016 ESPP    
Anti-dilutive securities    
Total 101,885 131,581
Conversion spread    
Anti-dilutive securities    
Total 3,626,721 0
Unvested shares subject to repurchase    
Anti-dilutive securities    
Total 0 334
v3.19.2
Income Taxes (Details) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2019
Jun. 30, 2018
Jun. 30, 2019
Jun. 30, 2018
Income Tax Disclosure [Abstract]        
Income tax benefit (provision) $ 2,033 $ (150) $ 53,754 $ (287)
Decrease in valuation allowance 1,100   52,700  
Valuation Allowance [Line Items]        
Release of valuation allowance on deferred tax assets 600   $ 48,600  
Capio        
Valuation Allowance [Line Items]        
Release of valuation allowance on deferred tax assets $ 700