Movable Type Data API (9.1.0)

Download OpenAPI specification:

Assets

Upload a file

Permissions

  • upload
Authorizations:
mtauth
query Parameters
overwrite_once
integer
Enum: 0 1

If specify "1", the API always overwrites an existing file with the uploaded file. This parameter has been available since Movable Type 6.1.2

Request Body schema: multipart/form-data
autoRenameIfExists
integer
Default: 0
Enum: 0 1

If this value is "1" and a file with the same filename exists, the uploaded file is automatically renamed to a random generated name. Default is "0".

autoRenameNonAscii
integer
Enum: 0 1

If this value is "1", the filename is renamed non-ascii filename automatically

file
string <binary>

Actual file data

normalizeOrientation
integer
Default: 1
Enum: 0 1

If this value is "1" and the uploaded file has orientation information in Exif data, this file's orientation is automatically normalized. Default is "1".

path
string

The upload destination. You can specify the path to the under the site path.

site_id
integer

The site ID.

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "fileExtension": "string",
  • "filePath": "string",
  • "filename": "string",
  • "id": "string",
  • "label": "string",
  • "meta": {
    },
  • "mimeType": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "tags": [
    ],
  • "type": "string",
  • "updatable": true,
  • "url": "string"
}

Retrieve assets in the specified site

Authorizations:
mtauth
path Parameters
site_id
required
integer
query Parameters
search
string

Search query.

searchFields
string
Default: "label"

The comma separated field name list to search.

Default: label

limit
integer
Default: 10

Maximum number of assets to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

filterKeys
string
Default: "class"

The comma separated field name list to filter.

Default: class

class
string

The target asset class to retrieve. Supported values are image, audio, video, file and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.

sortBy
string
Default: "created_on"
Enum: "file_name" "created_by" "created_on"

file_name

Sort by the filename of each asset.

created_by

Sort by the ID of user who created each asset.

created_on

(default) Sort by the created time of each asset.

Default: created_on

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return assets in descending order.

ascend

Return assets in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the asset resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

relatedAssets
integer
Enum: 0 1

If you want to retrieve related assets (e.g. thumbnail, popup html) that generated by original asset, you should specify this parameter as true.

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Upload a file Deprecated

This endpoint is marked as deprecated in v2.0.

Upload single file to specific site.

Permissions

  • upload
Authorizations:
mtauth
path Parameters
site_id
required
integer
Request Body schema: multipart/form-data
autoRenameIfExists
integer
Enum: 0 1

If this value is "1" and the file with the same filename exists, the uploaded file is automatically renamed to the random generated name. Default is "0".

file
string <binary>

The actual file data

normalizeOrientation
integer
Enum: 0 1

If this value is "1" and the uploaded file has a orientation information in Exif, this file's orientation is automatically normalized. Default is "1".

path
string

The upload destination. You can specify the path to the under the site path.

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "fileExtension": "string",
  • "filePath": "string",
  • "filename": "string",
  • "id": "string",
  • "label": "string",
  • "meta": {
    },
  • "mimeType": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "tags": [
    ],
  • "type": "string",
  • "updatable": true,
  • "url": "string"
}

Delete an asset

  • Authorization is required.

Permissions

  • Manage Assets

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
asset_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "fileExtension": "string",
  • "filePath": "string",
  • "filename": "string",
  • "id": "string",
  • "label": "string",
  • "meta": {
    },
  • "mimeType": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "tags": [
    ],
  • "type": "string",
  • "updatable": true,
  • "url": "string"
}

Retrieve single asset by its ID

Authorizations:
mtauth
path Parameters
site_id
required
integer
asset_id
required
integer
query Parameters
fields
string

The field list to retrieve as part of the asset resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "fileExtension": "string",
  • "filePath": "string",
  • "filename": "string",
  • "id": "string",
  • "label": "string",
  • "meta": {
    },
  • "mimeType": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "tags": [
    ],
  • "type": "string",
  • "updatable": true,
  • "url": "string"
}

Update an asset

  • Authorization is required.

Permissions

  • Manage Assets

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
asset_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (asset_updatable)

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "fileExtension": "string",
  • "filePath": "string",
  • "filename": "string",
  • "id": "string",
  • "label": "string",
  • "meta": {
    },
  • "mimeType": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "tags": [
    ],
  • "type": "string",
  • "updatable": true,
  • "url": "string"
}

Retrieve a list of entries that related with specific asset

  • Authorization is required to include unpublished entries.

Permissions

  • edit_entry
    • to retrieve unpublished entry
Authorizations:
mtauth
path Parameters
site_id
required
integer
asset_id
required
integer
query Parameters
search
string

Search query.

searchFields
string
Default: "title,body,more,keywords,excerpt,basename"

The comma separated field name list to search.

Default: title,body,more,keywords,excerpt,basename

limit
integer
Default: 10

Maximum number of entries to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

sortBy
string
Default: "authored_on"
Enum: "authored_on" "title" "created_on" "modified_on"

The field name for sort. You can specify one of following values

  • authored_on
  • title
  • created_on
  • modified_on

Default: authored_on

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return entries in descending order.

ascend

Return entries in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the entry resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

includeIds
string

The comma separated ID list of entries to include to result.

excludeIds
string

The comma separated ID list of entries to exclude from result.

status
string
Enum: "Draft" "Publish" "Review" "Future" "Spam" "Unpublish"

Filter by container entry's status.

Draft

entry_status is 1.

Publish

entry_status is 2.

Review

entry_status is 3.

Future

entry_status is 4.

Spam

entry_status is 5.

Unpublish

entry_status is 6.

maxComments
integer

This is an optional parameter. Maximum number of comments to retrieve as part of the entries resource. If this parameter is not supplied, no comments will be returned.

maxTrackbacks
integer

This is an optional parameter. Maximum number of received trackbacks to retrieve as part of the entries resource. If this parameter is not supplied, no trackbacks will be returned.

no_text_filter
integer
Enum: 0 1

If you want to fetch the raw text, set to '1'. New in v2

filterKeys
string
Default: "status"

The comma separated field name list to filter.

Default: status

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Retrieve a list of pages that related with specific asset

  • Authorization is required to include unpublished pages.

Permissions

  • manage_pages
    • to retrieve unpublished page
Authorizations:
mtauth
path Parameters
site_id
required
integer
asset_id
required
integer
query Parameters
search
string

Search query.

searchFields
string
Default: "title,body,more,keywords,excerpt,basename"

The comma separated field name list to search.

Default: title,body,more,keywords,excerpt,basename

limit
integer
Default: 10

Maximum number of pages to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

sortBy
string
Default: "modified_on"
Enum: "authored_on" "title" "created_on" "modified_on"

