---
schema_version: "1"
id: c04a48403f669fff737faa5afd7af449aaf9b68eec75120917dc28bd88e790cd
title: Publishing API Projects to Exchange
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/anypoint-code-builder/des-publish-api-spec-to-exchange.md
canonical_url: https://docs.mulesoft.com/anypoint-code-builder/des-publish-api-spec-to-exchange
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2d2757c534ee57b6dd2cab416f4e5c7177d021f0de7c4e661ef78f0d105d3005
description: MuleSoft Documentation Site
latest: true
---
---
product: Anypoint Code Builder
version: master
---

# Publishing API Projects to Exchange

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

Publish your API project to Anypoint Exchange so that other team members can find and use it.

## Before You Begin

Before publishing an API project:

- [Set up and access Anypoint Code Builder](https://docs.mulesoft.com/anypoint-code-builder/start-acb).

- [Create your API specification](https://docs.mulesoft.com/anypoint-code-builder/des-create-api-specs) or [fragment](https://docs.mulesoft.com/anypoint-code-builder/des-create-api-fragments).

- Have some familiarity with [business groups](https://docs.mulesoft.com/access-management/business-groups).

  When you publish your API spec to Exchange, Anypoint Code Builder requests the name of the
  business group.

## Publish an API Project to Exchange

To publish your API project to Exchange:

1.  Log in to your Anypoint Platform account.

2.  In **Explorer**, open your API project and click the Publish API Project to Exchange icon.

    ![Publish API Project to Exchange icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-publish-to-exchange.png)

    If you don’t open the project, you can also right-click the API specification and select
    **Publish API Project to Exchange**.

    Alternatively:

    1.  Open the Command Palette.

        Show me how

        - Use the keyboard shortcuts:

          - Mac: Cmd+Shift+p

          - Windows: Ctrl+Shift+p

        - Select **View** > **Command Palette**.

    2.  Enter `publish` and select the following command:

        ```command
        MuleSoft: Publish API Project to Exchange
        ```

3.  If prompted, click **Allow**, and follow the prompts to sign in to Anypoint Platform.

4.  Confirm or change each item in **Publish API Project to Exchange**:

    - **Asset Version**

    - **API Version**

      If the API project has never been published to Exchange, the default version is `1.0.0`.

      The API version isn’t required for API fragments.

    - **Business Group**

      If you selected a business group when you created the API project, this field isn’t shown in
      the form. You can view and update the business by expanding **Project Metadata**.

5.  Optionally, expand **Project Metadata** and click **API Project Properties** to update metadata
    for the API project, such as updating the asset name and ID and adding tags and categories,
    updating the business group, and so on. For more information, see
    [Add Metadata to the API Project](https://docs.mulesoft.com/anypoint-code-builder/ai-enabling-api-project-topic-center#add-metadata).

    1.  After you complete your updates, click **Apply**.

6.  In the banner click **Sync centralized governance rulesets and run validation** to ensure the
    API project conforms to the applied rulesets.

    This step is optional, but it’s recommended as a best practice. You must be logged in to your
    Anypoint Platform account and have a business group defined in the API project metadata to
    validate rulesets.

    ![Publish API Project to Exchange form with banner to sync centralized rulesets](/mulesoft/current/en-us/anypoint-code-builder/_images/des-publish-api-project.png)

7.  Click **Publish**.

    When publishing is complete, you see a message that the API specification successfully published
    to Exchange.

    If the API project has errors, you must fix the errors before you can publish to Exchange.
    Errors are listed in the **Problems** tab. Click the Publish API Project to Exchange icon to
    bring the **Problems** tab into focus.

8.  Click **View Asset** to see the published asset in Exchange.

9.  When prompted to implement the API, select one of the following:

    - **No** to avoid scaffolding the API specification into your integration.

    - **Yes** to scaffold the API specification into a new project.

      Show me how

      1.  In the field that opens, provide a name for your implementation project.

      2.  Navigate to a directory for your project, and click **Select target folder**.

      3.  Select a Mule runtime (Mule) version for your project.

      4.  Select a supported Java version for Mule.

      5.  After the scaffolding process completes, view the scaffolded interface for your project
          from the `src/main/mule` directory in the Explorer.

          If the scaffold fails, see [Implementation Errors](https://docs.mulesoft.com/anypoint-code-builder/troubleshoot-implementation-errors).

          You can also open your new project’s `mule-artifact.json` file from the Explorer to check
          the Mule and Java versions, for example:

          ```XML
          {
              "minMuleVersion": "4.6.2",
              "javaSpecificationVersions": [
                  "11"
              ]
          }
          ```

          The `mule-artifact.json` file is located at the root level of the project directory.

## Locate Your API in Exchange

After publishing your API specification, you can find it in Anypoint Exchange:

1.  Navigate to Anypoint Platform and log in using your credentials.

    Show me how

    - US cloud (non-EU host): [Anypoint Platform (US)](https://anypoint.mulesoft.com/login/)

    - EU cloud (EU host): [Anypoint Platform (EU)](https://eu1.anypoint.mulesoft.com/login/)

2.  Navigate to Anypoint Exchange.

    Show me how

    - US cloud (non-EU host): [Exchange (US)](https://anypoint.mulesoft.com/exchange/)

    - EU cloud (EU host): [Exchange (EU)](https://eu1.anypoint.mulesoft.com/exchange/)

    Your API specification appears as an asset in your organization, for example:

    ![API specification in Exchange](/mulesoft/current/en-us/anypoint-code-builder/_images/des-api-exchange.png)

You can select the API, navigate through its summary, and see all the endpoints you defined in the
previous tasks. You can also generate documentation for REST APIs without documentation on the asset
details page in Exchange. For more information, see
[Generating API Documentation with Einstein Generative AI](https://docs.mulesoft.com/exchange/generating-documentation-with-ai).

## Publish a GraphQL API Spec to Exchange

To publish a GraphQL API specification to Exchange:

1.  Navigate to Anypoint Platform and log in using your credentials.

    Show me how

    - US cloud (non-EU host): [Anypoint Platform (US)](https://anypoint.mulesoft.com/login/)

    - EU cloud (EU host): [Anypoint Platform (EU)](https://eu1.anypoint.mulesoft.com/login/)

2.  Navigate to Anypoint Exchange.

    Show me how

    - US cloud (non-EU host): [Exchange (US)](https://anypoint.mulesoft.com/exchange/)

    - EU cloud (EU host): [Exchange (EU)](https://eu1.anypoint.mulesoft.com/exchange/)

3.  Click **Publish new asset**:

    ![Publish new asset button in Exchange](/mulesoft/current/en-us/anypoint-code-builder/_images/des-publish-asset-exchange.png)

4.  Complete the **Publish a new asset** form:

    ![Publish a new asset form on Exchange](/mulesoft/current/en-us/anypoint-code-builder/_images/des-graphql-publish-exchange.png)

    1.  For **Name**, type a name for your asset.

    2.  For **Asset types**, select **GraphQL API**.

    3.  For **Method**, select **Upload a GraphQL API Schema**.

    4.  For **File upload**, click **Choose file** and browse for your `.graphql` schema file.

    5.  Click **Advanced** to change the version number.

    6.  For **Lifecycle state**, select **Stable**.

5.  Click **Publish**.

Your GraphQL API spec is now available on Exchange, for example:

!["GraphQL API spec on Exchange](/mulesoft/current/en-us/anypoint-code-builder/_images/des-graphql-asset-exchange.png)

## See Also

- [Publishing Your gRPC API to Exchange](https://docs.mulesoft.com/anypoint-code-builder/des-publish-grpc-api-to-exchange)

- [Validating API Specifications Against Governance Rulesets](https://docs.mulesoft.com/anypoint-code-builder/des-govern-api)

- [Enabling an API Project for Topics and Agent Actions](https://docs.mulesoft.com/anypoint-code-builder/ai-enabling-api-project-topic-center)
