Danbooru
Login Posts Comments Notes Artists Tags Pools Wiki Forum More ยป
Listing Upload Hot Changes Help
A list of tags to help categorize this search. Space delimited.

Search

  • Help
guro
scat
furry -rating:g

Tags

Options

Related

  • Deleted
  • Random
  • History
  • Discussions
  • Count
  • Posts Wiki Search »
  • Size
    • Small
    • Medium
    • Large
    • Huge
    • Huge
    • Gigantic
    • Absurd
    • Show scores
  • Edit

    Table of Contents
    • 01. Record field format
    • 02. Derived field format
    • 03. Associated attributes
    • 04. Index
    • 05. Show
    • 06. Create
    • 07. Update
    • 08. Mark all as read
    • 09. See also
    • 10. External links

    This page has details for how to interact with dmail records through the API.

    01 Record field format


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

    02 Derived field format


    These are values which are not part of the actual record, but instead are derived from calculations and record lookups on the fly.

    NameTypeDetailsNotes
    keystringCryptographic key generated from the record.

    03 Associated attributes


    The following is the list of relations that can be included in the API results (see Help:Common URL parameters for more info):

    NameTypeNumberAvailabilityDetails
    ownerusersinglerequired
    tousersinglerequired
    fromusersinglerequired

    04 Index


    Returns multiple dmail records.

    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

    Search parameters take the following format (see Help:Common URL parameters for more info):

    search[FIELD]=VALUE

    The following are the base fields along with their associated type. Check the syntax pages for all of the available variations.

    • Number syntax
      • id
      • created_at
      • updated_at
    • Text syntax
      • title
      • body
    • User syntax
      • to
      • from
    • Boolean syntax
      • is_read
      • is_deleted
    Special search parameters

    The following are additional search fields.

    • message_matches - Case-insensitive wildcard search on the title and body fields.
    • folder
      • 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.

    05 Show


    Returns a single dmail record.

    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.

    06 Create


    Creates a single dmail record.

    HTTP MethodPOST
    Base URL/dmails.json
    Typewrite request
    Create parameters

    Dmail parameters take the following format (see Help:API Write Requests for more info):

    dmail[FIELD]=VALUE
    • Required:
      • To specifier: - must be one of the following
        • to_id
        • to_name
      • title
      • body

    07 Update


    Updates a single comment record.

    HTTP MethodPUT/PATCH
    Base URL/dmails/$id.json
    Typewrite request
    Description$id is the dmail ID.
    Update parameters
    • Optional:
      • is_read
      • is_deleted

    08 Mark all as read


    Marks all records as read.

    HTTP MethodPOST
    Base URL/dmails/mark_all_as_read.json
    Typewrite request

    09 See also


    • Help:Common URL Parameters
    • Help:API

    10 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

    View wiki

    No posts found.

    1
    Terms / Privacy / Upgrade / Contact /