The field name for sort. You can specify one of following values

  • authored_on
  • title
  • created_on
  • modified_on

Default: modified_on

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return pages in descending order.

ascend

Return pages in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the page resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

includeIds
string

The comma separated ID list of pages to include to result.

excludeIds
string

The comma separated ID list of pages to exclude from result.

status
string
Enum: "Draft" "Publish" "Review" "Future" "Spam" "Unpublish"

Filter by container page's status.

Draft

entry_status is 1.

Publish

entry_status is 2.

Review

entry_status is 3.

Future

entry_status is 4.

Spam

entry_status is 5.

Unpublish

entry_status is 6.

maxComments
integer

This is an optional parameter. Maximum number of comments to retrieve as part of the pages resource. If this parameter is not supplied, no comments will be returned.

maxTrackbacks
integer

This is an optional parameter. Maximum number of received trackbacks to retrieve as part of the pages resource. If this parameter is not supplied, no trackbacks will be returned.

no_text_filter
integer
Enum: 0 1

If you want to fetch the raw text, set to '1'. New in v2

filterKeys
string
Default: "status"

The comma separated field name list to filter.

Default: status

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Get thumbnail of an asset

This endpoint requires one of parameter 'width' or 'height' or 'scale' Also, cannot use these parameters at same time.

Authorizations:
mtauth
path Parameters
site_id
required
integer
asset_id
required
integer
query Parameters
width
integer

The width of the thumbnail to generate. If this is the only parameter specified then the thumbnail's width will be scaled proportionally to the height. When a value longer than the original image is specified, it will be ignored.

height
integer

The height of the thumbnail to generate. If this is the only parameter specified then the thumbnail's height will be scaled proportionally to the width. When both of height and width are specified, the longer side of the original image will be processed, and the lesser side will be scaled proportionally.

scale
string

The percentage by which to reduce or increase the size of the current asset.

square
integer
Enum: 0 1

If set to "1" then the thumbnail generated will be square, where the length of each side of the square will be equal to the shortest side of the image.

Responses

Response samples

Content type
application/json
{
  • "height": 0,
  • "url": "string",
  • "width": 0
}

Retrieve assets that related with specified entry

Authorizations:
mtauth
path Parameters
site_id
required
integer
entry_id
required
integer
query Parameters
limit
integer
Default: 10

Maximum number of assets to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

class
string

The target asset class to retrieve. Supported values are image, audio, video, file and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.

sortBy
string
Default: "created_on"
Enum: "file_name" "created_by" "created_on"

file_name

Sort by the filename of each asset.

created_by

Sort by the ID of user who created each asset.

created_on

(default) Sort by the created time of each asset.

Default: created_on

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return assets in descending order.

ascend

Return assets in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the asset resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

filterKeys
string
Default: "class"

The comma separated field name list to filter.

Default: class

searchFields
string
Default: "label"

The comma separated field name list to search.

Default: label

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Retrieve assets that related with specified page

Authorizations:
mtauth
path Parameters
site_id
required
integer
page_id
required
integer
query Parameters
limit
integer
Default: 10

Maximum number of assets to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

filterKeys
string
Default: "class"

The comma separated field name list to filter.

Default: class

searchFields
string
Default: "label"

The comma separated field name list to search.

Default: label

class
string

The target asset class to retrieve. Supported values are image, audio, video, file and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.

sortBy
string
Default: "created_on"
Enum: "file_name" "created_by" "created_on"

file_name

Sort by the filename of each asset.

created_by

Sort by the ID of user who created each asset.

created_on

(default) Sort by the created time of each asset.

Default: created_on

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return assets in descending order.

ascend

Return assets in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the asset resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Retrieve assets that related with specified tag

Authorizations:
mtauth
path Parameters
site_id
required
integer
tag_id
required
integer
query Parameters
limit
integer
Default: 10

Maximum number of assets to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

filterKeys
string
Default: "class"

The comma separated field name list to filter.

Default: class

searchFields
string
Default: "label"

The comma separated field name list to search.

Default: label

class
string

The target asset class to retrieve. Supported values are image, audio, video, file and any values added by plugins. If you want to retrieve multiple classes, specify the values separated by commas.

sortBy
string
Default: "created_on"
Enum: "file_name" "created_by" "created_on"

file_name

Sort by the filename of each asset.

created_by

Sort by the ID of user who created each asset.

created_on

(default) Sort by the created time of each asset.

Default: created_on

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return assets in descending order.

ascend

Return assets in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the asset resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Authentication

Invalidate current access token. This is not logout

Invalidate current session. This is like logout. All access tokens related to that session are invalidated too.

Authorization is required. but if there is an effective session, user can revoke by the following methods.

In the case of a web browser, can be authorized by httponly-cookie.

In the case of other than a browser, can be authorized by sending a sessionId that is retrieved via authentication endpoints in MTAuth request header.

MTAuth sessionId={retrieved sessionId}

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
header Parameters
X-MT-Authorization
string

Input MTAuth sessionId={sessionId}

Request Body schema: application/x-www-form-urlencoded
clientId
string

This is not required if you specify session id via "X-MT-Authorization" request header. You can create new access token if you have a session id related to this clientId, although you do not have an access token.

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}

User authentication by username and password

Create a new session and access token. This is like sign-in.

Authorizations:
mtauth
Request Body schema: application/x-www-form-urlencoded
clientId
string

This is not required if you specify session id via "X-MT-Authorization" request header. You can create new access token if you have a session id related to this clientId, although you do not have an access token.

mtDataApiLoginMagicToken
string

This is not required if you authenticate except via browser. If this parameter is passed and valid the MT will set cookie in order to start a session.

password
string <password>

Your Web Service Password

remember
integer
Enum: 0 1

If true (generally, "1" is specified.), a new session will be created as a persistent session. If you want to specify false, you can pass "" or "0" to this parameter.

username
string

Your Sign-in Name

Responses

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "expiresIn": 0,
  • "remember": true,
  • "sessionId": "string"
}

Return authorization(login) form as HTML

Return authorization(login) form as HTML.

Authorizations:
mtauth
query Parameters
redirectUrl
required
string

This is required. When you succeed in login, you are redirected to the redirectUrl with "#_login".

clientId
required
string

This is required. the client ID of the application.

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Invalidate current session. This is like logout

Invalidate current access token. This is not logout. If the browser has active session id, new access token can be obtained easily.

Authorization is required.

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth

Responses

Response samples

Content type
application/json
{
  • "status": "string"
}

Create new access token related to current session

Create new access token related to current session.

In order to create new access token, in the case of a web browser, it is necessary to create session via authentication endpoints beforehand.

In the case of other than a browser, it is necessary to send a sessionId that is retrieved via authentication endpoints in MTAuth request header.

