---
title: "Update time approval setting"
method: PUT
path: "/workspaces/{id}/toggle_time_approvals"
tags: ["Workspaces"]
---

# Update time approval setting

`PUT /workspaces/{id}/toggle_time_approvals`

## Request

- Base URL: `https://api.mavenlink.com/api/v1`
- URL: `https://api.mavenlink.com/api/v1/workspaces/{id}/toggle_time_approvals`
- Auth: none declared

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/Response-Format) section for more information.

## Path parameters

- `id` integer, required

## Query parameters

- `include` string
- `optional_fields` string[]

## Request body

- object
  - `workspace` object
    - `enable` boolean: Whether time approvals should be enabled.
    - `backfill_date` string, date: If `enable` is true, this is the date through which to approve existing time entries. The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

## Response `200`

Workspace has been updated.

- object
  - `count` integer
  - `meta` object
    - `count` integer
    - `page_count` integer
    - `page_number` integer
    - `page_size` integer
  - `results` object[]
    - `key` string
    - `id` string
  - `workspaces` object
  - `external_references` object
  - `stories` object
  - `users` object
  - `participations` object
  - `timesheet_submissions` object
  - `workspace_groups` object
  - `custom_field_values` object
  - `workspace_resources` object
  - `status_reports` object
  - `account_colors` object
  - `account_insights_mappings` object
  - `billing_milestones` object

## Other responses

- `400`: Bad Request
- `401`: Unauthorized request
- `403`: Forbidden request
- `404`: Page Not Found
- `422`: Unprocessable Entity
- `503`: Service is unavailable

---

[API](https://skmtc.dev/kantata/apis/kantata-ox-api-documentation.md) - [All operations](https://skmtc.dev/kantata/apis/kantata-ox-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/kantata/apis/kantata-ox-api-documentation/revisions/9d4ebed2fa98?raw)
