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

Custom Folders

This API operation can create, clear, delete custom folders as well as move emails from and to custom folders.

URL / Endpoint

Need help with Postman?

POST /v1/Email/CustomFolders

POST /v1/Groups/Email/CustomFolders (See Group manager)

Request

PropertyTypeDescription
NewFolderName string Supply the name of the new folder here if you wish to create a new folder.
DeleteFolderID integer If you wish to remove the folder supply the ID of the folder you wish to remove.
ClearFolderID integer If you wish to remove all emails in the folder supply the ID of the folder you wish the emails to be deleted from.
FromFolderID integer If you wish to move all emails in the folder to another folder supply the ID of the source folder here.
Note: When supplying this value the ToFolderID is required.
ToFolderID integer If you wish to move all emails to this folder from another folder supply the ID of the destination folder here.
Note: When supplying this value the FromFolderID is required.

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 POST method with serialized JSON in the request body.

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

POST method

https://api-sandbox.adultwork.com/v1/Email/CustomFolders

Authorization: bearer {your-access-token}
{ "FromFolderID" : 0, "ToFolderID" : 1 }

POST as Group manager

https://api-sandbox.adultwork.com/v1/Groups/Email/CustomFolders

Authorization: bearer {your-access-token}
{ "UserID" : 123456, "FromFolderID" : 0, "ToFolderID" : 1 }

Response

PropertyTypeDescription
  array of CustomFolders The custom email folders of the user.

Response Sample

The following example shows a sample returned by the API.

[
    {
        "FolderID": 0,
        "Name": "Inbox",
        "UnreadEmails": 0,
        "TotalEmails": 0
    },
    {
        "FolderID": 1,
        "Name": "My custom folder",
"UnreadEmails": 1, "TotalEmails": 1 } ]
<ArrayOfEmailFolder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.Emails">
    <EmailFolder>
        <FolderID>0</FolderID>
        <Name>Inbox</Name>
        <TotalEmails>0</TotalEmails>
        <UnreadEmails>0</UnreadEmails>
    </EmailFolder>
    <EmailFolder>
        <FolderID>1</FolderID>
        <Name>My custom folder</Name>
        <TotalEmails>1</TotalEmails>
        <UnreadEmails>1</UnreadEmails>
    </EmailFolder>
</ArrayOfEmailFolder>