---
schema_version: "1"
id: 9426c79f660b592deeed9a43b0e339c1d6f7021603cffe666ad92ea62515c16c
title: Publishing API Specifications
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/design-center/design-publish.md
canonical_url: https://docs.mulesoft.com/design-center/design-publish
source_site: docs.mulesoft.com
content_type: documentation
content_hash: a95229f8995c50808d4fc87bd7db389c66b47217ccea06beb42de20bf79f03f3
description: MuleSoft Documentation Site
latest: true
---
---
product: Design Center
---

# Publishing API Specifications

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

When you want to share your API specification with other developers, you can publish it to Anypoint
Exchange.

## Before You Begin

It is a good practice to remove unreferenced files before publishing a project to Anypoint Exchange.
An _unreferenced_ file is not referenced from the project’s root file, either directly or
indirectly.

For example, if the file `example.raml` is among the files in a project but the root file of the
project does not reference `example.raml` with an `!include` tag, the root file doesn’t reference
`example.raml` directly. If none of the files in the chain of references from the root file directly
references `example.raml`, it is not referenced indirectly from the root file. Therefore,
`example.raml` is unreferenced and should probably not be among the files in the project.

If you do not remove them before you begin, unreferenced files are detected when you select the
option to publish to Exchange, and you are given options on whether or not to publish them.

## Publish an API Specification

1.  In API Designer, open the API-specification project that you want to publish.

2.  If the specification has dependencies, click the refresh button beside `Exchange Dependencies`
    to ensure that Design Center has the latest status and content from all dependencies.

3.  Click **Publish** and then click **Publish to Exchange**.

    ![The publish dialog shown when you publish from API Designer to Exchange](/mulesoft/current/en-us/design-center/_images/apid-publish-dialog-api-specs.png)

<table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td><strong>Asset version</strong>: The version number to be displayed in the <strong>Version</strong> section of the page that Anypoint Exchange creates for the project. For a description of this field, see <a href="#asset-version">Asset Version</a>.</td></tr><tr><td><i data-value="2"></i><b>2</b></td><td><strong>API version</strong>: The version number of the API specification. For a description of this field, see <a href="#api-version">API Version</a>.<div><ul><li><p>the <strong>Asset version</strong> and <strong>API version</strong> fields are now pre-populated using the following criteria</p><div><ul><li><p>If no version is defined in the API spec, the suggested asset version and API version fields are pre-filled with default values: <code>1.0.0</code> and <code>v1</code>.</p></li><li><p>If the version defined in the API spec matches asset version field recommendations (for example, <code>1.0.3</code>), the value is pre-filled in the asset version field, and the API version field is pre-filled with a <code>v</code> and the major asset version (for example, <code>v1</code>).</p></li><li><p>If the version defined in the API spec matches API version field recommendations (for example, <code>v2</code>), the value is pre-filled in the API version field, and the asset version field is pre-filled with its major value extracted (for example, <code>2.0.0</code>).</p></li><li><p>If the version defined in the API spec is a different string (for example, <code>7.4</code>), the value is pre-filled in the API version field, and the asset version field is pre-filled with its default value: <code>1.0.0</code>.</p></li><li><p>If the API has a version already published to Exchange (for example,<code>3.2.5</code>), when publishing a new version without changing the one defined in the API spec, the asset version field is pre-filled with its previous value incremented by one (for example, <code>3.2.6</code>), and the API version field stays the same.</p></li></ul></div></li></ul></div></td></tr><tr><td><i data-value="3"></i><b>3</b></td><td><strong>LifeCycle State</strong>: The lifecycle state of the asset. Assets can be published from API Designer as <strong>Development</strong> or <strong>Stable</strong>. Assets cannot be deprecated from API Designer.</td></tr><tr><td><i data-value="4"></i><b>4</b></td><td><strong>Business group ID</strong>: The ID of the business unit in Anypoint Platform to which the project belongs.</td></tr><tr><td><i data-value="5"></i><b>5</b></td><td><strong>Asset name</strong>: The name that Anypoint Exchange uses to identify the published project.</td></tr><tr><td><i data-value="6"></i><b>6</b></td><td><strong>Asset ID</strong>: A unique ID that Anypoint Exchange uses to identify the published project. You should use the default unless there is a published asset with the same ID.</td></tr></tbody></table>

4.  After completing the required fields, click **Publish to Exchange**.

    If your project includes files that are not referenced by the root file either directly or
    indirectly, a dialog asks you to confirm that you want to publish the project including the
    unreferenced files. By default, API Designer excludes them from the published project in
    Anypoint Exchange.

> [!NOTE] If you are using a version of Anypoint Platform released prior to April 2017 and want to
> add the asset to API Manager while publishing to Exchange, select **Add to API Manager**. This
> functionality is not available in later versions and instead you can link API instances in API
> Manager to assets in Exchange.

## Asset Version

Anypoint Exchange requires an asset version number for each API specification published. The asset
version must be specified using semantic versioning rules. For details, see
[Change the Version of an Asset](https://docs.mulesoft.com/exchange/to-change-raml-version).

The content of the **Asset version** field on the publish dialog depends on the following:

- If you are publishing the specification for the first time, you can use any valid number based on
  the semantic versioning scheme. A typical starting version is `1.0.0`.

- If you are republishing the specification, API Designer automatically populates the **Asset
  version** field with the existing patch level number incremented by 1. You can change this number,
  but the republish fails if you use a version number that has already been used to publish a stable
  version of this API.

- If you are republishing the specification and select `Development`, you can use the same number as
  a previously published development version of the API, but not the same number as a previously
  published stable version.

## API Version

Anypoint Exchange requires an API version number for each API specification published.

The content and state of the **API version** field in the publish dialog depends on the following:

- If the specification already includes a version, you cannot update it in the publish dialog.

- If the specification does not include a version, you must enter the version in the **API version**
  field.

## See Also

- [Publish Assets Workflow](https://docs.mulesoft.com/exchange/workflow-sharing-assets)

- [Explore Asset Information](https://docs.mulesoft.com/exchange/asset-details)

- [Change the Version of an Asset](https://docs.mulesoft.com/exchange/to-change-raml-version)

- [API Instances](https://docs.mulesoft.com/api-manager/latest/api-instance-landing-page)
