Our v3 API is now available! Learn more by visiting the v3 developer portal. Creating new v2 API keys is no longer supported.

Move a Library File

Use this endpoint to move one or more Library files to a different Libray folder. To move a single file, you can also use the Library Individual File PUT method.

Methods:

Click a method to view its documentation

PUT

DescriptionTOP

Privileges required: mylibrary:file:update

To move one or more MyLibrary files to a different folder in the user's account, specify the destination folder using the folderId path parameter. The files to move are specified in an array of comma separated fileIds in the JSON request body. The request will fail with a 400 error if any of the fileIds are incorrect (not linked to an existing file). If the folderId is incorrect, the request fails with a 404 error.

Retrieve the moved file by making a GET call to the URI included in the response to retrieve the moved file.

PUT: https://api.constantcontact.com/v2/library/folders/{folderId}/files

Test API

name

type

default

description

api_key

query

REQUIRED; The API key for the application

folderId

path

Specifies the destination MyLibrary folder to which the files will be moved

Example JSON Request BodyTOP

[
    "8", "9"
]

Response CodesTOP

code

description

200

File(s) was successfully moved

400

Either JSON was malformed or there was a data validation error

401

Authentication failure

404

Folder with specified ID not found

406

Unsupported accept header value, must be application/json

415

Unsupported content-type in the header, must be application/json

500

Internal server error occurred

Response StructureTOP

property

type(max length)

description

Example ResponseTOP

[
    {
        "id": "9",
        "uri": "https://api.constantcontact.com/v2/library/files/9"
    },
    {
        "id": "8",
        "uri": "https://api.constantcontact.com/v2/library/files/8"
    }
]