MTAuth sessionId={retrieved sessionId}

Authorizations:
mtauth
header Parameters
X-MT-Authorization
string

Input MTAuth sessionId={sessionId}

Request Body schema: application/x-www-form-urlencoded
clientId
string

This is not required if you specify session id via "X-MT-Authorization" request header. You can create new access token if you have a session id related to this clientId, although you do not have an access token.

Responses

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "expiresIn": 0
}

BackupRestore

Backup specified site

Authorizations:
mtauth
path Parameters
site_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "backupFiles": [
    ],
  • "status": "string"
}

Categories

Retrieve categories in the specified site

Authorizations:
mtauth
path Parameters
site_id
required
integer
query Parameters
search
string

Search query.

searchFields
string
Default: "label,basename"

The comma separated field name list to search.

Default: label,basename

limit
integer
Default: 10

Maximum number of categories to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

sortBy
string
Default: "user_custom"
Enum: "user_custom" "created_by" "id" "basename" "label"

user_custom

Sort order you specified on the Manage Categories screen.

created_by

Sort by the ID of user who created each category.

id

Sort by the ID of each category.

basename

Sort by the basename of each category.

label

Sort by the label of each category.

Default: user_custom

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return categories in descending order.

ascend

Return categories in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the category resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

top
integer
Default: 0
Enum: 0 1

If set to 1, retrieves only top level categories. New in v2

Default: 0

includeIds
string

The comma separated ID list of categories to include to result.

excludeIds
string

The comma separated ID list of categories to exclude from result.

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create a new category

Authorization is required.

Permission

  • Manage Categories
Authorizations:
mtauth
path Parameters
site_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (category_updatable)

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Rearrange existing categories in a new order

  • Authorization is required.
  • This method returns rearranged Categories resource.

Permission

  • Manage Categories
Authorizations:
mtauth
path Parameters
site_id
required
integer
Request Body schema: application/x-www-form-urlencoded
categories
string

Array of category resource that were rearranged.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete an existing category

  • Authorization is required.
  • This method returns deleted Category resource.

Permission

  • Manage Categories

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Retrieve single category by its ID

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_id
required
integer
query Parameters
fields
string

The field list to retrieve as part of the category resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Update an existing category

  • Authorization is required.

Permission

  • Manage Categories

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (category_updatable)

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Retrieve child categories from the specified category

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_id
required
integer
query Parameters
maxDepth
integer

The depth of retrieving parent categories.

Default: 0

includeCurrent
integer
Default: 0
Enum: 0 1

1

The list does not include current category.

0

The list includes current category.

Default: 0

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Retrieve a list of entries by specific category

  • Authorization is required to include unpublished entries.

Permissions

  • edit_entry
    • to retrieve unpublished entry
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_id
required
integer
query Parameters
search
string

Search query.

searchFields
string
Default: "title,body,more,keywords,excerpt,basename"

The comma separated field name list to search.

Default: title,body,more,keywords,excerpt,basename

limit
integer
Default: 10

Maximum number of entries to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

sortBy
string
Default: "authored_on"
Enum: "authored_on" "title" "created_on" "modified_on"

The field name for sort. You can specify one of following values

  • authored_on
  • title
  • created_on
  • modified_on

Default: authored_on

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return entries in descending order.

ascend

Return entries in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the entry resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

includeIds
string

The comma separated ID list of entries to include to result.

excludeIds
string

The comma separated ID list of entries to exclude from result.

status
string
Enum: "Draft" "Publish" "Review" "Future" "Spam" "Unpublish"

Filter by container entry's status.

Draft

entry_status is 1.

Publish

entry_status is 2.

Review

entry_status is 3.

Future

entry_status is 4.

Spam

entry_status is 5.

Unpublish

entry_status is 6.

maxComments
integer

This is an optional parameter. Maximum number of comments to retrieve as part of the entries resource. If this parameter is not supplied, no comments will be returned.

maxTrackbacks
integer

This is an optional parameter. Maximum number of received trackbacks to retrieve as part of the entries resource. If this parameter is not supplied, no trackbacks will be returned.

no_text_filter
integer
Enum: 0 1

If you want to fetch the raw text, set to '1'. New in v2

filterKeys
string
Default: "status"

The comma separated field name list to filter.

Default: status

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Retrieve parent categories from the specified category

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_id
required
integer
query Parameters
maxDepth
integer

The depth of retrieving parent categories.

Default: 0

includeCurrent
integer
Default: 0
Enum: 0 1

1

The list does not include current category.

0

The list includes current category.

Default: 0

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Retrieve siblings categories from the specified category

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_id
required
integer
query Parameters
search
string

Search query.

searchFields
string
Default: "label,basename"

The comma separated field name list to search.

Default: label,basename

limit
integer
Default: 10

Maximum number of categories to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

sortBy
string
Default: "user_custom"
Enum: "user_custom" "created_by" "id" "basename" "label"

user_custom

Sort order you specified on the Manage Categories screen.

created_by

Sort by the ID of user who created each category.

id

Sort by the ID of each category.

basename

Sort by the basename of each category.

label

Sort by the label of each category.

Default: user_custom

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return categories in descending order.

ascend

Return categories in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the category resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

top
integer
Default: 0
Enum: 0 1

If set to 1, retrieves only top level categories. New in v2

Default: 0

includeIds
string

The comma separated ID list of categories to include to result.

excludeIds
string

The comma separated ID list of categories to exclude from result.

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Category Collection for category set

Retrieve list of categories of the specified category set.

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
query Parameters
maxDepth
integer

The depth of retrieving parent categories.

includeCurrent
integer
Default: 0
Enum: 0 1
  • 1: The list does not include current category.
  • 0: The list includes current category.
limit
integer
Default: 10

Maximum number of categories to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

searchFields
string
Default: "label,basename"

The comma separated field name list to search.

Default: label,basename

sortBy
string
Default: "user_custom"

Default: user_custom

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return categories in descending order.

ascend

Return categories in ascending order.

Default: descend

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create a new category for category set

Authentication required.

Create a new category in category set. This endpoint needs following permissions.

  • Manage Category Set

Post form data is following:

  • category (Category) - Category resource
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (category_updatable)

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Save hierarchical categories order in category set

Authentication required.

Save hierarchical categories order. This endpoint need folllowing permissions.

  • Manage Category Set

This method returns rearranged Categories collection.

Post form data is following:

  • categories (array[Category]) - Array of Categories resource that were rearranged.
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
Request Body schema: application/x-www-form-urlencoded
categories
string

Array of category resource that were rearranged.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete single category in category set

Authentication required.

Update an existing category. This endpoint need folllowing permissions.

  • Manage Category Set

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Fetch single category in category set

Retrieve a single category by its ID.

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer
query Parameters
fields
string

