API Methods
Account ...
Blogs ...
Bookings ...
CreditHistory ...
Dashboard ...
DirectCam ...
DirectChat ...
Email ...
FieldReport ...
Groups ...
HotLists ...
Interview ...
Lists ...
Movie ...
Newsfeed ...
PhoneChat ...
Pictures ...
Profile ...
Search ...
Tours ...
Webcam ...

Get Emails

This API operation gets the emails of the authenticated user.

URL / Endpoint

Need help with Postman?

GET /v1/Email/GetEmails

GET /v1/Groups/Email/GetEmails (See Group manager)

Request

PropertyTypeDescription
Search string This can be used to search emails by subject or messages.
UnreadOnly boolean To let the API return the unread emails only set this to true.
FolderID integer To let the API return specific emails that are located in the folder set this ID to the ID of the folder.
Note: By supplying -1, you can retrieve the Sent items folder.
ReturnCustomFolders boolean To let the API return the custom email folders of the user set this to true.
ReturnEmailBody boolean To let the API return the body of the emails set this to true.
OrderBy string The order in which the emails are returned. Possible values are sentdate-asc, sentdate-desc, othernickname-asc, othernickname-desc. The default is sentdate-asc.
EmailsPerPage integer Sets the number of emails on each page of the result set. Accepts values from 1 to 100. Default is 50.
PageNumber integer Returns a specific page in the result set. Accepts values from 1 onwards.

Group manager

If the authenticated user is the manager of a group, the user can impersonate another member of the group. This allows the manager to perform tasks of other group members without having to authenticate as them.

The request can be build in the same way as the regular request, but targeted towards the Group manager endpoint. Additionally, it has the following extra parameters:

PropertyTypeDescription
UserID integer Required. The ID of a member in the group that will be impersonated for this request.

Request Information

HTTP Method / Verb

Parameters can be passed to this operation using the HTTP GET method by passing parameters over the query string of the URI.

Headers

The REST API uses HTTP request headers to determine what data type is returned or to authenticate the developer's API key. More information can be found in the overview section.

Authentication

An Authorization header is required with every request and must contain the access_token of the user. More information can be found in the Access tokens page.

Scopes

This endpoint requires the following scope:

Scope
account_communications

Samples

GET method

https://api-sandbox.adultwork.com/v1/Email/GetEmails
?ReturncustomFolders=true &ReturnEmailBody=true

Authorization: bearer {your-access-token}

GET as Group Manager

https://api-sandbox.adultwork.com/v1/Groups/Email/GetEmails
?UserID=123456 &ReturncustomFolders=true &ReturnEmailBody=true

Authorization: bearer {your-access-token}

Response

PropertyTypeDescription
FolderName string The name of the folder.
CurrentFolderID integer The ID of the folder you are currently getting the emails of.
HasCustomFolders boolean Indicates if the user has custom folders created.
CustomFolders aws:CustomFolders The custom folders of the user.
PageCount integer Represents the total number of pages in the result set.
PageNumber integer Represents the current page number.
EmailsTotal integer Represents the total number of emails in the result set.
EmailsPerPage integer Represents how many emails are listed on each page.
Emails array of aws:Emails The emails of the user.

Response Sample

The following example shows a sample returned by the API.

{
   "FolderName": "Inbox",
    "CurrentFolderID": 0,
    "HasCustomFolders": true,
    "CustomFolders": [
        {
            "FolderID": 1,
            "Name": "My custom folder",
            "UnreadEmails": 1,
            "TotalEmails": 1
        }
    ],
    "PageCount": 1,
    "PageNumber": 1,
    "EmailsTotal": 1,
    "EmailsPerPage": 50,
    "Emails": [
        {
"EmailID": 1, "Read": false, "Subject": "The subject", "Body": "The body", "SentDate": "2017-09-01T14:09:02.11", "OtherUserID": 123457, "OtherNickname": "SendingUser", "OtherRatings": { "Total": 0, "Positive": 0, "Neutral": 0, "Negative": 0, "Ratings": 0, "Disputes": 0 }, "OtherLogins": 0, "OtherHasNegativeAlias": false, "FolderID": 0, "Disclaimer": "Any money paid to the adult escorts listed on this website is for their time and companionship only. Whatever else that may occur if and when contact is made is the choice of consenting adults."
} }
<EmailSearchResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.Emails">
    <CurrentFolderID>0</CurrentFolderID>
    <CustomFolders>
        <EmailFolder>
            <FolderID>1</FolderID>
            <Name>My custom folder</Name>
            <TotalEmails>1</TotalEmails>
            <UnreadEmails>1</UnreadEmails>
        </EmailFolder>
    </CustomFolders>
<Emails> <Email> <Body>The body</Body> <Disclaimer>Any money paid to the adult escorts listed on this website is for their time and companionship only. Whatever else that may occur if and when contact is made is the choice of consenting adults.</Disclaimer> <EmailID>1</EmailID> <FolderID>0</FolderID> <OtherHasNegativeAlias>false</OtherHasNegativeAlias> <OtherLogins>0</OtherLogins> <OtherNickname>SendingUser</OtherNickname> <OtherRatings xmlns:d4p1="http://schemas.datacontract.org/2004/07/API.Models.Profile"> <d4p1:Disputes>0</d4p1:Disputes> <d4p1:Negative>0</d4p1:Negative> <d4p1:Neutral>0</d4p1:Neutral> <d4p1:Positive>0</d4p1:Positive> <d4p1:Ratings>0</d4p1:Ratings> <d4p1:Total>0</d4p1:Total> </OtherRatings> <OtherUserID>123457</OtherUserID> <Read>false</Read> <SentDate>2017-09-01T14:09:02.11</SentDate> <Subject>The subject</Subject> </Email>
</Emails>
<EmailsPerPage>50</EmailsPerPage> <EmailsTotal>1</EmailsTotal> <FolderName>Inbox</FolderName> <HasCustomFolders>true</HasCustomFolders> <PageCount>1</PageCount> <PageNumber>1</PageNumber>
</EmailSearchResult>