.. include:: common.rst Direct Messages =============== .. http:get:: /api/direct_messages.json Returns the 20 most recent direct messages sent to the authenticating user. You can request up to 200 direct messages per call, and only the most recent 200 DMs will be available using this endpoint. :query int since_id: |dm_since_id| :query int max_id: |dm_max_id| :query int count: |dm_count| **Example response**: :ref:`dm_object` .. http:get:: /api/direct_messages/sent.json Returns the 20 most recent direct messages sent by the authenticating user. You can request up to 200 direct messages per call, and only the most recent 200 DMs will be available using this endpoint. :query int since_id: |dm_since_id| :query int max_id: |dm_max_id| :query int count: |dm_count| **Example response**: :ref:`dm_object` .. http:post:: /api/direct_messages/new.json Sends a new direct message to the specified user from the authenticating user. :form text: text of your message :form user_id: the ID of the recipient :form screen_name: the handle of the recipient :reqheader Authorization: |auth| **Example response**: :ref:`dm_object`