[Yandex Cloud documentation](../../../../index.md) > [Yandex Serverless Integrations](../../../index.md) > [Step-by-step guides](../../index.md) > EventRouter > Managing a connector > Creating a connector > API EventRouter

# Creating a connector for the EventRouter API

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the [folder](../../../../resource-manager/concepts/resources-hierarchy.md#folder) where you want to create a [connector](../../../concepts/eventrouter/connector.md).

  1. Navigate to **Serverless Integrations**.

  1. In the left-hand panel, select ![object-align-center-vertical](../../../../_assets/console-icons/object-align-center-vertical.svg) **EventRouter**.

  1. Select the [bus](../../../concepts/eventrouter/bus.md) you need.

  1. In the left-hand menu, select ![broadcast-signal](../../../../_assets/console-icons/broadcast-signal.svg) **Connectors**.

  1. In the top-right corner, click **Create connector**.

  1. In the **Source** field, select `EventRouter API`.

  1. Expand **Additional parameters**:
     
     * Enter a name and description for the [connector](../../../concepts/eventrouter/connector.md). The naming requirements are as follows:
     
         * The name must be from 3 to 63 characters long.
         * It may contain uppercase and lowercase Latin and Cyrillic letters, numbers, hyphens, underscores, and spaces.
         * The first character must be a letter. The last character cannot be a hyphen, underscore, or space.
     
     * Optionally, add labels:
     
         * Click **Add label**.
         * Enter a label in `key: value` format.
         * Press **Enter**.
     
     * Optionally, enable deletion protection. You cannot delete a connector with this option enabled.

  1. Click **Create**.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. View the description of the CLI command to create a [connector](../../../concepts/eventrouter/connector.md):

      ```bash
      yc serverless eventrouter connector create event-service --help
      ```

  1. Create a connector for the EventRouter API:

      ```bash
      yc serverless eventrouter connector create event-service \
        --bus-id <bus_ID> \
        --name <connector_name> \
        --description <connector_description> \
        --labels <label_list> \
        --deletion-protection
      ```

      Where:

      * `--bus-id`: EventRouter [bus](../../../concepts/eventrouter/bus.md) ID.
      * `--name`: Connector name. Follow these naming requirements:

          * The name must be from 3 to 63 characters long.
          * It may contain uppercase and lowercase Latin and Cyrillic letters, numbers, hyphens, underscores, and spaces.
          * The first character must be a letter. The last character cannot be a hyphen, underscore, or space.

      * `--description`: Connector description. This is an optional setting.
      * `--labels`: List of labels. This is an optional setting.

          You can specify one or more labels separated by commas in `<key1>=<value1>,<key2>=<value2>` format.
      * `--deletion-protection`: Connector deletion protection. By default, protection is disabled. You cannot delete a connector with this option enabled. To disable deletion protection, specify `--no-deletion-protection`. This is an optional setting.

      Result:

      ```text
      id: f667savopsoe********
      bus_id: f66klk4lvvjf********
      folder_id: b1gt6g8ht345********
      cloud_id: b1gia87mbaom********
      created_at: "2025-06-18T16:44:03.849030Z"
      name: my-sample-connector
      description: my description
      labels:
        no: label
      source:
        event_service_source: {}
      deletion_protection: true
      status: RUNNING
      ```

- API {#api}

  To create a connector for the EventRouter API, use the [Create](../../../eventrouter/api-ref/Connector/create.md) REST API method for the [connector](../../../eventrouter/api-ref/Connector/index.md) resource or the [ConnectorService/Create](../../../eventrouter/api-ref/grpc/Connector/create.md) gRPC API call.

{% endlist %}

By default, the system creates a running connector. [Stop](stop.md) the connector to prevent it from sending messages to the bus.