The field list to retrieve as part of the category resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Update single category in category set

Authentication required.

Update an existing category. This endpoint need folllowing permissions.

  • Manage Categoy Set

Post form data is following:

  • category (Category) - Category resource

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (category_updatable)

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Category Collection of child categories for category set

Retrieve list of child categories of the specified category set.

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer
query Parameters
maxDepth
integer

The depth of retrieving parent categories.

includeCurrent
integer
Default: 0
Enum: 0 1
  • 1: The list does not include current category.
  • 0: The list includes current category.
header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Category Collection of parent categories for category set

Retrieve list of parent categories of the specified category set.

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer
query Parameters
maxDepth
integer

The depth of retrieving parent categories.

includeCurrent
integer
Default: 0
Enum: 0 1
  • 1: The list does not include current category.
  • 0: The list includes current category.
header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Category Collection of sibling categories for category set

Retrieve list of sibling categories of the specified category set.

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer
query Parameters
search
string

Search query.

searchFields
string
Default: "label,basename"

The comma separated field name list to search.

Default: label,basename

limit
integer
Default: 10

Maximum number of categories to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

sortBy
string
Default: "user_custom"
Enum: "user_custom" "created_by" "id" "basename" "label"
  • user_custom: Sort order you specified on the Manage Categories screen.
  • created_by: Sort by the ID of user who created each category.
  • id: Sort by the ID of each category.
  • basename: Sort by the basename of each category.
  • label: Sort by the label of each category.
sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return categories in descending order.

ascend

Return categories in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the category resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

top
integer
Default: 0
Enum: 0 1

If set to 1, retrieves only top level categories. New in v2

includeIds
string

The comma separated ID list of categories to include to result.

excludeIds
string

The comma separated ID list of categories to exclude from result.

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Retrieve categories in the specified entry

Permissions

  • edit_entry
    • If you want to retrieve the non-published entry's categories.
Authorizations:
mtauth
path Parameters
site_id
required
integer
entry_id
required
integer
query Parameters
search
string

Search query.

searchFields
string
Default: "label,basename"

The comma separated field name list to search.

Default: label,basename

limit
integer
Default: 10

Maximum number of categories to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

sortBy
string
Default: "user_custom"
Enum: "user_custom" "created_by" "id" "basename" "label"

user_custom

Sort order you specified on the Manage Categories screen.

created_by

Sort by the ID of user who created each category.

id

Sort by the ID of each category.

basename

Sort by the basename of each category.

label

Sort by the label of each category.

Default: user_custom

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return categories in descending order.

ascend

Return categories in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the category resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

top
integer
Default: 0
Enum: 0 1

If set to 1, retrieves only top level categories. New in v2

Default: 0

includeIds
string

The comma separated ID list of categories to include to result.

excludeIds
string

The comma separated ID list of categories to exclude from result.

type
string
Enum: "primary" "secondary"

primary

Retrieve primary category only

secondary

Retrieve secondary categories only

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Category Sets

Category Set Collection

Retrieve list of category set in the specified site. Authentication required if you want retrieve private field in categorySet resource. Required permissions are as follows.

  • Manage Category Set
  • If you use search parameter, you must specify search parameter with searchFields parameter. (This will be fixed in a future release.)
Authorizations:
mtauth
path Parameters
site_id
required
integer
query Parameters
search
string

Search query.

searchFields
string

The comma separated field name list to search.

limit
integer

Maximum number of category_sets to retrieve.

offset
integer

0-indexed offset.

sortBy
string
Default: "name"
Enum: "id" "name" "created_on" "modified_on" "content_type_count"

The field name for sort. You can specify one of following values.

  • id
  • name
  • created_on
  • modified_on
  • content_type_count
sortOrder
string
Enum: "descend" "ascend"

descend

Return category_sets in descending order.

ascend

Return category_sets in ascending order.

fields
string

The field list to retrieve as part of the category_set resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

includeIds
string

The comma separated ID list of category_sets to include to result.

excludeIds
string

The comma separated ID list of category_sets to exclude from result.

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create a new category set

Authentication Required

Create a new category set. This endpoint requires following permissions.

  • Manage Category Set

Post form data is following

  • category_set (CategorySet) - Single CategorySet resource
Authorizations:
mtauth
path Parameters
site_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (category_set_updatable)

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "categories": [
    ],
  • "content_type_count": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "updatable": true
}

Delete category set

Authentication required Delete a single category set. This endpoint requires following permissions.

  • Manage Category Set

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "categories": [
    ],
  • "content_type_count": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "updatable": true
}

Fetch single category set

Fetch a single category set. Authentication required if you want retrieve private field in categorySet resource. Required permissions are as follows.

  • Manage Category Set
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
query Parameters
fields
string

The field list to retrieve as part of the category_set resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "categories": [
    ],
  • "content_type_count": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "updatable": true
}

Update category set

Authentication required Update single category set. This endpoint requires following permissions.

  • Manage Category Set

Cannot update/insert/delete categories by this endpoint. If you want to manage categories in category set, please use Categories API.

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (category_set_updatable)

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "categories": [
    ],
  • "content_type_count": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "updatable": true
}

Category Collection for category set

Retrieve list of categories of the specified category set.

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
query Parameters
maxDepth
integer

The depth of retrieving parent categories.

includeCurrent
integer
Default: 0
Enum: 0 1
  • 1: The list does not include current category.
  • 0: The list includes current category.
limit
integer
Default: 10

Maximum number of categories to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

searchFields
string
Default: "label,basename"

The comma separated field name list to search.

Default: label,basename

sortBy
string
Default: "user_custom"

Default: user_custom

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return categories in descending order.

ascend

Return categories in ascending order.

Default: descend

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create a new category for category set

Authentication required.

Create a new category in category set. This endpoint needs following permissions.

  • Manage Category Set

Post form data is following:

  • category (Category) - Category resource
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (category_updatable)

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Save hierarchical categories order in category set

Authentication required.

Save hierarchical categories order. This endpoint need folllowing permissions.

  • Manage Category Set

This method returns rearranged Categories collection.

Post form data is following:

  • categories (array[Category]) - Array of Categories resource that were rearranged.
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
Request Body schema: application/x-www-form-urlencoded
categories
string

Array of category resource that were rearranged.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete single category in category set

Authentication required.

Update an existing category. This endpoint need folllowing permissions.

  • Manage Category Set

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Fetch single category in category set

Retrieve a single category by its ID.

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer
query Parameters
fields
string

The field list to retrieve as part of the category resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Update single category in category set

Authentication required.

Update an existing category. This endpoint need folllowing permissions.

  • Manage Categoy Set

Post form data is following:

  • category (Category) - Category resource

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (category_updatable)

