> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.
# Connect Workspace to Cloud
> Connect the workspace to Rocket.Chat Cloud using a registration token. To get a registration token, refer to [Registration via Token](https://docs.rocket.chat/docs/register-your-workspace#how-to-get-a-token).
Permission required: `manage-cloud`.
### Changelog
| Version | Description |
| ---------------- | ------------|
|8.7.0 | Added |
## OpenAPI
````json POST /api/v1/cloud.connectWorkspace
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Settings"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Settings"
},
{
"name": "Audit"
},
{
"name": "Cloud"
},
{
"name": "DNS"
},
{
"name": "E2E"
},
{
"name": "Import"
},
{
"name": "Bulk User Import"
},
{
"name": "Instances"
},
{
"name": "Moderation"
},
{
"name": "Device Management"
},
{
"name": "Password policy"
},
{
"name": "Video Conference"
},
{
"name": "Media Calls"
}
],
"paths": {
"/api/v1/cloud.connectWorkspace": {
"post": {
"summary": "Connect Workspace to Cloud",
"operationId": "post-api-v1-cloud.connectWorkspace",
"description": "Connect the workspace to Rocket.Chat Cloud using a registration token. To get a registration token, refer to [Registration via Token](https://docs.rocket.chat/docs/register-your-workspace#how-to-get-a-token).\n\nPermission required: `manage-cloud`.\n\n### Changelog\n| Version | Description |\n| ---------------- | ------------|\n|8.7.0 | Added |",
"tags": [
"Cloud"
],
"parameters": [
{
"$ref": "#/components/parameters/X-User-Id"
},
{
"$ref": "#/components/parameters/X-Auth-Token"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "The registration token from your Rocket.Chat Cloud account.",
"example": "5f03461b-9073-41e5-986d-e70f4d6ecbd1"
}
},
"required": [
"token"
]
},
"examples": {
"Example": {
"value": {
"token": "5f03461b-9073-41e5-986d-e70f4d6ecbd1"
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/trueSuccess"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
}
}
},
"examples": {
"Invalid Parameter": {
"value": {
"success": false,
"error": "must have required property 'token' [error-invalid-params]",
"errorType": "error-invalid-params"
}
},
"Failed to Connect": {
"value": {
"success": false,
"error": "Failed to connect the workspace with Rocket.Chat Cloud"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/authorizationError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
}
}
}
}
},
"components": {
"parameters": {
"X-User-Id": {
"name": "X-User-Id",
"in": "header",
"required": true,
"schema": {
"type": "string"
},
"example": "CkCPNctrgCDfmWLqC",
"description": "The user ID."
},
"X-Auth-Token": {
"name": "X-Auth-Token",
"in": "header",
"required": true,
"schema": {
"type": "string"
},
"example": "1Dd4iN_ClKn5jl-xPC36snQ4s9Zd5GZnXCQuCNSKcVE",
"description": "The authentication token."
}
},
"responses": {
"trueSuccess": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
}
},
"examples": {
"Success": {
"value": {
"success": true
}
}
}
}
}
},
"authorizationError": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"Authorization Error": {
"value": {
"success": false,
"error": "You must be logged in to do this."
}
}
}
}
}
},
"forbiddenError": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
}
}
},
"examples": {
"Permission Error": {
"value": {
"success": false,
"error": "User does not have the permissions required for this action",
"errorType": "error-forbidden"
}
}
}
}
}
}
}
}
}
````