# Content API Overview

Welcome to the Mailjet Content API! Our API is structured around REST principles. It features predictable, resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and utilizes standard HTTP response codes, authentication, and verbs.

With the base endpoint https://api.mailjet.com/v1, you can manage your email templates, email template contents, images, and labels. This document outlines the authentication methods, available endpoints, and examples of how to interact with the API. By default, the Content API documentation will demonstrate using curl to interact with the API over HTTP, but any HTTP client in any programming language can be used.

If you are looking for how to send email via API, head over to the Mailjet Send API documentation.

### Who should use the Content API?

If you are a user of both Mailjet's user interface (UI) and the API, it is recommended that you use the Content API to create and manage your templates.

The Content API is also ideal for all users that would like to:

- have more granular permissions around template management via API.
- upload and manage their images via API.
- manage their template and image labels via API.


## Response Structure

In the Content API response structure, every response you receive will consistently include three key fields: `Count`, `Total`, and `Data`.

- `Count`: This field represents the number of items currently included in the response.
- `Total`: The Total field indicates the overall number of items available that match the query or criteria specified.
- `Data`: Unlike the Count and Total fields, the Data field is specific to each endpoint. This field contains the actual data or records returned by the API. The structure and content of the Data field are detailed in the endpoint-specific documentation, providing the necessary information on what to expect for each particular request.


## PUT Endpoints

In the Mailjet Content API, all `PUT` requests behave like `PATCH` requests. The update will affect only the specified properties. The other properties of an existing resource will neither be modified, nor deleted. It also means that all non-mandatory properties can be omitted from your payload.

Example:

A template has multiple attributes, including name, description, and associated labels. If you want to update only the description of this resource, you can send a `PUT` request with the `Description` parameter in the body. All other attributes (`Name`, `LabelIDs`) will retain their current values.

## Pagination & Sort

Depending on your request and the endpoint, the results in the response may be paginated and sorted. Use the following query parameters to page through the results:

| Name | Type | Description |
|  --- | --- | --- |
| `Limit` | string | The number of results returned per page. The default value is 10, the maximum is 1000. |
| `Offset` | integer | The index of the first object in the page. For example, if you have set a limit of 100 and want to see objects 101 through 200, then `Offset=100` |
| `Sort` | string | Sort the results by a property and select ascending (ASC) or descending (DESC) order. The default order is ascending. Keep in mind that this is not available for all properties. Example: `Sort=Name+DESC` |