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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2017-05-10</periodOfReport>

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

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001665930</rptOwnerCik>
            <rptOwnerName>Lawson Jeff</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>
            <isDirector>1</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <officerTitle>Chief Executive Officer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class A Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2017-05-10</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>P</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>100000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>23.4318</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>100000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By Lawson Revocable Trust</value>
                    <footnoteId id="F2"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">The reported price in Column 4 is a weighted average price. These shares were purchased in multiple transactions at prices ranging from $22.96 to $23.76 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 purchased at each separate price within the range set forth in this footnote.</footnote>
        <footnote id="F2">Erica Freeman Lawson and Jeffrey Gordon Lawson Trustees of the Lawson Revocable Trust dated 10/2/11.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Mariam Sattar as attorney in fact for Reporting Person</signatureName>
        <signatureDate>2017-05-11</signatureDate>
    </ownerSignature>
</ownershipDocument>
