Customer Support
Trillion Direct Search Network 
 API Manual
API Queries - Add Folder
The add_folder function creates a new folder. This function requires additional parameters. Failing to include them will result in an error response.
Additional Parameters
- folder - Folder to be added. Does not accept multiple folders. (Required)
 - type - Specifies the format of the API response. Set to "json" for a JSON response; otherwise, the response will be in XML. (Optional)
 
Note: Make sure to URL encode all values, most importantly the campaign folder value.
Example query and response:
In this example, we will be adding the folder "Credit Cards".
Example query:
https://www.trillion.com/api.html?mode=add_folder&folder=Credit%20Cards
Use Trillion Direct API key in place of Bearer Token.
Note the URL encoding on the values.
Response (XML):
<results> <result Status="Success"/> </results>
Response (JSON):
                    {
                    "results": [ 
                    {
                    "Status": "Success"
                    }
                    ]
                    }
                
                The above response means that the folder was successfully created and will be in the "Paused" status. It will be automatically activated once approved by our system.
Error Responses:
Possible error responses for this function are:
- 412 - Folder is a required argument for this mode.
 - 421 - Folder name may only contain letters, digits and spaces.
 - 422 - The length of Folder name should not exceed 16 characters.
 - 428 - Folder already exists.
 - Other general errors, such as 200 - Internal Error or 300 - API Key invalid.
 
For a complete list of error responses, see the Error Codes manual page.