# Integration with Content Design System Manager (CDSM)

## Before you start

**Before starting the integration, make sure that the Editor config URL** field is specified in your [Setka Account](https://editor.setka.io) (**Integrations** tab) for Setka Editor to work on your domain:

![Screenshot of Setka Interface: "CMS Integrations" tab, step 1 - "Set your domain" other integration](/files/-MRCf6x5OcqDWaAzx4bF)

**Editor config url** is a link on which you will receive the latest version of the editor and updates for styles created in the Style Manager. On initial sync, you will also receive a `public_token`, which is required for several editor functions to work, e.g., for commenting and inserting embeds via a URL.

Requests to editor.setka.io should contain your license key (hereinafter, in request samples, it is marked as `your-license-key`). You can get the license key on your account's CMS Integration page in [your account:](https://editor.setka.io/)

![Screenshot of Setka Editor Interface: "CMS Integration" tab with "Get License Key" field](/files/-MRCl_b1O8guCT1awmLh)

Please read about all the four steps to integrate Setka with your custom CMS via our API: &#x20;

* **Step 1:** [Initial sync. Receiving Setka Editor files to connect them to your CMS](/help-center/api/setka-editor-api/integration-with-style-manager/initial-sync-receiving-setka-editor-files-to-connect-them-to-your-cms.md)
* **Step 2:** [Storing and processing Setka Editor files](/help-center/api/setka-editor-api/integration-with-style-manager/storing-and-processing-setka-editor-files.md)
* **Step 3:** [Connecting Setka Editor files to the pages of your site](/help-center/api/setka-editor-api/integration-with-style-manager/connecting-setka-editor-files-to-the-pages-of-your-site.md)
* **Step 4:** [Receiving style updates from the Content Design System Manager and new editor versions](/help-center/api/setka-editor-api/integration-with-style-manager/receiving-style-updates-from-the-style-manager-and-new-editor-versions.md)<br>

## Receiving compressed files (.gz)

In all the above-mentioned methods, you receive links to uncompressed resources. You can receive compressed versions from CDN by identifying an `Accept-Encoding` heading in a request.

E.g.:

```bash
curl -H 'Accept-Encoding: gzip' https://ceditor.setka.io/editor.v.1.2.3.min.js
```

## API Errors <a href="#h_fc667709-447e-401f-887f-be79f7bbc038" id="h_fc667709-447e-401f-887f-be79f7bbc038"></a>

Errors that Setka Editor API may return:

`HTTP/1.1 401 Unauthorized`

```javascript
{
  "error": "Not authorized!"
}
```

The error occurs as a result of a request with an incorrect license key (token).

`HTTP/1.1 422 Unprocessable Entity`

```javascript
{
  "errors": {
    "code": ["can't be blank"],
    "name": ["can't be blank"]
  }
}
```

The error appears as a result of an incorrect request.

You can contact our [support team](https://editor.setka.io/support) with any errors. We will be glad to help!&#x20;

## Links that might be useful <a href="#h_490431c3-e6fb-4f91-b93b-30117f466f35" id="h_490431c3-e6fb-4f91-b93b-30117f466f35"></a>

* [The latest version of API documentation](https://editor.setka.io/docs/api2/index.html)
* [Ruby on Rails integration example](https://github.com/setkaio/grid-editor-integration)
* Master domain for requests acceptance and resources recipient: `https://editor.setka.io`.

## More about custom integration: <a href="#h_7619f003-2739-4479-b4ba-a25dee5bf312" id="h_7619f003-2739-4479-b4ba-a25dee5bf312"></a>

* [Introduction to Custom Integration](/help-center/api/setka-editor-api/introduction-to-custom-integration.md)
* [Setka Post Editor initialization (JavaScript)](/help-center/api/setka-editor-api/setka-post-editor-initialization-javascript.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://setka.gitbook.io/help-center/api/setka-editor-api/integration-with-style-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