Responses

Response samples

Content type
application/json
{
  • "archiveLink": "string",
  • "basename": "string",
  • "blog": {
    },
  • "class": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "description": "string",
  • "id": 0,
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": "string",
  • "updatable": true
}

Category Collection of child categories for category set

Retrieve list of child categories of the specified category set.

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer
query Parameters
maxDepth
integer

The depth of retrieving parent categories.

includeCurrent
integer
Default: 0
Enum: 0 1
  • 1: The list does not include current category.
  • 0: The list includes current category.
header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Category Collection of parent categories for category set

Retrieve list of parent categories of the specified category set.

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer
query Parameters
maxDepth
integer

The depth of retrieving parent categories.

includeCurrent
integer
Default: 0
Enum: 0 1
  • 1: The list does not include current category.
  • 0: The list includes current category.
header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Category Collection of sibling categories for category set

Retrieve list of sibling categories of the specified category set.

Authorizations:
mtauth
path Parameters
site_id
required
integer
category_set_id
required
integer
category_id
required
integer
query Parameters
search
string

Search query.

searchFields
string
Default: "label,basename"

The comma separated field name list to search.

Default: label,basename

limit
integer
Default: 10

Maximum number of categories to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

sortBy
string
Default: "user_custom"
Enum: "user_custom" "created_by" "id" "basename" "label"
  • user_custom: Sort order you specified on the Manage Categories screen.
  • created_by: Sort by the ID of user who created each category.
  • id: Sort by the ID of each category.
  • basename: Sort by the basename of each category.
  • label: Sort by the label of each category.
sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return categories in descending order.

ascend

Return categories in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the category resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

top
integer
Default: 0
Enum: 0 1

If set to 1, retrieves only top level categories. New in v2

includeIds
string

The comma separated ID list of categories to include to result.

excludeIds
string

The comma separated ID list of categories to exclude from result.

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Comments

Retrieve a list of comments

Retrieve a list of comments.

Authorization is required to include unpublished comments

Authorizations:
mtauth
path Parameters
site_id
required
integer
query Parameters
limit
integer

This is an optional parameter. Maximum number of comments to retrieve. Default is 10.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

includeIds
string

This is an optional parameter. The comma separated ID list of comments to include to result.

excludeIds
string

This is an optional parameter. The comma separated ID list of comments to exclude from result.

status
string
Enum: "Approved" "Pending" "Spam"

This is an optional parameter. Filter by status.

Approved

comment_visible is 1 and comment_junk_status is 1.

Pending

comment_visible is 0 and comment_junk_status is 1.

Spam

comment_junk_status is -1.

entryStatus
string
Enum: "Draft" "Publish" "Review" "Future" "Spam"

This is an optional parameter. Filter by parent entry's status.

Draft

entry_status is 1.

Publish

entry_status is 2.

Review

entry_status is 3.

Future

entry_status is 4.

Spam

entry_status is 5.

filterKeys
string
Default: "status"

The comma separated field name list to filter.

Default: status

searchFields
string
Default: "body"

The comma separated field name list to search.

Default: body

sortBy
string
Default: "id"

Default: id

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return comments in descending order.

ascend

Return comments in ascending order.

Default: descend

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Delete a comment

Delete a comment.

Authorization is required.

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
comment_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Retrieve a single comment by its ID

Retrieve a single comment by its ID.

Authorization is required if the comment status is "unpublished". If the comment status is "published", then this method can be called without authorization.

Authorizations:
mtauth
path Parameters
site_id
required
integer
comment_id
required
integer
header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Update a comment

Update a comment.

