Danbooru
Login Posts Comments Notes Artists Tags Pools Wiki Forum More ยป
Search Changes Help
  • |
  • Posts (0) History

    Blacklisted (help)

    • guro
    • scat
    • furry -rating:g
    Disable all Re-enable all

    Recent Changes (all)

    • catria (fire emblem)
    • thinking
    • imagining
    • mobius (mobius dressing) (honkai impact)
    • kiyou (northkiyou)
    • puzzle & dragons
    • cath (fire emblem)
    • caeda (fire emblem)
    • triple tiara (umamusume)
    • tsuda kenjirou
    • shinjuku cat
    • list of puzzle & dragons characters
    • underwear hand up pose (han-0v0)
    • saline (p&d)
    • good burger
    • remu (p&d)
    • brigid (fire emblem)
    • rhythm tengoku (game)
    • bartre (fire emblem)
    • ayra (fire emblem)
    • athena (fire emblem)
    • amelia (fire emblem)
    • selena (fire emblem: the sacred stones)
    • elincia ridell crimea
    • vika (fire emblem)

    Options

    • Wiki History
    • Discussions
    • What Links Here

    api:dmails

    Table of Contents
    • 1. Record field format
    • 2. Associated attributes
    • 3. Nomenclature
    • 4. Actions
      • 4.01 Index
      • 4.02 Show
      • 4.03 Create
      • 4.04 Update
      • 4.05 Mark all as read
    • 5. See also
    • 6. External links

    The following includes the details of how to interface with the dmail records through the API.

    Record field format

    NameTypeDetails
    idinteger>0
    owner_idinteger>0
    to_idinteger>0
    from_idinteger>0
    titlestring
    bodystring
    is_readboolean
    is_deletedboolean
    is_spambooleanobsolete
    keystring
    created_attimestamp
    updated_attimestamp

    Associated attributes

    NameTypeNumberAvailabilityDetails
    ownerusersinglerequired
    tousersinglerequired
    fromusersinglerequired

    Nomenclature

    • Plural form: "dmails"
      • Used in the URL pathname
    • Singular form: "dmail"
      • Used for write parameters (Help:API Write Requests)
    • Versions: none

    Actions

    These are the various actions that can be done with dmail records.

    Index
    HTTP MethodGET
    Base URL/dmails.json
    Typeread request
    DescriptionThe default order is ID descending.
    Only Dmails to or from the user will be shown, regardless of user level.
    Search attributes

    All of the following are standard attributes with all of their available formats and qualifiers.

    • Number syntax
      • id
      • created_at
      • updated_at
    • Text syntax
      • title
      • body
    • User syntax
      • to
      • from
    • Boolean syntax
      • is_read
      • is_deleted
    Special search parameters
    • title_matches - Case-insensitive wildcard search on the title fields.
    • message_matches - Case-insensitive wildcard search on the body field.
    • folder_matches
      • received - Shows all dmails to the user.
      • unread - Shows all unread dmails to the user.
      • sent - Shows all dmails from the user.
      • deleted - Shows all dmails deleted by the user.
    Show
    HTTP MethodGET
    Base URL/dmails/$id.json
    Typeread request
    Description$id is the dmail ID.
    Normally only the owner can see the dmail, unless the correct dmail key is also supplied.
    Show parameters.
    • key Unique key for every dmail that will allow anyone to view the dmail.
    Create
    HTTP MethodPOST
    Base URL/dmails.json
    Typewrite request
    Create parameters
    • Required:
      • To specifier: - must be one of the following
        • to_id
        • to_name
      • title
      • body
    Update
    HTTP MethodPUT/PATCH
    Base URL/dmails/$id.json
    Typewrite request
    Description$id is the dmail ID.
    Update parameters
    • Optional:
      • is_read
      • is_deleted
    Mark all as read
    HTTP MethodPOST
    Base URL/dmails/mark_all_as_read
    Typewrite request

    See also

    • Help:Common URL Parameters
    • Help:API

    External links

    Controllerhttps://github.com/danbooru/danbooru/blob/master/app/controllers/dmails_controller.rb
    Modelhttps://github.com/danbooru/danbooru/blob/master/app/models/dmail.rb
    Policyhttps://github.com/danbooru/danbooru/blob/master/app/policies/dmail_policy.rb
    Terms / Privacy / Upgrade / Contact /