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

# Retrieve current workspace

GET https://api.projectmanager.com/api/data/workspaces

Returns the workspace the user is currently logged on to as a single-item list.
            
This endpoint does not return every workspace the user can access. To switch workspaces
or list all accessible workspaces, use workspace selection flows (for example `/api/data/me`
and the workspace selector).

Reference: https://developer.projectmanager.com/api-reference/work-space/retrieve-current-workspace

## Authentication

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

## Request

### Headers

- `x-integration-name` (string, optional) — The name of the calling system passed along as a header parameter

## Response

### 200

Success

- `error` (AstroError, optional, nullable) — If the API call failed, this will contain information about the error that occurred.
- `success` (boolean, optional) — True if the API call succeeded; false otherwise.
- `hasError` (boolean, optional) — True if the API call failed.
- `statusCode` (enum, optional) — The HTTP code of the response.
  - Allowed values: `Continue`, `SwitchingProtocols`, `Processing`, `EarlyHints`, `OK`, `Created`, `Accepted`, `NonAuthoritativeInformation`, `NoContent`, `ResetContent`, `PartialContent`, `MultiStatus`, `AlreadyReported`, `IMUsed`, `MultipleChoices`, `MovedPermanently`, `Found`, `SeeOther`, `NotModified`, `UseProxy`, `Unused`, `TemporaryRedirect`, `PermanentRedirect`, `BadRequest`, `Unauthorized`, `PaymentRequired`, `Forbidden`, `NotFound`, `MethodNotAllowed`, `NotAcceptable`, `ProxyAuthenticationRequired`, `RequestTimeout`, `Conflict`, `Gone`, `LengthRequired`, `PreconditionFailed`, `RequestEntityTooLarge`, `RequestUriTooLong`, `UnsupportedMediaType`, `RequestedRangeNotSatisfiable`, `ExpectationFailed`, `MisdirectedRequest`, `UnprocessableEntity`, `Locked`, `FailedDependency`, `UpgradeRequired`, `PreconditionRequired`, `TooManyRequests`, `RequestHeaderFieldsTooLarge`, `UnavailableForLegalReasons`, `InternalServerError`, `NotImplemented`, `BadGateway`, `ServiceUnavailable`, `GatewayTimeout`, `HttpVersionNotSupported`, `VariantAlsoNegotiates`, `InsufficientStorage`, `LoopDetected`, `NotExtended`, `NetworkAuthenticationRequired`
- `data` (list of WorkSpaceDto, optional) — If the API call succeeded, this will contain the results.

## Types

### AstroError

Information about an error that occurred within the ProjectManager API.

- `technicalError` (string, optional, nullable) — A technical description of the error that occurred. Not suitable for display to end users.
- `additionalErrors` (list of string, optional, nullable) — If additional errors beyond the main error in `Message` occurred, they will be listed here as individual messages.
- `validationErrors` (map from string to list of string, optional, nullable) — This contains a dictionary of validation errors. The key is the name of the field
- `message` (string, optional, nullable) — A description of the error that occurred. If your application has a user interface, show this message to explain what went wrong.

### WorkSpaceDto

A Workspace represents a single business subscription to the ProjectManager.com service. You can be a member of multiple Workspaces. Each Workspace is completely separate from all other Workspaces and a user cannot log in to multiple Workspaces at the same time.