Authorization is required.

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
comment_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (comment_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Retrieve a list of comments for an entry

Retrieve a list of comments for an entry.

Authorization is required to include unpublished comments

Authorizations:
mtauth
path Parameters
site_id
required
integer
entry_id
required
integer
query Parameters
limit
integer

This is an optional parameter. Maximum number of comments to retrieve. Default is 10.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

filterKeys
string
Default: "status"

The comma separated field name list to filter.

Default: status

searchFields
string
Default: "body"

The comma separated field name list to search.

Default: body

sortBy
string
Default: "id"

Default: id

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return comments in descending order.

ascend

Return comments in ascending order.

Default: descend

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create a new comment on an entry

Create a new comment on an entry.

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
entry_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (comment_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Reply to specified comment

Reply to specified comment.

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
entry_id
required
integer
comment_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (comment_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Retrieve a list of comments for the specified page

Retrieve a list of comments for a page.

Authorization is required to include unpublished comments

Authorizations:
mtauth
path Parameters
site_id
required
integer
page_id
required
integer
query Parameters
limit
integer

This is an optional parameter. Maximum number of comments to retrieve. Default is 10.

offset
integer

This is an optional parameter. 0-indexed offset. Default is 0.

filterKeys
string
Default: "status"

The comma separated field name list to filter.

Default: status

searchFields
string
Default: "body"

The comma separated field name list to search.

Default: body

sortBy
string
Default: "id"

Default: id

sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return comments in descending order.

ascend

Return comments in ascending order.

Default: descend

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create a new comment on a page

Create a new comment on a page.

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
page_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (comment_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Reply to specified comment

Reply to specified comment.

Authorization is required.

Authorizations:
mtauth
path Parameters
site_id
required
integer
page_id
required
integer
comment_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (comment_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "blog": {
    },
  • "body": "string",
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "customFields": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "entry": {
    },
  • "id": 0,
  • "link": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "parent": 0,
  • "status": "string",
  • "updatable": true
}

Common API

Retrieve OpenAPI schema

Authorizations:
mtauth

Responses

Response samples

Content type
application/json
{ }

Get server API version

Retrieves Data API version of the server.

This endpoint has been available since Movable Type 6.2.4.

This endpoint does not need /v3 or something API endpoint version identifier. You can call like: https://host/path/your-mt-data-api.cgi/version

Authorizations:
mtauth

Responses

Response samples

Content type
application/json
{
  • "apiVersion": 0.1,
  • "endpointVersion": "string"
}

Content Data

Publish Content Data

Authentication Required Publish content data. This endpoint requires following permissions.

  • Manage Content Data (site, sistem, each content type)
  • Edit All Content Data (each content type)
Authorizations:
mtauth
query Parameters
blogId
integer

Target site ID. Either blogID or blogIds must be specified.

blogIds
string

The comma separated site ID list. Either blogID or blogIds must be specified.

ids
string

The comma separated content data ID list. You should specifiy this parameter to next call if this endpoint returns ‘Rebuilding’ status and you want to continue to publish.

startTime
string

The string of build start time. You should specifiy this parameter to next call if this endpoint returns ‘Rebuilding’ status and you want to continue to publish.

Responses

Response samples

Content type
application/json
{
  • "restIds": "string",
  • "startTime": "string",
  • "status": "string"
}

Content Data Collection

Retrieve list of content data of specified content type in the specified site.

Authentication required if you want to retrieve unpublished content data. Required pemissions are as follows.

  • Manage Content Data (site, system, each content type)
  • Publish Content Data (each content type)
  • Edit All Content Data (each content type)
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
query Parameters
status
string
Enum: "Draft" "Publish" "Review" "Future" "Spam" "Unpublish"

This is an optional parameter. Filter by status.

Draft

content_status is 1.

Publish

content_status is 2.

Review

content_status is 3.

Future

content_status is 4.

Spam

content_status is 5.

Unpublish

content_status is 6.

limit
integer
Default: 10

Maximum number of content_data to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

sortBy
string
Default: "id"
Enum: "id" "uniqueID" "authored_on" "created_on" "modified_on"

The field name for sort. You can specify one of following values.

  • id
  • uniqueID
  • authored_on
  • created_on
  • modified_on
sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return content_data in descending order.

ascend

Return content_data in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the content_data resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

includeIds
string

The comma separated ID list of content_data to include to result.

excludeIds
string

The comma separated ID list of content_data to exclude from result.

filterKeys
string
Default: "status"

The comma separated field name list to filter.

Default: status

searchFields
string
Default: "identifier"

The comma separated field name list to search.

Default: identifier

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create Content Data

Authentication Required Create a new content data. This endpoint requires following permissions.

  • Manage Content Data (site, system, each content type)
  • Create Content Data (each content type)

Post form data is following

  • content_data (ContentData) - Single ContentData resource

Known issues (these will be solved in future release)

  • If content type contains non required Content Type field, request will failed when post data does not contain its data.
  • If content type contains non required Date and Time field, request will failed when post data does not contain its data.
  • Date and Time field must be specified by YYYYMMDDHHmmSS format.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
query Parameters
saveRevision
integer
Enum: 0 1

Save a revision or not

Request Body schema: application/x-www-form-urlencoded
object (cd_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "data": {
    },
  • "date": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "label": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "permalink": "string",
  • "status": "string",
  • "unpublishedDate": "2019-08-24T14:15:22Z",
  • "updatable": true
}

Make a preview by data

Authentication required.

Make a preview by specified data. This endpoint requires following permissions.

  • Manage Content Data (site, system, each content type)
  • Create Content Data (each content type)

Post form data is following

  • content_data (ContentData) - Single ContentData resource

Known issues (these will be solved in future release)

  • If content type contains non required Content Type field, request will failed when post data does not contain its data.
  • If content type contains non required Date and Time field, request will failed when post data does not contain its data.
  • Date and Time field must be specified by YYYYMMDDHHmmSS format.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
query Parameters
raw
integer
Default: 0
Enum: 0 1

If specify "1", will be returned preview contents.

Request Body schema: application/x-www-form-urlencoded
object (cd)

Updatable fields are basename, data, date, status, unpublishedDate, label

Responses

Response samples

Content type
application/json
{
  • "preview": "string",
  • "status": "string"
}

Delete single content data

Authentication required.

Delete a single content data. This endpoint requires folllowing permissions.

  • Manage Content Data (site, system, each content type)
  • Edit All Content Data (each content type)
  • Publish Content Data (each content type)

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_data_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "data": {
    },
  • "date": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "label": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "permalink": "string",
  • "status": "string",
  • "unpublishedDate": "2019-08-24T14:15:22Z",
  • "updatable": true
}

Fetch single Content Data

Fetch single content data.

Authentication required if you want fetch unpublished content data. Required permissions are as follows.

  • Manage Content Data (site, system, each content type)
  • Edit All Content Data (each content type)
  • Publish Content Data (each content type)
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_data_id
required
integer
query Parameters
fields
string

The field list to retrieve as part of the content_data resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "data": {
    },
  • "date": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "label": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "permalink": "string",
  • "status": "string",
  • "unpublishedDate": "2019-08-24T14:15:22Z",
  • "updatable": true
}

Update Content Data

Authentication Required Update a single content data. This endpoint requires folllowing permissions.

  • Manage Content Data (site, system, each content type)
  • Edit All Content Data (each content type)
  • Publish Content Data (each content type)

Post form data is following:

  • content_data (ContentData, required) -Single ContentData resource.

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_data_id
required
integer
query Parameters
saveRevision
integer
Enum: 0 1

Save a revision or not

Request Body schema: application/x-www-form-urlencoded
object (cd_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "data": {
    },
  • "date": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "label": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "permalink": "string",
  • "status": "string",
  • "unpublishedDate": "2019-08-24T14:15:22Z",
  • "updatable": true
}

Make a preview by id

Authentication required.

Make a preview by ID. This endpoint requires following permissions.

  • Content Data (site, system, each content type)
  • Create Content Data (each content type)

Post form data is as follows

  • entry (Entry, required) - Should be provide empty json. This parameter will be removed in the future.

Known issues (these will be solved in future release)

  • If content type contains non required Content Type field, request will failed when post data does not contain its data.
  • If content type contains non required Date and Time field, request will failed when post data does not contain its data.
  • Date and Time field must be specified by YYYYMMDDHHmmSS format.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_data_id
required
integer
query Parameters
raw
integer
Default: 0
Enum: 0 1

If specify "1", will be returned preview contents.

Request Body schema: application/x-www-form-urlencoded
object (cd)

Updatable fields are basename, data, date, status, unpublishedDate, label

Responses

Response samples

Content type
application/json
{
  • "preview": "string",
  • "status": "string"
}

Content Fields

Content Field Collection

Authentication required

Retrieve a list of Content Fields of the specified Content Type. This endpoint requires following permission.

  • Manage Content Types
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
query Parameters
limit
integer
Default: 10

Maximum number of content_fields to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

searchFields
string
Default: "label,description"

The comma separated field name list to search.

Default: label,description

sortBy
string
Enum: "name" "dataLabel" "uniqueID" "modified_on"

The field name for sort. You can specify one of following values.

  • name
  • dataLabel
  • uniqueID
  • modified_on
sortOrder
string
Default: "ascend"
Enum: "descend" "ascend"

descend

Return content_fields in descending order.

ascend

Return content_fields in ascending order.

Default: ascend

fields
string

The field list to retrieve as part of the content_field resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

includeIds
string

The comma separated ID list of content_fields to include to result.

excludeIds
string

The comma separated ID list of content_fields to exclude from result.

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create Content Field

Authentication required

Create a new Content Field. This endpoint requires following permission.

  • Manage Content Types

Post form data is as follows.

  • content_field (required, ContentField) - Single Content Field resource
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (cf_updatable)

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "options": {
    },
  • "type": "string",
  • "uniqueID": "string",
  • "updatable": true
}

Save hierarchical content field order

Authentication required.

Rearranges content field order in specified content type. This endpoint need folllowing permissions.

  • Manage Content Types

This method returns rearranged ContentField collection.

Post form data is following:

  • content_fields (array[ContentField]) - Array of content fields resource that were rearranged.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
Request Body schema: application/x-www-form-urlencoded
content_fields
string

Array of content fields resource that were rearranged.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete Content Field

Authentication required

Delete content field from specified content type. This endpoint requires following permission.

  • Manage Content Types

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_field_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "options": {
    },
  • "type": "string",
  • "uniqueID": "string",
  • "updatable": true
}

