<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2018-05-15</periodOfReport>

    <issuer>
        <issuerCik>0001447669</issuerCik>
        <issuerName>TWILIO INC</issuerName>
        <issuerTradingSymbol>TWLO</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001665731</rptOwnerCik>
            <rptOwnerName>Kirkpatrick Lee</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O TWILIO INC.</rptOwnerStreet1>
            <rptOwnerStreet2>375 BEALE STREET, SUITE 300</rptOwnerStreet2>
            <rptOwnerCity>SAN FRANCISCO</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>94105</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isOfficer>1</isOfficer>
            <officerTitle>Chief Financial Officer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class A Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2018-05-15</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1618</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>50.9624</value>
                    <footnoteId id="F2"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>63466</value>
                    <footnoteId id="F3"/>
                    <footnoteId id="F4"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class A Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2018-05-15</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>5</transactionFormType>
                <transactionCode>G</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F5"/>
            </transactionCoding>
            <transactionTimeliness>
                <value>E</value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1545</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>61921</value>
                    <footnoteId id="F3"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class A Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2018-05-15</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>5</transactionFormType>
                <transactionCode>G</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F6"/>
            </transactionCoding>
            <transactionTimeliness>
                <value>E</value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1545</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>81672</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By The Kirkpatrick Family Trust</value>
                    <footnoteId id="F7"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Represents the number of shares sold to cover the statutory tax withholding obligations in connection with the vesting of Restricted Stock Units (&quot;RSUs&quot;). This sale is mandated by the Issuer's election under its equity incentive plans to require the satisfaction of minimum statutory tax withholding obligations to be funded by a &quot;sell to cover&quot; transaction and does not represent a discretionary sale by the Reporting Person.</footnote>
        <footnote id="F2">The reported price in Column 4 is a weighted average price. These shares were sold in multiple transactions at prices ranging from $50.95 to $51.4521 per share, inclusive. The Reporting Person undertakes to provide to the Issuer, any security holder of the Issuer, or to the staff of the Securities and Exchange Commission, upon request, full information regarding the number of shares sold at each separate price within the range set forth in this footnote.</footnote>
        <footnote id="F3">A portion of these shares represent RSUs. Each RSU represents the contingent right to receive one share of the Issuer's Class A common stock.</footnote>
        <footnote id="F4">Includes 957 shares acquired by the Reporting Person pursuant to the Issuer's 2016 Employee Stock Purchase Plan on May 15, 2018.</footnote>
        <footnote id="F5">Represents shares that were contributed by the Reporting Person to the Reporting Person's trust.</footnote>
        <footnote id="F6">Represents the shares received by the Reporting Person's trust.</footnote>
        <footnote id="F7">The Kirkpatrick Family Trust, established 9/28/1999.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Alexis Rhorer as attorney in fact for Reporting Person</signatureName>
        <signatureDate>2018-05-17</signatureDate>
    </ownerSignature>
</ownershipDocument>
