X (Twitter) Direct Messages API

Endpoints related to retrieving, managing Direct Messages

OpenAPI Specification

twitter-direct-messages-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: X API v2 available endpoints
  version: '2.161'
  title: X API v2 Account Activity Direct Messages API
  termsOfService: https://developer.x.com/en/developer-terms/agreement-and-policy.html
  contact:
    name: X Developers
    url: https://developer.x.com/
  license:
    name: X Developer Agreement and Policy
    url: https://developer.x.com/en/developer-terms/agreement-and-policy.html
servers:
- description: X API
  url: https://api.x.com
tags:
- name: Direct Messages
  description: Endpoints related to retrieving, managing Direct Messages
  externalDocs:
    description: Find out more
    url: https://developer.twitter.com/en/docs/twitter-api/direct-messages
paths:
  /2/dm_conversations:
    post:
      security:
      - OAuth2UserToken:
        - dm.write
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Direct Messages
      summary: X Create DM Conversation
      description: Initiates a new direct message conversation with specified participants.
      operationId: createDirectMessagesConversation
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDmConversationRequest'
      responses:
        '201':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDmEventResponse'
        default:
          description: The request has failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/dm_conversations/media/{dm_id}/{media_id}/{resource_id}:
    get:
      security:
      - OAuth2UserToken:
        - dm.read
      tags:
      - Direct Messages
      summary: X Download DM Media
      description: Downloads media attached to a legacy Direct Message. The requesting user must be a participant in the conversation containing the specified DM event. The response body contains raw binary bytes.
      externalDocs:
        url: https://developer.x.com/
      operationId: dmConversationsMediaDownload
      parameters:
      - name: dm_id
        in: path
        description: The unique identifier of the Direct Message event containing the media.
        required: true
        schema:
          $ref: '#/components/schemas/DmEventId'
        style: simple
        example: '1234567890'
      - name: media_id
        in: path
        description: The unique identifier of the media attached to the Direct Message.
        required: true
        schema:
          $ref: '#/components/schemas/MediaId'
        style: simple
        example: '1234567890'
      - name: resource_id
        in: path
        description: The resource identifier of the media file, including file extension (e.g. 'hVJQTwig.jpg').
        required: true
        schema:
          $ref: '#/components/schemas/DmResourceId'
        style: simple
        example: '1234567890'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/BinaryPayload'
        default:
          description: The request has failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/dm_conversations/with/{participant_id}/dm_events:
    get:
      security:
      - OAuth2UserToken:
        - dm.read
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Direct Messages
      summary: X Get DM Events for a DM Conversation
      description: Retrieves direct message events for a specific conversation.
      operationId: getDirectMessagesEventsByParticipantId
      parameters:
      - name: participant_id
        in: path
        description: The ID of the participant user for the One to One DM conversation.
        required: true
        schema:
          $ref: '#/components/schemas/UserId'
        style: simple
        example: '1234567890'
      - name: max_results
        in: query
        description: The maximum number of results.
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          format: int32
          default: 100
        style: form
        example: 10
      - name: pagination_token
        in: query
        description: This parameter is used to get a specified 'page' of results.
        required: false
        schema:
          $ref: '#/components/schemas/PaginationToken32'
        style: form
        example: next_token_abc123
      - name: event_types
        in: query
        description: The set of event_types to include in the results.
        required: false
        schema:
          type: array
          minItems: 1
          uniqueItems: true
          items:
            type: string
            enum:
            - MessageCreate
            - ParticipantsJoin
            - ParticipantsLeave
          default:
          - MessageCreate
          - ParticipantsLeave
          - ParticipantsJoin
          example:
          - MessageCreate
          - ParticipantsLeave
        explode: false
        style: form
        example:
        - MessageCreate
        - ParticipantsLeave
      - $ref: '#/components/parameters/DmEventFieldsParameter'
      - $ref: '#/components/parameters/DmEventExpansionsParameter'
      - $ref: '#/components/parameters/MediaFieldsParameter'
      - $ref: '#/components/parameters/UserFieldsParameter'
      - $ref: '#/components/parameters/TweetFieldsParameter'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Get2DmConversationsWithParticipantIdDmEventsResponse'
        default:
          description: The request has failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/dm_conversations/with/{participant_id}/messages:
    post:
      security:
      - OAuth2UserToken:
        - dm.write
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Direct Messages
      summary: X Create DM Message by Participant ID
      description: Sends a new direct message to a specific participant by their ID.
      operationId: createDirectMessagesByParticipantId
      parameters:
      - name: participant_id
        in: path
        description: The ID of the recipient user that will receive the DM.
        required: true
        schema:
          $ref: '#/components/schemas/UserId'
        style: simple
        example: '1234567890'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageRequest'
      responses:
        '201':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDmEventResponse'
        default:
          description: The request has failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/dm_conversations/{dm_conversation_id}/messages:
    post:
      security:
      - OAuth2UserToken:
        - dm.write
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Direct Messages
      summary: X Create DM Message by Conversation ID
      description: Sends a new direct message to a specific conversation by its ID.
      operationId: createDirectMessagesByConversationId
      parameters:
      - name: dm_conversation_id
        in: path
        description: The DM Conversation ID.
        required: true
        schema:
          type: string
        style: simple
        example: '1234567890'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageRequest'
      responses:
        '201':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDmEventResponse'
        default:
          description: The request has failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/dm_conversations/{id}/dm_events:
    get:
      security:
      - OAuth2UserToken:
        - dm.read
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Direct Messages
      summary: X Get DM Events for a DM Conversation
      description: Retrieves direct message events for a specific conversation.
      operationId: getDirectMessagesEventsByConversationId
      parameters:
      - name: id
        in: path
        description: The DM conversation ID.
        required: true
        schema:
          $ref: '#/components/schemas/DmConversationId'
        style: simple
        example: '1234567890'
      - name: max_results
        in: query
        description: The maximum number of results.
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          format: int32
          default: 100
        style: form
        example: 10
      - name: pagination_token
        in: query
        description: This parameter is used to get a specified 'page' of results.
        required: false
        schema:
          $ref: '#/components/schemas/PaginationToken32'
        style: form
        example: next_token_abc123
      - name: event_types
        in: query
        description: The set of event_types to include in the results.
        required: false
        schema:
          type: array
          minItems: 1
          uniqueItems: true
          items:
            type: string
            enum:
            - MessageCreate
            - ParticipantsJoin
            - ParticipantsLeave
          default:
          - MessageCreate
          - ParticipantsLeave
          - ParticipantsJoin
          example:
          - MessageCreate
          - ParticipantsLeave
        explode: false
        style: form
        example:
        - MessageCreate
        - ParticipantsLeave
      - $ref: '#/components/parameters/DmEventFieldsParameter'
      - $ref: '#/components/parameters/DmEventExpansionsParameter'
      - $ref: '#/components/parameters/MediaFieldsParameter'
      - $ref: '#/components/parameters/UserFieldsParameter'
      - $ref: '#/components/parameters/TweetFieldsParameter'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Get2DmConversationsIdDmEventsResponse'
        default:
          description: The request has failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/dm_events:
    get:
      security:
      - OAuth2UserToken:
        - dm.read
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Direct Messages
      summary: X Get DM Events
      description: Retrieves a list of recent direct message events across all conversations.
      operationId: getDirectMessagesEvents
      parameters:
      - name: max_results
        in: query
        description: The maximum number of results.
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          format: int32
          default: 100
        style: form
        example: 10
      - name: pagination_token
        in: query
        description: This parameter is used to get a specified 'page' of results.
        required: false
        schema:
          $ref: '#/components/schemas/PaginationToken32'
        style: form
        example: next_token_abc123
      - name: event_types
        in: query
        description: The set of event_types to include in the results.
        required: false
        schema:
          type: array
          minItems: 1
          uniqueItems: true
          items:
            type: string
            enum:
            - MessageCreate
            - ParticipantsJoin
            - ParticipantsLeave
          default:
          - MessageCreate
          - ParticipantsLeave
          - ParticipantsJoin
          example:
          - MessageCreate
          - ParticipantsLeave
        explode: false
        style: form
        example:
        - MessageCreate
        - ParticipantsLeave
      - $ref: '#/components/parameters/DmEventFieldsParameter'
      - $ref: '#/components/parameters/DmEventExpansionsParameter'
      - $ref: '#/components/parameters/MediaFieldsParameter'
      - $ref: '#/components/parameters/UserFieldsParameter'
      - $ref: '#/components/parameters/TweetFieldsParameter'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Get2DmEventsResponse'
        default:
          description: The request has failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2/dm_events/{event_id}:
    delete:
      security:
      - OAuth2UserToken:
        - dm.read
        - dm.write
      - UserToken: []
      tags:
      - Direct Messages
      summary: X Delete DM Event
      description: Deletes a specific direct message event by its ID, if owned by the authenticated user.
      operationId: deleteDirectMessagesEvents
      parameters:
      - name: event_id
        in: path
        description: The ID of the direct-message event to delete.
        required: true
        schema:
          $ref: '#/components/schemas/DmEventId'
        style: simple
        example: '1234567890'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteDmResponse'
        default:
          description: The request has failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    get:
      security:
      - OAuth2UserToken:
        - dm.read
        - tweet.read
        - users.read
      - UserToken: []
      tags:
      - Direct Messages
      summary: X Get DM Event by ID
      description: Retrieves details of a specific direct message event by its ID.
      operationId: getDirectMessagesEventsById
      parameters:
      - name: event_id
        in: path
        description: dm event id.
        required: true
        schema:
          $ref: '#/components/schemas/DmEventId'
        style: simple
        example: '1234567890'
      - $ref: '#/components/parameters/DmEventFieldsParameter'
      - $ref: '#/components/parameters/DmEventExpansionsParameter'
      - $ref: '#/components/parameters/MediaFieldsParameter'
      - $ref: '#/components/parameters/UserFieldsParameter'
      - $ref: '#/components/parameters/TweetFieldsParameter'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Get2DmEventsEventIdResponse'
        default:
          description: The request has failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    PollId:
      type: string
      description: Unique identifier of this poll.
      pattern: ^[0-9]{1,19}$
      example: '1365059861688410112'
    Media:
      type: object
      required:
      - type
      properties:
        height:
          $ref: '#/components/schemas/MediaHeight'
        media_key:
          $ref: '#/components/schemas/MediaKey'
        type:
          type: string
        width:
          $ref: '#/components/schemas/MediaWidth'
      discriminator:
        propertyName: type
        mapping:
          animated_gif: '#/components/schemas/AnimatedGif'
          photo: '#/components/schemas/Photo'
          video: '#/components/schemas/Video'
    DmResourceId:
      type: string
      description: The resource identifier of the media file, including file extension.
      pattern: ^[a-zA-Z0-9_.-]{1,50}$
      example: tJg5kUG5RKPi3jNi.jpg
    DeleteDmResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            deleted:
              type: boolean
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Problem'
    Geo:
      type: object
      required:
      - type
      - bbox
      - properties
      properties:
        bbox:
          type: array
          minItems: 4
          maxItems: 4
          items:
            type: number
            minimum: -180
            maximum: 180
            format: double
          example:
          - -105.193475
          - 39.60973
          - -105.053164
          - 39.761974
        geometry:
          $ref: '#/components/schemas/Point'
        properties:
          type: object
        type:
          type: string
          enum:
          - Feature
    CreateTextMessageRequest:
      type: object
      required:
      - text
      properties:
        attachments:
          $ref: '#/components/schemas/DmAttachments'
        text:
          type: string
          description: Text of the message.
          minLength: 1
    PlaceId:
      type: string
      description: The identifier for this place.
      example: f7eb2fa2fea288b1
    ContextAnnotationDomainFields:
      type: object
      description: Represents the data for the context annotation domain.
      required:
      - id
      properties:
        description:
          type: string
          description: Description of the context annotation domain.
          example: Example description for this resource.
        id:
          type: string
          description: The unique id for a context annotation domain.
          pattern: ^[0-9]{1,19}$
          example: '1234567890'
        name:
          type: string
          description: Name of the context annotation domain.
          example: Example User
    PreviousToken:
      type: string
      description: The previous token.
      minLength: 1
    MentionFields:
      type: object
      description: Represent the portion of text recognized as a User mention, and its start and end position within the text.
      required:
      - username
      properties:
        id:
          $ref: '#/components/schemas/UserId'
        username:
          $ref: '#/components/schemas/UserName'
    HashtagEntity:
      allOf:
      - $ref: '#/components/schemas/EntityIndicesInclusiveExclusive'
      - $ref: '#/components/schemas/HashtagFields'
    ReplySettingsWithVerifiedUsers:
      type: string
      description: Shows who can reply a Tweet. Fields returned are everyone, mentioned_users, subscribers, verified and following.
      pattern: ^[A-Za-z]{1,12}$
      enum:
      - everyone
      - mentionedUsers
      - following
      - other
      - subscribers
      - verified
    Topic:
      type: object
      description: The topic of a Space, as selected by its creator.
      required:
      - id
      - name
      properties:
        description:
          type: string
          description: The description of the given topic.
          example: All about technology
        id:
          $ref: '#/components/schemas/TopicId'
        name:
          type: string
          description: The name of the given topic.
          example: Technology
    Place:
      type: object
      required:
      - id
      - full_name
      properties:
        contained_within:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/PlaceId'
        country:
          type: string
          description: The full name of the county in which this place exists.
          example: United States
        country_code:
          $ref: '#/components/schemas/CountryCode'
        full_name:
          type: string
          description: The full name of this place.
          example: Lakewood, CO
        geo:
          $ref: '#/components/schemas/Geo'
        id:
          $ref: '#/components/schemas/PlaceId'
        name:
          type: string
          description: The human readable name of this place.
          example: Lakewood
        place_type:
          $ref: '#/components/schemas/PlaceType'
    DmAttachments:
      type: array
      description: Attachments to a DM Event.
      items:
        $ref: '#/components/schemas/DmMediaAttachment'
    UserWithheld:
      type: object
      description: Indicates withholding details for [withheld content](https://help.twitter.com/en/rules-and-policies/tweet-withheld-by-country).
      required:
      - country_codes
      properties:
        country_codes:
          type: array
          description: Provides a list of countries where this content is not available.
          minItems: 1
          uniqueItems: true
          items:
            $ref: '#/components/schemas/CountryCode'
        scope:
          type: string
          description: Indicates that the content being withheld is a `user`.
          enum:
          - user
    CountryCode:
      type: string
      description: A two-letter ISO 3166-1 alpha-2 country code.
      pattern: ^[A-Z]{2}$
      example: US
    PollOption:
      type: object
      description: Describes a choice in a Poll object.
      required:
      - position
      - label
      - votes
      properties:
        label:
          $ref: '#/components/schemas/PollOptionLabel'
        position:
          type: integer
          description: Position of this choice in the poll.
        votes:
          type: integer
          description: Number of users who voted for this choice.
    DmEventId:
      type: string
      description: Unique identifier of a DM Event.
      pattern: ^[0-9]{1,19}$
      example: '1146654567674912769'
    CashtagEntity:
      allOf:
      - $ref: '#/components/schemas/EntityIndicesInclusiveExclusive'
      - $ref: '#/components/schemas/CashtagFields'
    PaginationToken32:
      type: string
      description: A base32 pagination token.
      minLength: 16
    Get2DmConversationsIdDmEventsResponse:
      type: object
      properties:
        data:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/DmEvent'
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Problem'
        includes:
          $ref: '#/components/schemas/Expansions'
        meta:
          type: object
          properties:
            next_token:
              $ref: '#/components/schemas/NextToken'
            previous_token:
              $ref: '#/components/schemas/PreviousToken'
            result_count:
              $ref: '#/components/schemas/ResultCount'
    CreateDmEventResponse:
      type: object
      properties:
        data:
          type: object
          required:
          - dm_conversation_id
          - dm_event_id
          properties:
            dm_conversation_id:
              $ref: '#/components/schemas/DmConversationId'
            dm_event_id:
              $ref: '#/components/schemas/DmEventId'
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Problem'
    NoteTweetText:
      type: string
      description: The note content of the Tweet.
      example: Learn how to use the user Tweet timeline and user mention timeline endpoints in the X API v2 to explore Tweet\u2026 https:\/\/t.co\/56a0vZUx7i
    Point:
      type: object
      description: A [GeoJson Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) geometry object.
      required:
      - type
      - coordinates
      properties:
        coordinates:
          $ref: '#/components/schemas/Position'
        type:
          type: string
          enum:
          - Point
          example: Point
    CreateDmConversationRequest:
      type: object
      required:
      - conversation_type
      - participant_ids
      - message
      properties:
        conversation_type:
          type: string
          description: The conversation type that is being created.
          enum:
          - Group
        message:
          $ref: '#/components/schemas/CreateMessageRequest'
        participant_ids:
          $ref: '#/components/schemas/DmParticipants'
      additionalProperties: false
    PollOptionLabel:
      type: string
      description: The text of a poll choice.
      minLength: 1
      maxLength: 25
    PlaceType:
      type: string
      enum:
      - poi
      - neighborhood
      - city
      - admin
      - country
      - unknown
      example: city
    CommunityId:
      type: string
      description: The unique identifier of this Community.
      pattern: ^[0-9]{1,19}$
      example: '1146654567674912769'
    DisplayTextRange:
      type: array
      description: Represent a boundary range (start and end zero-based indices) for the portion of text that is displayed for a post. `start` must be smaller than `end`. The start index is inclusive, the end index is exclusive.
      minItems: 2
      maxItems: 2
      items:
        type: integer
        minimum: 0
    User:
      type: object
      description: The X User object.
      required:
      - id
      - name
      - username
      properties:
        affiliation:
          type: object
          description: Metadata about a user's affiliation.
          properties:
            badge_url:
              type: string
              description: The badge URL corresponding to the affiliation.
              format: uri
            description:
              type: string
              description: The description of the affiliation.
            url:
              type: string
              description: The URL, if available, to details about an affiliation.
              format: uri
            user_id:
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/UserId'
        connection_status:
          type: array
          description: Returns detailed information about the relationship between two users.
          minItems: 0
          items:
            type: string
            description: Type of connection between users.
            enum:
            - follow_request_received
            - follow_request_sent
            - blocking
            - followed_by
            - following
            - muting
        created_at:
          type: string
          description: Creation time of this User.
          format: date-time
        description:
          type: string
          description: The text of this User's profile description (also known as bio), if the User provided one.
        entities:
          type: object
          description: A list of metadata found in the User's profile description.
          properties:
            description:
              $ref: '#/components/schemas/FullTextEntities'
            url:
              type: object
              description: Expanded details for the URL specified in the User's profile, with start and end indices.
              properties:
                urls:
                  type: array
                  minItems: 1
                  items:
                    $ref: '#/components/schemas/UrlEntity'
        id:
          $ref: '#/components/schemas/UserId'
        location:
          type: string
          description: The location specified in the User's profile, if the User provided one. As this is a freeform value, it may not indicate a valid location, but it may be fuzzily evaluated when performing searches with location queries.
        most_recent_tweet_id:
          $ref: '#/components/schemas/TweetId'
        name:
          type: string
          description: The friendly name of this User, as shown on their profile.
        pinned_tweet_id:
          $ref: '#/components/schemas/TweetId'
        profile_banner_url:
          type: string
          description: The URL to the profile banner for this User.
          format: uri
        profile_image_url:
          type: string
          description: The URL to the profile image for this User.
          format: uri
        protected:
          type: boolean
          description: Indicates if this User has chosen to protect their Posts (in other words, if this User's Posts are private).
        public_metrics:
          type: object
          description: A list of metrics for this User.
          required:
          - followers_count
          - following_count
          - tweet_count
          - listed_count
          properties:
            followers_count:
              type: integer
              description: Number of Users who are following this User.
            following_count:
              type: integer
              description: Number of Users this User is following.
            like_count:
              type: integer
              description: The number of likes created by this User.
            listed_count:
              type: integer
              description: The number of lists that include this User.
            tweet_count:
              type: integer
              description: The number of Posts (including Retweets) posted by this User.
        receives_your_dm:
          type: boolean
          description: Indicates if you can send a DM to this User
        subscription_type:
          type: string
          description: 'The X Blue subscription type of the user, eg: Basic, Premium, PremiumPlus or None.'
          enum:
          - Basic
          - Premium
          - PremiumPlus
          - None
        url:
          type: string
          description: The URL specified in the User's profile.
        username:
          $ref: '#/components/schemas/UserName'
        verified:
          type: boolean
          description: Indicate if this User is a verified X User.
        verified_type:
          type: string
          description: 'The X Blue verified type of the user, eg: blue, government, business or none.'
          enum:
          - blue
          - government
          - business
          - none
        withheld:
          $ref: '#/components/schemas/UserWithheld'
      example:
        created_at: '2013-12-14T04:35:55Z'
        id: '2244994945'
        name: X Dev
        protected: false
        username: T

# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/twitter/refs/heads/main/openapi/twitter-direct-messages-api-openapi.yml