Fetch single Content Field

Authentication required

Fetch single content field. This endpoint requires following permission.

  • Manage Content Types
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_field_id
required
integer
query Parameters
fields
string

The field list to retrieve as part of the content_field resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "options": {
    },
  • "type": "string",
  • "uniqueID": "string",
  • "updatable": true
}

Update Content Field

Authentication required

Update content field. This endpoint requires following permission.

  • Manage Content Types

If you want to update label, description and required, should be use options field. (e.g, {“options”:{“label”:“foo”}})

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_field_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (cf_updatable)

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "options": {
    },
  • "type": "string",
  • "uniqueID": "string",
  • "updatable": true
}

Content Types

Content Type Collection

Authentication required

Retrieve a list of Content Types. This endpoint requires following permission.

  • Manage Content Types
Authorizations:
mtauth
path Parameters
site_id
required
integer
query Parameters
limit
integer
Default: 10

Maximum number of content_types to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

searchFields
string
Default: "name,description"

The comma separated field name list to search.

Default: name,description

sortBy
string
Enum: "name" "dataLabel" "uniqueID" "modified_on"

The field name for sort. You can specify one of following values.

  • name
  • dataLabel
  • uniqueID
  • modified_on
sortOrder
string
Default: "ascend"
Enum: "descend" "ascend"

descend

Return content_types in descending order.

ascend

Return content_types in ascending order.

Default: ascend

fields
string

The field list to retrieve as part of the content_type resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

includeIds
string

The comma separated ID list of content_types to include to result.

excludeIds
string

The comma separated ID list of content_types to exclude from result.

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create Content Type

Authentication required

Create a new Content Type. This endpoint requires following permission.

  • Manage Content Types

Post form data is as follows.

  • content_type (required, ContentType) - Single Content Type resource
Authorizations:
mtauth
path Parameters
site_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (content_type_updatable)

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "contentFields": [
    ],
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "dataLabel": "string",
  • "description": "string",
  • "id": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueID": "string",
  • "updatable": true,
  • "userDisplayOption": true
}

Delete Content Type

Authentication required

Delete content type. This endpoint requires following permission.

  • Manage Content Types

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "contentFields": [
    ],
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "dataLabel": "string",
  • "description": "string",
  • "id": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueID": "string",
  • "updatable": true,
  • "userDisplayOption": true
}

Fetch single Content Type

Authentication required

Fetch single content type. This endpoint requires following permission.

  • Manage Content Types
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
query Parameters
fields
string

The field list to retrieve as part of the content_type resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "contentFields": [
    ],
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "dataLabel": "string",
  • "description": "string",
  • "id": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueID": "string",
  • "updatable": true,
  • "userDisplayOption": true
}

Update Content Type

Authentication required

Update content type. This endpoint requires following permission.

  • Manage Content Types

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (content_type_updatable)

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "contentFields": [
    ],
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "dataLabel": "string",
  • "description": "string",
  • "id": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "uniqueID": "string",
  • "updatable": true,
  • "userDisplayOption": true
}

Content Data Collection

Retrieve list of content data of specified content type in the specified site.

Authentication required if you want to retrieve unpublished content data. Required pemissions are as follows.

  • Manage Content Data (site, system, each content type)
  • Publish Content Data (each content type)
  • Edit All Content Data (each content type)
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
query Parameters
status
string
Enum: "Draft" "Publish" "Review" "Future" "Spam" "Unpublish"

This is an optional parameter. Filter by status.

Draft

content_status is 1.

Publish

content_status is 2.

Review

content_status is 3.

Future

content_status is 4.

Spam

content_status is 5.

Unpublish

content_status is 6.

limit
integer
Default: 10

Maximum number of content_data to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

sortBy
string
Default: "id"
Enum: "id" "uniqueID" "authored_on" "created_on" "modified_on"

The field name for sort. You can specify one of following values.

  • id
  • uniqueID
  • authored_on
  • created_on
  • modified_on
sortOrder
string
Default: "descend"
Enum: "descend" "ascend"

descend

Return content_data in descending order.

ascend

Return content_data in ascending order.

Default: descend

fields
string

The field list to retrieve as part of the content_data resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

includeIds
string

The comma separated ID list of content_data to include to result.

excludeIds
string

The comma separated ID list of content_data to exclude from result.

filterKeys
string
Default: "status"

The comma separated field name list to filter.

Default: status

searchFields
string
Default: "identifier"

The comma separated field name list to search.

Default: identifier

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create Content Data

Authentication Required Create a new content data. This endpoint requires following permissions.

  • Manage Content Data (site, system, each content type)
  • Create Content Data (each content type)

Post form data is following

  • content_data (ContentData) - Single ContentData resource

Known issues (these will be solved in future release)

  • If content type contains non required Content Type field, request will failed when post data does not contain its data.
  • If content type contains non required Date and Time field, request will failed when post data does not contain its data.
  • Date and Time field must be specified by YYYYMMDDHHmmSS format.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
query Parameters
saveRevision
integer
Enum: 0 1

Save a revision or not

Request Body schema: application/x-www-form-urlencoded
object (cd_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "data": {
    },
  • "date": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "label": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "permalink": "string",
  • "status": "string",
  • "unpublishedDate": "2019-08-24T14:15:22Z",
  • "updatable": true
}

Make a preview by data

Authentication required.

Make a preview by specified data. This endpoint requires following permissions.

  • Manage Content Data (site, system, each content type)
  • Create Content Data (each content type)

Post form data is following

  • content_data (ContentData) - Single ContentData resource

Known issues (these will be solved in future release)

  • If content type contains non required Content Type field, request will failed when post data does not contain its data.
  • If content type contains non required Date and Time field, request will failed when post data does not contain its data.
  • Date and Time field must be specified by YYYYMMDDHHmmSS format.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
query Parameters
raw
integer
Default: 0
Enum: 0 1

If specify "1", will be returned preview contents.

Request Body schema: application/x-www-form-urlencoded
object (cd)

Updatable fields are basename, data, date, status, unpublishedDate, label

