> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamnative.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure Message Rest API

## Set up Message REST API

Before using Rest API, you need to complete the following setup steps.

### Step 1: Create a service account

<Note title="Note">
  Currently, you can't edit a service account. If you need a service account to have Super Admin access, make sure to enable it when creating the service account. By default, service accounts do not have Super Admin enabled.
</Note>

To create a service account, follow these steps.

1. On the left navigation pane, click **Service Accounts**.

2. Click **Create Service Account**.

3. (Optional) Select **Super Admin** to grant the service account with Super admin access to a namespace or tenant.

4. Enter a name for the service account, and then click **Confirm**.

### Step 2: Create an API key of your service account

<Note title="Note">
  Before using an API key, verify that the service account is authorized to access the resources, such as tenants, namespaces, and topics.
</Note>

You can follow the instructions to [create an API key](/cloud/security/authentication/service-accounts/use-api-keys/api-keys-overview#using-api-keys-to-connect-to-your-cluster) for the service account you choose to use.

### Step 3: Grant service account permissions

<Note title="Note">
  If you use a Super Admin service account, you can skip this step because a Super Admin service account has the required permissions already.
</Note>

1. On the left navigation pane, in the **Admin** section, click **Tenants/Namespaces**.

2. Select the **Public** tenant, then select the **Default** namespace under the tenant.

3. Select the **POLICY** tab.

4. In the **Authorization** area, click **ADD ROLE**, and select the name of the service account you just created in the previous section.

5. In the **Authorization** area, on the drop-down menu below the service name you just added, select the **consume** and **produce** roles. The roles are added to your service account.

### Step 4: Get the HTTP Service URL of your StreamNative cluster

To get the service URL(s) of a StreamNative cluster, follow these steps.

<Tabs>
  <Tab title="StreamNative Console">
    1. Navigate to the **Cluster Dashboard** page by [switching to the cluster workspace](/cloud/get-started/cloud-console#switch-a-cluster).

    2. On the **Cluster Dashboard** page, click **Details** tab.

    3. You will see the available service URLs in the **Access Points** area.

    4. You can click **Copy** at the end of the row of the service URL that you want to use.
  </Tab>
</Tabs>

## Enable Message Rest API

To enable the message Rest API on StreamNative Platform, you can set `broker.pulsarRestMessaging.enabled` to `true` and then use the `helm upgrade` command to update the configuration.

```yaml theme={null}
broker:
  pulsarRestMessaging:
    enabled: true
```

<Note title="Note">
  The message Rest API is enabled on the Pulsar broker. To access the message Rest API outside a Kubernetes cluster, you need to expose the Pulsar proxy service and access the exposed proxy endpoint. The Pulsar proxy will forward the message Rest API requests to the Pulsar broker. For more details, see [configure networking](/cloud/networking/networking).
</Note>

## Related topics

* [Work with message REST API](/cloud/build/pulsar-clients/connect-restapi#work-with-message-rest-api)
* [Message Rest API reference](/api-references/rest-messaging-api/rest-messaging-api)
