# Workspaces

Workspaces (also called projects) represent the space in which Kantata OX users plan, communicate, and collaborate.

## Fetching a list of Workspaces

 - [GET /workspaces](https://developer.kantata.com/kantata/specification/workspaces/get-workspaces.md): Gets a list of projects.

This endpoint has its own rate limit. See the Knowledge Base for more information.

#### Archived Projects

By default, archived projects are not returned in the response. Use the include_archived=true filter
to retrieve archived projects.


This endpoint returns structured Workspace objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workspaces top-level JSON key.
Please see our Response Format section for more information.

## Creating a new Workspace

 - [POST /workspaces](https://developer.kantata.com/kantata/specification/workspaces/create-workspace.md): Creates a new workspace (project).

This endpoint has its own rate limit. See the Knowledge Base for more information.

Bulk Create

This endpoint supports bulk creating up to 100 objects. In the request body, set the top-level key to its plural form and place the objects in an array. Example:


{
  "workspaces": [
    {
      "title": "Acme Inc - Website Redesign"
    },
    {
      "title": "Acme Inc - Marketing Plan"
    }
  ]
}



This endpoint returns structured Workspace objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workspaces top-level JSON key.
Please see our Response Format section for more information.

## Fetching a single Workspace

 - [GET /workspaces/{id}](https://developer.kantata.com/kantata/specification/workspaces/get-workspace.md): Gets a project by ID.

By default, you will receive a 404 status if you try to retrieve an archived project. Use the include_archived:true
filter to retrieve an archived project.

Users with Project Lead (or lower) account permissions can retrieve projects they are not participating in if they have
the All projects or All projects accessible to their organization (if Organizations are enabled) permission in the
View Resource Center section of the Resource Management Access Group set.


This endpoint returns structured Workspace objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workspaces top-level JSON key.
Please see our Response Format section for more information.

## Updating an existing Workspace

 - [PUT /workspaces/{id}](https://developer.kantata.com/kantata/specification/workspaces/update-workspace.md): This endpoint returns structured Workspace objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workspaces top-level JSON key.
Please see our Response Format section for more information.

## Deleting an existing Workspace

 - [DELETE /workspaces/{id}](https://developer.kantata.com/kantata/specification/workspaces/delete-workspace.md): The response will contain no content and an HTTP 204 status code if the request was
successful, or a standard Kantata OX error message explaining why the object could not be deleted.

## Apply a Project Template to an existing Workspace

 - [PUT /workspaces/{id}/apply_template](https://developer.kantata.com/kantata/specification/workspaces/apply-project-template-to-workspace.md): Applies a template to an existing project.


This endpoint returns structured Workspace objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workspaces top-level JSON key.
Please see our Response Format section for more information.

## Creating a Workspace Invitation

 - [POST /workspaces/{id}/invite](https://developer.kantata.com/kantata/specification/workspaces/create-workspace-invitation.md): Sends an invitation to a project.

To add participants to a project, they must first be invited. Users that already exist in Kantata OX will
automatically accept the invitation and be added to the project. If your account allows anyone to be invited
to projects, users that don't already exist will have the option to create an account. Otherwise, the invited
user must be a member of your account.

This endpoint has its own rate limit. See the Knowledge Base for more information.


This endpoint returns structured Workspace Invitation objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workspace_invitations top-level JSON key.
Please see our Response Format section for more information.

## Fetch permissions in a Workspace

 - [GET /workspaces/{id}/permissions](https://developer.kantata.com/kantata/specification/workspaces/get-my-permissions-in-workspace.md): Gets less common project permissions for the authenticated user.

This endpoint returns structured Workspace objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workspaces top-level JSON key.
Please see our Response Format section for more information.

## Update expense approval setting

 - [PUT /workspaces/{id}/toggle_expense_approvals](https://developer.kantata.com/kantata/specification/workspaces/update-workspace-expense-approval-setting.md): Turns the expense approval setting for a project on or off.

If a backfill_date is specified, expenses until the specified date will be approved and the results of the
approval will be emailed to the authenticated user. Once the expenses have been approved, they cannot be unapproved.


This endpoint returns structured Workspace objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workspaces top-level JSON key.
Please see our Response Format section for more information.

## Update time approval setting

 - [PUT /workspaces/{id}/toggle_time_approvals](https://developer.kantata.com/kantata/specification/workspaces/update-workspace-time-approval-setting.md): Turns the time approval setting for a project on or off.

If you enable the time approval setting and specify a backfill_date, time entries until the specified date will be approved and the results of the
approval will be emailed to the authenticated user. Once the time entries have been approved, they cannot be unapproved.

This setting can't be turned off if there are active timesheet submissions or approvals for the project.


This endpoint returns structured Workspace objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workspaces top-level JSON key.
Please see our Response Format section for more information.

## Unarchive Workspace with Approvals

 - [PUT /workspaces/{id}/unarchive_with_approvals](https://developer.kantata.com/kantata/specification/workspaces/unarchive-workspace-with-approvals.md): Unarchives a project.

If a time lock is set for the account and the project’s time approval setting is enabled, this endpoint will also
approve all unsubmitted time entries on or before the time lock date.


This endpoint returns structured Workspace objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workspaces top-level JSON key.
Please see our Response Format section for more information.