Responses

Response samples

Content type
application/json
{
  • "preview": "string",
  • "status": "string"
}

Delete single content data

Authentication required.

Delete a single content data. This endpoint requires folllowing permissions.

  • Manage Content Data (site, system, each content type)
  • Edit All Content Data (each content type)
  • Publish Content Data (each content type)

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_data_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "data": {
    },
  • "date": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "label": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "permalink": "string",
  • "status": "string",
  • "unpublishedDate": "2019-08-24T14:15:22Z",
  • "updatable": true
}

Fetch single Content Data

Fetch single content data.

Authentication required if you want fetch unpublished content data. Required permissions are as follows.

  • Manage Content Data (site, system, each content type)
  • Edit All Content Data (each content type)
  • Publish Content Data (each content type)
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_data_id
required
integer
query Parameters
fields
string

The field list to retrieve as part of the content_data resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

header Parameters
X-MT-Authorization
string

Input MTAuth accessToken={accessToken}

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "data": {
    },
  • "date": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "label": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "permalink": "string",
  • "status": "string",
  • "unpublishedDate": "2019-08-24T14:15:22Z",
  • "updatable": true
}

Update Content Data

Authentication Required Update a single content data. This endpoint requires folllowing permissions.

  • Manage Content Data (site, system, each content type)
  • Edit All Content Data (each content type)
  • Publish Content Data (each content type)

Post form data is following:

  • content_data (ContentData, required) -Single ContentData resource.

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_data_id
required
integer
query Parameters
saveRevision
integer
Enum: 0 1

Save a revision or not

Request Body schema: application/x-www-form-urlencoded
object (cd_updatable)

Responses

Response samples

Content type
application/json
{
  • "author": {
    },
  • "basename": "string",
  • "blog": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "data": {
    },
  • "date": "2019-08-24T14:15:22Z",
  • "id": 0,
  • "label": "string",
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "permalink": "string",
  • "status": "string",
  • "unpublishedDate": "2019-08-24T14:15:22Z",
  • "updatable": true
}

Make a preview by id

Authentication required.

Make a preview by ID. This endpoint requires following permissions.

  • Content Data (site, system, each content type)
  • Create Content Data (each content type)

Post form data is as follows

  • entry (Entry, required) - Should be provide empty json. This parameter will be removed in the future.

Known issues (these will be solved in future release)

  • If content type contains non required Content Type field, request will failed when post data does not contain its data.
  • If content type contains non required Date and Time field, request will failed when post data does not contain its data.
  • Date and Time field must be specified by YYYYMMDDHHmmSS format.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_data_id
required
integer
query Parameters
raw
integer
Default: 0
Enum: 0 1

If specify "1", will be returned preview contents.

Request Body schema: application/x-www-form-urlencoded
object (cd)

Updatable fields are basename, data, date, status, unpublishedDate, label

Responses

Response samples

Content type
application/json
{
  • "preview": "string",
  • "status": "string"
}

Content Field Collection

Authentication required

Retrieve a list of Content Fields of the specified Content Type. This endpoint requires following permission.

  • Manage Content Types
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
query Parameters
limit
integer
Default: 10

Maximum number of content_fields to retrieve.

Default: 10

offset
integer
Default: 0

0-indexed offset.

Default: 0

searchFields
string
Default: "label,description"

The comma separated field name list to search.

Default: label,description

sortBy
string
Enum: "name" "dataLabel" "uniqueID" "modified_on"

The field name for sort. You can specify one of following values.

  • name
  • dataLabel
  • uniqueID
  • modified_on
sortOrder
string
Default: "ascend"
Enum: "descend" "ascend"

descend

Return content_fields in descending order.

ascend

Return content_fields in ascending order.

Default: ascend

fields
string

The field list to retrieve as part of the content_field resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

includeIds
string

The comma separated ID list of content_fields to include to result.

excludeIds
string

The comma separated ID list of content_fields to exclude from result.

dateField
string
Default: "created_on"

Specifies the field name to be used as a date field for filtering. (new in v3)

dateFrom
string

The start date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

dateTo
string

The end date to filtering. Specify in "YYYY-MM-DD" format. (new in v3)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "totalResults": 0
}

Create Content Field

Authentication required

Create a new Content Field. This endpoint requires following permission.

  • Manage Content Types

Post form data is as follows.

  • content_field (required, ContentField) - Single Content Field resource
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (cf_updatable)

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "options": {
    },
  • "type": "string",
  • "uniqueID": "string",
  • "updatable": true
}

Save hierarchical content field order

Authentication required.

Rearranges content field order in specified content type. This endpoint need folllowing permissions.

  • Manage Content Types

This method returns rearranged ContentField collection.

Post form data is following:

  • content_fields (array[ContentField]) - Array of content fields resource that were rearranged.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
Request Body schema: application/x-www-form-urlencoded
content_fields
string

Array of content fields resource that were rearranged.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete Content Field

Authentication required

Delete content field from specified content type. This endpoint requires following permission.

  • Manage Content Types

Notes

  • This method accepts DELETE and POST with __method=DELETE.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_field_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "options": {
    },
  • "type": "string",
  • "uniqueID": "string",
  • "updatable": true
}

Fetch single Content Field

Authentication required

Fetch single content field. This endpoint requires following permission.

  • Manage Content Types
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_field_id
required
integer
query Parameters
fields
string

The field list to retrieve as part of the content_field resource. That list should be separated by comma. If this parameter is not specified, All fields will be returned.

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "options": {
    },
  • "type": "string",
  • "uniqueID": "string",
  • "updatable": true
}

Update Content Field

Authentication required

Update content field. This endpoint requires following permission.

  • Manage Content Types

If you want to update label, description and required, should be use options field. (e.g, {“options”:{“label”:“foo”}})

Notes

  • This method accepts PUT and POST with __method=PUT.
Authorizations:
mtauth
path Parameters
site_id
required
integer
content_type_id
required
integer
content_field_id
required
integer
Request Body schema: application/x-www-form-urlencoded
object (cf_updatable)

Responses

Response samples

Content type
application/json
{
  • "blog": {
    },
  • "createdBy": {
    },
  • "createdDate": "2019-08-24T14:15:22Z",
  • "description": "string",
  • "id": "string",
  • "label": "string",
  • "modifiedBy": {
    },
  • "modifiedDate": "2019-08-24T14:15:22Z",
  • "options": {
    },
  • "type": "string",
  • "uniqueID": "string",
  • "updatable": true
}

CustomFields

Retrieve a list of fields in the specified site

Authorizations:
mtauth
path Parameters
site_id
required
integer
query Parameters
search
string

Search query.

searchFields
string
Default: "name,basename,description,tag"

The comma separated field name list to search.

Default: name