- `id` (string, optional) — The unique identifier of this Workspace.
- `company` (string, optional) — The name of this Workspace.
- `customProductDomain` (string, optional) — The unique DNS domain of this Workspace.
- `accountOwnerId` (string, optional, nullable) — The unique identifier of the user that is the account owner of this Workspace.
- `isOwner` (boolean, optional) — This value is set to true if the user who retrieves this Workspace object via an API call is the owner of this Workspace.
- `organizationId` (string, optional) — The organization code used for authentication systems for this Workspace.
- `color` (string, optional) — The RGB color in the format `#RRGGBB` for this Workspace.
- `roleName` (string, optional) — The role of the current user within this Workspace.
- `registerDate` (string, optional) — The timestamp when the Workspace was created.
- `businessUserId` (string, optional, nullable) — The unique identifier of the BusinessUser that is the owner of this Workspace.
- `isPaid` (boolean, optional) — True if this Workspace has an active subscription; false if this is a free trial.
- `status` (string, optional) — The account status of this Workspace (for example `Active`, `Trial`, `Cancelled`).
- `isActive` (boolean, optional) — True if this Workspace is currently active or in trial and can be used.
- `isReseller` (boolean, optional) — True if this Workspace is provisioned through a reseller (for example, Acumatica).
- `licenses` (WorkspaceLicensesDto, optional) — A summary of the paid user licenses for this Workspace.
- `settings` (WorkspaceSettingsDto, optional) — Workspace-level scheduling defaults.
- `customerId` (string, optional, nullable, deprecated) — This value is marked obsolete as it is no longer used. Use `AccountOwnerId` instead.
- `isInviteAccepted` (boolean, optional, deprecated) — True if the user has accepted an invitation to this Workspace.

### WorkspaceLicensesDto

A summary of the paid user licenses for the workspace the current user is logged on to.

- `purchased` (integer, optional) — The number of paid user licenses purchased for this workspace.
- `used` (integer, optional) — The number of paid user licenses currently in use by active (non-guest) users.
- `guestUsed` (integer, optional) — The number of active guest users in this workspace.
- `remaining` (integer, optional) — The number of purchased licenses still available. This can be negative when the workspace has more active users than purchased licenses.

### WorkspaceSettingsDto

Workspace-level scheduling defaults returned with a workspace.

- `defaultPlannedHours` (double, optional) — Default planned hours per day for new resources (0–24).
- `workingDays` (WorkspaceWorkingDaysDto, optional) — Default working hours per weekday for the workspace calendar.

### WorkspaceWorkingDaysDto

Working hours per weekday (0 = non-working day). On update, omit a property (or send null) to leave that day unchanged.

- `monday` (double, optional, nullable) — Working hours on Monday.
- `tuesday` (double, optional, nullable) — Working hours on Tuesday.
- `wednesday` (double, optional, nullable) — Working hours on Wednesday.
- `thursday` (double, optional, nullable) — Working hours on Thursday.
- `friday` (double, optional, nullable) — Working hours on Friday.
- `saturday` (double, optional, nullable) — Working hours on Saturday.
- `sunday` (double, optional, nullable) — Working hours on Sunday.

## Examples

**Response**

```json
{
  "error": {
    "technicalError": "string",
    "additionalErrors": [
      "string"
    ],
    "validationErrors": {},
    "message": "string"
  },
  "success": true,
  "hasError": true,
  "statusCode": "Continue",
  "data": [
    {
      "id": "string",
      "company": "string",
      "customProductDomain": "string",
      "accountOwnerId": "string",
      "isOwner": true,
      "organizationId": "string",
      "color": "string",
      "roleName": "string",
      "registerDate": "2024-01-15T09:30:00Z",
      "businessUserId": "string",
      "isPaid": true,
      "status": "string",
      "isActive": true,
      "isReseller": true,
      "licenses": {
        "purchased": 1,
        "used": 1,
        "guestUsed": 1,
        "remaining": 1
      },
      "settings": {
        "defaultPlannedHours": 1.1,
        "workingDays": {
          "monday": 1.1,
          "tuesday": 1.1,
          "wednesday": 1.1,
          "thursday": 1.1,
          "friday": 1.1,
          "saturday": 1.1,
          "sunday": 1.1
        }
      },
      "customerId": "string",
      "isInviteAccepted": true
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.projectmanager.com/api/data/workspaces"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.projectmanager.com/api/data/workspaces';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.projectmanager.com/api/data/workspaces"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	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.projectmanager.com/api/data/workspaces")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.get("https://api.projectmanager.com/api/data/workspaces")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.projectmanager.com/api/data/workspaces', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.projectmanager.com/api/data/workspaces");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.projectmanager.com/api/data/workspaces")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```