Twilio Wireless API

The Twilio Wireless API allows developers to easily integrate cellular connectivity into their applications. With this API, developers can provision and manage SIM cards, monitor data usage, send and receive SMS messages, make phone calls, and access real-time device location information. This enables them to create IoT devices, asset tracking systems, and other connected solutions that rely on cellular connectivity.

OpenAPI Specification

wireless-openapi-original.yml Raw ↑
components:
  schemas:
    wireless.v1.account_usage_record:
      type: object
      properties:
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: >-
            The SID of the
            [Account](https://www.twilio.com/docs/iam/api/account) that created
            the AccountUsageRecord resource.
        period:
          nullable: true
          description: >-
            The time period for which usage is reported. Contains `start` and
            `end` properties that describe the period using GMT date-time values
            specified in [ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
        commands:
          nullable: true
          description: >-
            An object that describes the aggregated Commands usage for all SIMs
            during the specified period. See [Commands Usage
            Object](https://www.twilio.com/docs/iot/wireless/api/account-usagerecord-resource#commands-usage-object).
        data:
          nullable: true
          description: >-
            An object that describes the aggregated Data usage for all SIMs over
            the period. See [Data Usage
            Object](https://www.twilio.com/docs/iot/wireless/api/account-usagerecord-resource#data-usage-object).
    account_usage_record_enum_granularity:
      type: string
      enum:
        - hourly
        - daily
        - all
    wireless.v1.command:
      type: object
      properties:
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^DC[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that we created to identify the Command resource.
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: >-
            The SID of the
            [Account](https://www.twilio.com/docs/iam/api/account) that created
            the Command resource.
        sim_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^DE[0-9a-fA-F]{32}$
          nullable: true
          description: >-
            The SID of the [Sim
            resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource)
            that the Command was sent to or from.
        command:
          type: string
          nullable: true
          description: >-
            The message being sent to or from the SIM. For text mode messages,
            this can be up to 160 characters. For binary mode messages, this is
            a series of up to 140 bytes of data encoded using base64.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        command_mode:
          type: string
          $ref: '#/components/schemas/command_enum_command_mode'
          nullable: true
          description: >-
            The mode used to send the SMS message. Can be: `text` or `binary`.
            The default SMS mode is `text`.
        transport:
          type: string
          $ref: '#/components/schemas/command_enum_transport'
          nullable: true
          description: 'The type of transport used. Can be: `sms` or `ip`.'
        delivery_receipt_requested:
          type: boolean
          nullable: true
          description: Whether to request a delivery receipt.
        status:
          type: string
          $ref: '#/components/schemas/command_enum_status'
          nullable: true
          description: >-
            The status of the Command. Can be: `queued`, `sent`, `delivered`,
            `received`, or `failed`. See [Status
            Values](https://www.twilio.com/docs/iot/wireless/api/command-resource#status-values)
            for a description of each state.
        direction:
          type: string
          $ref: '#/components/schemas/command_enum_direction'
          nullable: true
          description: >-
            The direction of the Command. Can be `to_sim` or `from_sim`. The
            value of `to_sim` is synonymous with the term `mobile terminated`,
            and `from_sim` is synonymous with the term `mobile originated`.
        date_created:
          type: string
          format: date-time
          nullable: true
          description: >-
            The date and time in GMT when the resource was created specified in
            [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: >-
            The date and time in GMT when the resource was last updated
            specified in [ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    command_enum_direction:
      type: string
      enum:
        - from_sim
        - to_sim
    command_enum_status:
      type: string
      enum:
        - queued
        - sent
        - delivered
        - received
        - failed
    command_enum_command_mode:
      type: string
      enum:
        - text
        - binary
    command_enum_transport:
      type: string
      enum:
        - sms
        - ip
    wireless.v1.sim.data_session:
      type: object
      properties:
        sid:
          type: string
          nullable: true
          description: >-
            The unique string that we created to identify the DataSession
            resource.
        sim_sid:
          type: string
          nullable: true
          description: >-
            The SID of the [Sim
            resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource)
            that the Data Session is for.
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: >-
            The SID of the
            [Account](https://www.twilio.com/docs/iam/api/account) that created
            the DataSession resource.
        radio_link:
          type: string
          nullable: true
          description: The generation of wireless technology that the device was using.
        operator_mcc:
          type: string
          nullable: true
          description: >-
            The 'mobile country code' is the unique ID of the home country where
            the Data Session took place. See: [MCC/MNC
            lookup](http://mcc-mnc.com/).
        operator_mnc:
          type: string
          nullable: true
          description: >-
            The 'mobile network code' is the unique ID specific to the mobile
            operator network where the Data Session took place.
        operator_country:
          type: string
          nullable: true
          description: >-
            The three letter country code representing where the device's Data
            Session took place. This is determined by looking up the
            `operator_mcc`.
        operator_name:
          type: string
          nullable: true
          description: >-
            The friendly name of the mobile operator network that the
            [SIM](https://www.twilio.com/docs/iot/wireless/api/sim-resource)-connected
            device is attached to. This is determined by looking up the
            `operator_mnc`.
        cell_id:
          type: string
          nullable: true
          description: >-
            The unique ID of the cellular tower that the device was attached to
            at the moment when the Data Session was last updated.
        cell_location_estimate:
          nullable: true
          description: >-
            An object that describes the estimated location in latitude and
            longitude where the device's Data Session took place. The location
            is derived from the `cell_id` when the Data Session was last
            updated. See [Cell Location Estimate
            Object](https://www.twilio.com/docs/iot/wireless/api/datasession-resource#cell-location-estimate-object). 
        packets_uploaded:
          type: integer
          nullable: true
          description: >-
            The number of packets uploaded by the device between the `start`
            time and when the Data Session was last updated.
        packets_downloaded:
          type: integer
          nullable: true
          description: >-
            The number of packets downloaded by the device between the `start`
            time and when the Data Session was last updated.
        last_updated:
          type: string
          format: date-time
          nullable: true
          description: >-
            The date that the resource was last updated, given as GMT in [ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
        start:
          type: string
          format: date-time
          nullable: true
          description: >-
            The date that the Data Session started, given as GMT in [ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
        end:
          type: string
          format: date-time
          nullable: true
          description: >-
            The date that the record ended, given as GMT in [ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
        imei:
          type: string
          nullable: true
          description: >-
            The 'international mobile equipment identity' is the unique ID of
            the device using the SIM to connect. An IMEI is a 15-digit string:
            14 digits for the device identifier plus a check digit calculated
            using the Luhn formula.
    wireless.v1.rate_plan:
      type: object
      properties:
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^WP[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that we created to identify the RatePlan resource.
        unique_name:
          type: string
          nullable: true
          description: >-
            An application-defined string that uniquely identifies the resource.
            It can be used in place of the resource's `sid` in the URL to
            address the resource.
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: >-
            The SID of the
            [Account](https://www.twilio.com/docs/iam/api/account) that created
            the RatePlan resource.
        friendly_name:
          type: string
          nullable: true
          description: The string that you assigned to describe the resource.
        data_enabled:
          type: boolean
          nullable: true
          description: Whether SIMs can use GPRS/3G/4G/LTE data connectivity.
        data_metering:
          type: string
          nullable: true
          description: >-
            The model used to meter data usage. Can be: `payg` and `quota-1`,
            `quota-10`, and `quota-50`. Learn more about the available [data
            metering
            models](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#payg-vs-quota-data-plans).
        data_limit:
          type: integer
          nullable: true
          description: >-
            The total data usage (download and upload combined) in Megabytes
            that the Network allows during one month on the home network
            (T-Mobile USA). The metering period begins the day of activation and
            ends on the same day in the following month. Can be up to 2TB.
        messaging_enabled:
          type: boolean
          nullable: true
          description: >-
            Whether SIMs can make, send, and receive SMS using
            [Commands](https://www.twilio.com/docs/iot/wireless/api/command-resource).
        voice_enabled:
          type: boolean
          nullable: true
          description: Deprecated. Whether SIMs can make and receive voice calls.
        national_roaming_enabled:
          type: boolean
          nullable: true
          description: >-
            Whether SIMs can roam on networks other than the home network
            (T-Mobile USA) in the United States. See [national
            roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming).
        national_roaming_data_limit:
          type: integer
          nullable: true
          description: >-
            The total data usage (download and upload combined) in Megabytes
            that the Network allows during one month on non-home networks in the
            United States. The metering period begins the day of activation and
            ends on the same day in the following month. Can be up to 2TB.
        international_roaming:
          type: array
          items:
            type: string
          nullable: true
          description: >-
            The list of services that SIMs capable of using GPRS/3G/4G/LTE data
            connectivity can use outside of the United States. Can contain:
            `data` and `messaging`.
        international_roaming_data_limit:
          type: integer
          nullable: true
          description: >-
            The total data usage (download and upload combined) in Megabytes
            that the Network allows during one month when roaming outside the
            United States. Can be up to 2TB.
        date_created:
          type: string
          format: date-time
          nullable: true
          description: >-
            The date and time in GMT when the resource was created specified in
            [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: >-
            The date and time in GMT when the resource was last updated
            specified in [ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    rate_plan_enum_data_limit_strategy:
      type: string
      enum:
        - block
        - throttle
    wireless.v1.sim:
      type: object
      properties:
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^DE[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that we created to identify the Sim resource.
        unique_name:
          type: string
          nullable: true
          description: >-
            An application-defined string that uniquely identifies the resource.
            It can be used in place of the resource's `sid` in the URL to
            address the resource.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: >-
            The SID of the
            [Account](https://www.twilio.com/docs/iam/api/account) to which the
            Sim resource belongs.
        rate_plan_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^WP[0-9a-fA-F]{32}$
          nullable: true
          description: >-
            The SID of the [RatePlan
            resource](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource)
            to which the Sim resource is assigned.
        friendly_name:
          type: string
          nullable: true
          description: The string that you assigned to describe the Sim resource.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        iccid:
          type: string
          nullable: true
          description: >-
            The [ICCID](https://en.wikipedia.org/wiki/SIM_card#ICCID) associated
            with the SIM.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        e_id:
          type: string
          nullable: true
          description: Deprecated.
        status:
          type: string
          $ref: '#/components/schemas/sim_enum_status'
          nullable: true
          description: >-
            The status of the Sim resource. Can be: `new`, `ready`, `active`,
            `deactivated`, `canceled`, `deleted`, `scheduled`, or `updating`.
            See [Status
            Values](https://www.twilio.com/docs/iot/wireless/api/sim-resource#status-values)
            for the description of each status.
        reset_status:
          type: string
          $ref: '#/components/schemas/sim_enum_reset_status'
          nullable: true
          description: >-
            The connectivity reset status of the SIM. Can be: null or
            `resetting`. When a connectivity reset is initiated on a SIM, this
            property is `resetting`. After the reset completes, it is null.
        commands_callback_url:
          type: string
          format: uri
          nullable: true
          description: >-
            The URL we call using the `commands_callback_method` when the SIM
            originates a machine-to-machine
            [Command](https://www.twilio.com/docs/iot/wireless/api/command-resource).
            Your server should respond with an HTTP status code in the 200
            range; any response body will be ignored.
        commands_callback_method:
          type: string
          format: http-method
          enum:
            - HEAD
            - GET
            - POST
            - PATCH
            - PUT
            - DELETE
          nullable: true
          description: >-
            The HTTP method we use to call `commands_callback_url`.  Can be:
            `POST` or `GET`. Default is `POST`.
        sms_fallback_method:
          type: string
          format: http-method
          enum:
            - HEAD
            - GET
            - POST
            - PATCH
            - PUT
            - DELETE
          nullable: true
          description: Deprecated.
        sms_fallback_url:
          type: string
          format: uri
          nullable: true
          description: Deprecated.
        sms_method:
          type: string
          format: http-method
          enum:
            - HEAD
            - GET
            - POST
            - PATCH
            - PUT
            - DELETE
          nullable: true
          description: Deprecated.
        sms_url:
          type: string
          format: uri
          nullable: true
          description: Deprecated.
        voice_fallback_method:
          type: string
          format: http-method
          enum:
            - HEAD
            - GET
            - POST
            - PATCH
            - PUT
            - DELETE
          nullable: true
          description: >-
            Deprecated. The HTTP method we use to call `voice_fallback_url`. Can
            be: `GET` or `POST`. Default is `POST`.
        voice_fallback_url:
          type: string
          format: uri
          nullable: true
          description: >-
            Deprecated. The URL we call using the `voice_fallback_method` when
            an error occurs while retrieving or executing the TwiML requested
            from `voice_url`.
        voice_method:
          type: string
          format: http-method
          enum:
            - HEAD
            - GET
            - POST
            - PATCH
            - PUT
            - DELETE
          nullable: true
          description: >-
            Deprecated. The HTTP method we use to call `voice_url`. Can be:
            `GET` or `POST`. Default is `POST`.
        voice_url:
          type: string
          format: uri
          nullable: true
          description: >-
            Deprecated. The URL we call using the `voice_method` when the
            SIM-connected device makes a voice call.
        date_created:
          type: string
          format: date-time
          nullable: true
          description: >-
            The date and time in GMT when the resource was created specified in
            [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: >-
            The date and time in GMT when the Sim resource was last updated
            specified in [ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
        links:
          type: object
          format: uri-map
          nullable: true
          description: The URLs of related subresources.
        ip_address:
          type: string
          nullable: true
          description: Deprecated.
    sim_enum_status:
      type: string
      enum:
        - new
        - ready
        - active
        - suspended
        - deactivated
        - canceled
        - scheduled
        - updating
    sim_enum_reset_status:
      type: string
      enum:
        - resetting
    wireless.v1.sim.usage_record:
      type: object
      properties:
        sim_sid:
          type: string
          nullable: true
          description: >-
            The SID of the [Sim
            resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource)
            that this Usage Record is for.
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: >-
            The SID of the
            [Account](https://www.twilio.com/docs/iam/api/account) that created
            the UsageRecord resource.
        period:
          nullable: true
          description: >-
            The time period for which the usage is reported. Contains `start`
            and `end` datetime values given as GMT in [ISO
            8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format.
        commands:
          nullable: true
          description: >-
            An object that describes the SIM's usage of Commands during the
            specified period. See [Commands Usage
            Object](https://www.twilio.com/docs/iot/wireless/api/sim-usagerecord-resource#commands-usage-object).
        data:
          nullable: true
          description: >-
            An object that describes the SIM's data usage during the specified
            period. See [Data Usage
            Object](https://www.twilio.com/docs/iot/wireless/api/sim-usagerecord-resource#data-usage-object).
    usage_record_enum_granularity:
      type: string
      enum:
        - hourly
        - daily
        - all
    ListAccountUsageRecordResponse:
      type: object
      properties:
        usage_records:
          type: array
          items:
            $ref: '#/components/schemas/wireless.v1.account_usage_record'
        meta:
          type: object
          properties:
            first_page_url:
              type: string
              format: uri
            next_page_url:
              type: string
              format: uri
              nullable: true
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type: string
              format: uri
              nullable: true
            url:
              type: string
              format: uri
            key:
              type: string
    ListCommandResponse:
      type: object
      properties:
        commands:
          type: array
          items:
            $ref: '#/components/schemas/wireless.v1.command'
        meta:
          type: object
          properties:
            first_page_url:
              type: string
              format: uri
            next_page_url:
              type: string
              format: uri
              nullable: true
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type: string
              format: uri
              nullable: true
            url:
              type: string
              format: uri
            key:
              type: string
    CreateCommandRequest:
      type: object
      required:
        - Command
      properties:
        Command:
          type: string
          description: >-
            The message body of the Command. Can be plain text in text mode or a
            Base64 encoded byte string in binary mode.
        Sim:
          type: string
          description: >-
            The `sid` or `unique_name` of the
            [SIM](https://www.twilio.com/docs/iot/wireless/api/sim-resource) to
            send the Command to.
        CallbackMethod:
          type: string
          format: http-method
          enum:
            - HEAD
            - GET
            - POST
            - PATCH
            - PUT
            - DELETE
          description: >-
            The HTTP method we use to call `callback_url`. Can be: `POST` or
            `GET`, and the default is `POST`.
        CallbackUrl:
          type: string
          format: uri
          description: >-
            The URL we call using the `callback_url` when the Command has
            finished sending, whether the command was delivered or it failed.
        CommandMode:
          type: string
          $ref: '#/components/schemas/command_enum_command_mode'
          description: >-
            The mode to use when sending the SMS message. Can be: `text` or
            `binary`. The default SMS mode is `text`.
        IncludeSid:
          type: string
          description: >-
            Whether to include the SID of the command in the message body. Can
            be: `none`, `start`, or `end`, and the default behavior is `none`.
            When sending a Command to a SIM in text mode, we can automatically
            include the SID of the Command in the message body, which could be
            used to ensure that the device does not process the same Command
            more than once.  A value of `start` will prepend the message with
            the Command SID, and `end` will append it to the end, separating the
            Command SID from the message body with a space. The length of the
            Command SID is included in the 160 character limit so the SMS body
            must be 128 characters or less before the Command SID is included.
        DeliveryReceiptRequested:
          type: boolean
          description: >-
            Whether to request delivery receipt from the recipient. For Commands
            that request delivery receipt, the Command state transitions to
            'delivered' once the server has received a delivery receipt from the
            device. The default value is `true`.
    ListDataSessionResponse:
      type: object
      properties:
        data_sessions:
          type: array
          items:
            $ref: '#/components/schemas/wireless.v1.sim.data_session'
        meta:
          type: object
          properties:
            first_page_url:
              type: string
              format: uri
            next_page_url:
              type: string
              format: uri
              nullable: true
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type: string
              format: uri
              nullable: true
            url:
              type: string
              format: uri
            key:
              type: string
    ListRatePlanResponse:
      type: object
      properties:
        rate_plans:
          type: array
          items:
            $ref: '#/components/schemas/wireless.v1.rate_plan'
        meta:
          type: object
          properties:
            first_page_url:
              type: string
              format: uri
            next_page_url:
              type: string
              format: uri
              nullable: true
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type: string
              format: uri
              nullable: true
            url:
              type: string
              format: uri
            key:
              type: string
    CreateRatePlanRequest:
      type: object
      properties:
        UniqueName:
          type: string
          description: >-
            An application-defined string that uniquely identifies the resource.
            It can be used in place of the resource's `sid` in the URL to
            address the resource.
        FriendlyName:
          type: string
          description: >-
            A descriptive string that you create to describe the resource. It
            does not have to be unique.
        DataEnabled:
          type: boolean
          description: Whether SIMs can use GPRS/3G/4G/LTE data connectivity.
        DataLimit:
          type: integer
          description: >-
            The total data usage (download and upload combined) in Megabytes
            that the Network allows during one month on the home network
            (T-Mobile USA). The metering period begins the day of activation and
            ends on the same day in the following month. Can be up to 2TB and
            the default value is `1000`.
        DataMetering:
          type: string
          description: >-
            The model used to meter data usage. Can be: `payg` and `quota-1`,
            `quota-10`, and `quota-50`. Learn more about the available [data
            metering
            models](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#payg-vs-quota-data-plans).
        MessagingEnabled:
          type: boolean
          description: >-
            Whether SIMs can make, send, and receive SMS using
            [Commands](https://www.twilio.com/docs/iot/wireless/api/command-resource).
        VoiceEnabled:
          type: boolean
          description: Deprecated.
        NationalRoamingEnabled:
          type: boolean
          description: >-
            Whether SIMs can roam on networks other than the home network
            (T-Mobile USA) in the United States. See [national
            roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming).
        InternationalRoaming:
          type: array
          items:
            type: string
          description: >-
            The list of services that SIMs capable of using GPRS/3G/4G/LTE data
            connectivity can use outside of the United States. Can contain:
            `data` and `messaging`.
        NationalRoamingDataLimit:
          type: integer
          description: >-
            The total data usage (download and upload combined) in Megabytes
            that the Network allows during one month on non-home networks in the
            United States. The metering period begins the day of activation and
            ends on the same day in the following month. Can be up to 2TB. See
            [national
            roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming)
            for more info.
        InternationalRoamingDataLimit:
          type: integer
          description: >-
            The total data usage (download and upload combined) in Megabytes
            that the Network allows during one month when roaming outside the
            United States. Can be up to 2TB.
    UpdateRatePlanRequest:
      type: object
      properties:
        UniqueName:
          type: string
          description: >-
            An application-defined string that uniquely identifies the resource.
            It can be used in place of the resource's `sid` in the URL to
            address the resource.
        FriendlyName:
        

# --- truncated at 32 KB (59 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/twilio/refs/heads/main/openapi/wireless-openapi-original.yml