# Content Management API

> Source: https://agilitycms.com/docs/developers/content-management-api

> **Get started faster** — Check out the JavaScript SDK and save the trouble of writing API calls. 

```
npm install @agility/management-sdk
```

Check out the [Content Management SDK](https://agilitycms.com/docs/javascript/content-management-js-sdk) documentation for how to use

<div style="display: flex; align-items: center; justify-content: space-between; background-color: rgb(70, 0, 168); color: #fff; padding: 16px 24px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); font-family: sans-serif;">
  <div style="display: flex; align-items: center; gap: 12px;">
    <!-- Circular Logo with Swagger Green Background -->
    <div style="width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background-color: #85EA2D; display: flex; align-items: center; justify-content: center;">
      <img src="https://cdn.aglty.io/agility-cms-docs/logos/xLd1JSZk_400x400.png" alt="Swagger Logo" style="width: 70%; height: 70%; object-fit: contain; object-position: center;" />
    </div>

    <span style="font-size: 18px; font-weight: 600;">
      Check out the <span style="color: #85EA2D;">Management API Swagger Docs</span>
    </span>
  </div>

  <a href="https://mgmt.aglty.io/index.html" target="_blank" rel="noopener noreferrer"
     style="margin-left: 16px; display: inline-flex; align-items: center; background-color: #fff; color: #000; font-weight: 500; padding: 8px 16px; border-radius: 6px; text-decoration: none; transition: background-color 0.2s ease-in-out;">
    View Docs →
  </a>
</div>

## What is the Content Management API?

The Content Management API allows you to programmatically update content, upload media, manage URL Redirections and Webhooks, and more.

It is often used for content imports and integrations where automated operations must be supported outside of the CMS.

## Features

The Content Management API supports the following methods:

- **Approve Content** - Approves the given content item
- **Decline Content** - Declines the given content item
- **Delete Content** - Deletes the given content item
- **Publish Content** - Publishes the given content item
- **Request Approval** - Requests approval for the given content item
- **Save Content Item** - Creates or updates a given content item
- **Unpublish Content** - Unpublishes the given content item
- **Get Media ID**  - Retrieves the ID of an asset based on the given path
- **Upload Media** - Uploads an asset to the given path
- **Delete URL Redirection** - Deletes the given URL Redirection
- **Save URL Redirection** - Creates or Updates the given URL Redirection
- **Save URL Redirection Test** - Saves the result of a tested URL Redirection
- **Delete Webhook** - Deletes the given Webhook
- **Save Webhook** - Creates or Updates the given Webhook

## Use Cases

The Content Management API is meant to be used when you need to perform actions that cannot otherwise be reasonably done within Agility CMS.

- Customized content workflows and approvals
- You have a large batch of content to import programmatically
- You need to keep some Agility content in-sync with another data source
- You need to import assets programmatically from another system
- Integrations where your content must be manipulated outside of Agility

> **Beware of Versioning** — Every update to content creates a version of content. If you are attempting to keep Agility content in-sync with another data source, be sure to add logic that prevents you updating content in the CMS if the content has not changed. Failure to do so can result in redundant versions being created which can impact your plan's recommended performance tier.

## Using the Content Management API

The Content Management API and its documentation is accessible via our [Content Management JS SDK](https://github.com/agility/agility-cms-management-sdk-typescript) or our [.NET Framework Agility.Web SDK](https://github.com/agility/agility-cms-management-sdk-dotnet).

> **Supported Platforms** — Agility only officially supports using the Content Management API with our JS SDK or our Agility.Web .NET SDK.
