> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.awork.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.awork.com/_mcp/server.

# Updates the workspace with the specified id.

PUT https://api.awork.com/api/v1/workspaces/{workspaceId}
Content-Type: application/json

The user must be an admin or have `workspace-manage-config:write` permissions.

Reference: https://developers.awork.com/apiv1/workspaces/put-workspaces-by-workspace-id

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `workspaceId` (string, required) — The workspace id.

### Body (application/json)

This endpoint expects a WorkspacePutForm.

- `allowSocialLogin` (boolean, required) — Whether the social login via apple and google is allowed.
- `allowCredentialsLogin` (boolean, required) — Whether the user can login with username and password.
- `name` (string, optional, nullable) — The workspace name. Optional.
- `description` (string, optional, nullable) — The workspace description. Optional.
- `language` (string, optional, nullable) — The workspace language. Optional.
- `type` (string, optional, nullable) — The workspace type / industry set during onboarding. Optional.
- `size` (string, optional, nullable) — The workspace size. Optional.
- `goals` (list of string, optional, nullable) — The workspace team goals. Optional.
- `selfAttribution` (string, optional, nullable) — The way the workspace creator learned awork, set during the onboarding. Optional.
- `previousTool` (string, optional, nullable) — The project management tool used before awork, set during the onboarding. Optional.
- `aiUsage` (string, optional, nullable) — How the team uses AI, set during the onboarding. Optional.
- `department` (string, optional, nullable) — The workspace creator's department, set during the onboarding. Optional.
- `allowAutomaticScimUserBooking` (boolean, optional, nullable) — Whether the SCIM integration should be able to book additional user seats when provisioning and activating new users, or should return BadRequest. Only admins are allowed to change this setting.
- `sameDomainSignupEnabled` (boolean, optional, nullable) — Whether same domain signup feature is enabled. Only admins are allowed to change this setting.
- `sameDomainSignupRoleId` (string, optional, nullable) — Default Role for users who sign up through same domain signup. Only admins are allowed to change this setting.
- `sameDomainSignupDomains` (list of string, optional, nullable) — Domains enabled for same domain signup feature. Only admins are allowed to change this setting.
- `requireMfa` (boolean, optional, nullable) — Whether the workspace requires multi-factor authentication for all users. Only admins are allowed to change this setting.
- `skipCreateDefaultWorkspaceData` (boolean, optional, nullable) — Whether to skip the creation of default workspace data.

## Response

### 200

OK

- `allowSocialLogin` (boolean, required) — Whether the social login via apple and google is allowed.
- `allowCredentialsLogin` (boolean, required) — Whether the user can login with username and password.
- `name` (string, optional, nullable) — The workspace name. Optional.
- `description` (string, optional, nullable) — The workspace description. Optional.
- `language` (string, optional, nullable) — The workspace language. Optional.
- `type` (string, optional, nullable) — The workspace type / industry set during onboarding. Optional.
- `size` (string, optional, nullable) — The workspace size. Optional.
- `goals` (list of string, optional, nullable) — The workspace team goals. Optional.
- `selfAttribution` (string, optional, nullable) — The way the workspace creator learned awork, set during the onboarding. Optional.
- `previousTool` (string, optional, nullable) — The project management tool used before awork, set during the onboarding. Optional.
- `aiUsage` (string, optional, nullable) — How the team uses AI, set during the onboarding. Optional.
- `department` (string, optional, nullable) — The workspace creator's department, set during the onboarding. Optional.
- `allowAutomaticScimUserBooking` (boolean, optional, nullable) — Whether the SCIM integration should be able to book additional user seats when provisioning and activating new users, or should return BadRequest. Only admins are allowed to change this setting.
- `sameDomainSignupEnabled` (boolean, optional, nullable) — Whether same domain signup feature is enabled. Only admins are allowed to change this setting.
- `sameDomainSignupRoleId` (string, optional, nullable) — Default Role for users who sign up through same domain signup. Only admins are allowed to change this setting.
- `sameDomainSignupDomains` (list of string, optional, nullable) — Domains enabled for same domain signup feature. Only admins are allowed to change this setting.
- `requireMfa` (boolean, optional) — Whether the workspace requires multi-factor authentication for all users.
- `skipCreateDefaultWorkspaceData` (boolean, optional, nullable) — Whether to skip the creation of default workspace data.
- `id` (string, optional) — The id of the workspace.
- `subdomains` (list of SubdomainBase, optional, nullable) — The workspace's subdomains. Read-only.
- `memberCount` (integer, optional, nullable) — The amount of workspace members. Only visible when the user is authenticated. Read-only.
- `lastUsed` (boolean, optional) — Whether this is the workspace the current user last logged in with.
- `lastLogin` (string, optional, nullable) — The date and time the user last logged in with this workspace, or the workspace was last accessed.
- `accountIds` (list of string, optional, nullable) — The ids of identities assigned to this workspace. Read-only.
- `hasImage` (boolean, optional) — Whether the workspace has uploaded a workspace image.
- `createdOn` (string, optional) — The date this workspace was created.
- `createdBy` (string, optional, nullable) — The id of the user who created this workspace. Only set after the first invitation succeeded.
- `updatedOn` (string, optional) — The date this workspace was last modified.
- `updatedBy` (string, optional, nullable) — The id of the user who last updated this workspace. Only set after the first invitation succeeded.
- `isTestWorkspace` (boolean, optional) — Whether the workspace is a test workspace.
- `isApproved` (boolean, optional) — Whether the user accepted the invitation to the workspace.
- `allowSSOLogin` (boolean, optional) — Whether the user can login via an external SSO provider.
- `isScimActivated` (boolean, optional) — Whether the workspace has SCIM user provisioning enabled.
- `virtualMRR` (double, optional, nullable) — The virtual MRR calculated during onborading.
- `isMobileSignup` (boolean, optional, nullable) — The type of sign-up set during the onboarding. Can be: web, mobile, ...
- `isFreeMail` (boolean, optional, nullable) — Whether the domain of the account of the workspace creator is a freemail or a business domain.
- `isJoinable` (boolean, optional) — Whether this workspace has same domain sign up enabled and the account's email matches the permitted domains.
- `isFull` (boolean, optional, nullable) — Whether this workspace is full and no more users can join. Used in same domain sign up flow.

