---
title: "Subscribe a user to a cluster"
method: POST
path: "/api/clusters/{clusterName}/subscribe"
tags: ["Cloud18"]
---

# Subscribe a user to a cluster

`POST /api/clusters/{clusterName}/subscribe`

This endpoint allows a user to subscribe to a specified cluster.

## Path parameters

- `clusterName` string, required

## Headers

- `Authorization` string, required

## Request body

- ClusterUserForm
  - `grants` string
  - `password` string
  - `roles` string
  - `username` string

## Response `200`

Email sent to admin!

- string

## Other responses

- `400` — Error in request
- `401` — Error logging in to gitlab: Token credentials is not valid
- `403` — Error parsing JWT" / "Current user is not logged in via Gitlab!
- `409` — User already subscribed on peer cluster!" / "Another user already subscribed on peer cluster!
- `500` — No valid cluster" / "Peer does not have cloud18 setup!" / "Error sending email

---

[API](https://skmtc.net/signal18/apis/untitled-api.md) · [All operations](https://skmtc.net/signal18/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/signal18/untitled-api/revisions/7465ea0ee21a/schema)
