> For the complete documentation index, see [llms.txt](https://docs.coherent.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherent.global/spark-apis/public-apis.md).

# Authorization - Public APIs

While Spark service APIs are private by default (accessible only to authorized users). Anyone can use a public API without restrictions. To enable a Spark service to be public, it requires:

1. The tenant to be configured to enable public services.
2. The service is configured to be public.

## Enable 'Public' API visibility settings

Spark services can only be public if the `tenant-admin`s permit it. `tenant-admin`s can adjust this setting from the [Options](/navigation/options.md#tenant-configuration) [Tenant configuration](/tenant-administration/tenant-configuration.md#public-apis).

From here, `tenant-admin`s can also decide the default visibility of Spark APIs. If the default is set to *Public*, all services created afterwards will be executable by non-authorized users.

## Assign a Public API key

When a public Spark service is executed, the API call does not require any authorization. However, the `tenant-admin`s must assign an [Authorization - API keys](/spark-apis/authorization-api-keys.md), which will be used to correspond to all public API requests, in the tenant configuration.

* Ensure that the API key has access to the services that will be made public.
* Review the user groups assigned for this API key to confirm which Spark services are accessible.

## Publicly available APIs

By default, the APIs that can be publicly accessible are the same as those defined in [Authorization - API keys](/spark-apis/authorization-api-keys.md#api-key-terminology).

### Enable public APIs for Spark Shell functionality

This needs to be enabled to allow the full functionality for Spark Shell. When enabled, endpoints will allow fetching detailed information about the Spark service and posting records to the execution history without authentication.

### Enable public APIs for access to WebAssembly Modules

When enabled, any Spark services set to public will also make their compiled code (WebAssembly Modules) available via the [WebAssembly module APIs](/spark-apis/webassembly-module-apis.md) without authentication.

This is useful for use cases where the Wasm needs to be easily accessible to serve a website.

## Enable or disable Public API on a service

If the `tenant-admin` has enabled the **Public API** visibility settings, individual users can adjust this setting on a service basis in [Service Documentation](/navigation/service-documentation.md#service-details).

Setting this field as `TRUE` will allow non-authorized users to access the above APIs.