## Errors

### 400 Bad Request Error

Bad Request

- `code` (string, required) — The error code.
- `description` (string, required) — The description of the error.
- `link` (string, required) — The link to the API documentation page.
- `details` (list of string, optional, nullable) — A list of details describing the error.
- `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property.
- `traceId` (string, optional, nullable) — The request trace id for tracking the request.

### 401 Unauthorized Error

Unauthorized

- `code` (string, required) — The error code.
- `description` (string, required) — The description of the error.
- `link` (string, required) — The link to the API documentation page.
- `details` (list of string, optional, nullable) — A list of details describing the error.
- `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property.
- `traceId` (string, optional, nullable) — The request trace id for tracking the request.

### 404 Not Found Error

Not Found

- `code` (string, required) — The error code.
- `description` (string, required) — The description of the error.
- `link` (string, required) — The link to the API documentation page.
- `details` (list of string, optional, nullable) — A list of details describing the error.
- `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property.
- `traceId` (string, optional, nullable) — The request trace id for tracking the request.

## Types

### SubdomainBase

The base subdomain model.

- `name` (string, optional, nullable) — The subdomain hostname.
- `isDefault` (boolean, optional) — Whether this is the default subdomain of the workspace.

### ValidationErrorResponse

The validation error response.

- `property` (string, optional, nullable) — The name of the property that failed validation.
- `message` (string, optional, nullable) — The reason why this property failed validation.

## Examples

**Request**

```json
{
  "allowSocialLogin": true,
  "allowCredentialsLogin": true
}
```

**Response**

```json
{
  "allowSocialLogin": true,
  "allowCredentialsLogin": true,
  "name": "NCNSTN Creative Agency",
  "description": "We create awesome digital experiences.",
  "language": "de-DE",
  "type": "creative-agency",
  "size": "15",
  "goals": [
    "string"
  ],
  "selfAttribution": "string",
  "previousTool": "string",
  "aiUsage": "string",
  "department": "15",
  "allowAutomaticScimUserBooking": true,
  "sameDomainSignupEnabled": true,
  "sameDomainSignupRoleId": "123e4567-e89b-12d3-a456-426614174000",
  "sameDomainSignupDomains": [
    "string"
  ],
  "requireMfa": true,
  "skipCreateDefaultWorkspaceData": true,
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "subdomains": [
    {
      "name": "ncnstn",
      "isDefault": true
    }
  ],
  "memberCount": 25,
  "lastUsed": true,
  "lastLogin": "2024-01-15T09:30:00Z",
  "accountIds": [
    "string"
  ],
  "hasImage": true,
  "createdOn": "2024-01-15T09:30:00Z",
  "createdBy": "123e4567-e89b-12d3-a456-426614174000",
  "updatedOn": "2024-01-15T09:30:00Z",
  "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
  "isTestWorkspace": false,
  "isApproved": true,
  "allowSSOLogin": true,
  "isScimActivated": true,
  "virtualMRR": 1.1,
  "isMobileSignup": true,
  "isFreeMail": true,
  "isJoinable": true,
  "isFull": true
}
```

**SDK Code**

```python
import requests

url = "https://api.awork.com/api/v1/workspaces/workspaceId"

payload = {
    "allowSocialLogin": True,
    "allowCredentialsLogin": True
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.awork.com/api/v1/workspaces/workspaceId';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"allowSocialLogin":true,"allowCredentialsLogin":true}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.awork.com/api/v1/workspaces/workspaceId"

	payload := strings.NewReader("{\n  \"allowSocialLogin\": true,\n  \"allowCredentialsLogin\": true\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.awork.com/api/v1/workspaces/workspaceId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"allowSocialLogin\": true,\n  \"allowCredentialsLogin\": true\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.awork.com/api/v1/workspaces/workspaceId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"allowSocialLogin\": true,\n  \"allowCredentialsLogin\": true\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.awork.com/api/v1/workspaces/workspaceId', [
  'body' => '{
  "allowSocialLogin": true,
  "allowCredentialsLogin": true
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.awork.com/api/v1/workspaces/workspaceId");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"allowSocialLogin\": true,\n  \"allowCredentialsLogin\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "allowSocialLogin": true,
  "allowCredentialsLogin": true
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.awork.com/api/v1/workspaces/workspaceId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```