---
title: "Update team metadata"
method: PUT
path: "/v2/teams/{team_id}/update_metadata"
tags: ["teams"]
---

# Update team metadata

`PUT /v2/teams/{team_id}/update_metadata`

## Request

- Base URL: `https://api.hubstaff.com`
- URL: `https://api.hubstaff.com/v2/teams/{team_id}/update_metadata`
- Auth: OAuth 2
  - Authorization code: `https://account.hubstaff.com/authorizations/new`
  - Token URL: `https://account.hubstaff.com/access_tokens` scopes: `hubstaff:read`, `hubstaff:write`
- TypeScript: <https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/docs/v2/teams/:team_id/update_metadata/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates metadata on the team.

Returns the updated team.

Only specify the metadata keys you want to change. If the metadata key does not exist, it will be created. To remove a key, specify null as the value.

Key requirements:
- 2-30 characters
- Lowercase letters, numbers, and underscores only

Value requirements:
- Valid UTF-8 string
- Maximum 200 characters

## Path parameters

- `team_id` integer, required

## Request body

- PutV2TeamsTeamIdUpdateMetadata: Update team metadata
  - `metadata` object[], required
    - `key` string, required: The metadata key
    - `value` string, required: The value for the metadata key

## Response `200`

A team

- object
  - `team` Team: Team model
    - `id` integer, required: Team ID
    - `name` string, required: Team name
    - `created_at` string, date-time, required: When the record was created
    - `updated_at` string, date-time, required: When the record was last updated
    - `metadata` object, required: Metadata attached to the team
    - `lead_options` object: Lead options
      - `approve_timesheets` boolean, required: Team leads can approve timesheets for team members
      - `notifications_for_timesheets_only_leads` boolean, required: Only team leeds receive timesheet notifications. Requires approve_timesheets enabled.
      - `approve_time_off` boolean, required: Team leads can approve time off for team members
      - `approve_manual_time` boolean, required: Team leads can approve manual time added for team members
      - `receive_manual_time_notification` boolean, required: Only team leads receive manual time notifications. Requires approve_manual_time enabled.
      - `notifications_for_time_off_only_leads` boolean, required: Only team leads receive time off notifications. Requires approve_time_off enabled.
      - `schedule_shifts` boolean, required: Team leads can schedule shifts for team members
      - `notifications_for_schedules_only_leads` boolean, required: Only team leads receive notifications for shifts. Requires schedule_shifts enabled.
      - `notifications_for_limits` boolean, required: Team leads receive weekly and daily limit notifications for team members
      - `notifications_for_limits_only_leads` boolean, required: Team lead only receive weekly and daily limit notifications. Requires notifications_for_limits enabled.
      - `notifications_work_breaks` boolean, required: Team leads receive work break notifications for team members
      - `notifications_work_breaks_only_leads` boolean, required: Only team leads receive work break notifications. Requires notifications_work_breaks enabled.
      - `manage_team_projects` boolean, required: Team leads can create team projects
      - `manage_team_members` boolean, required: Team leads can edit members and their roles
      - `invite_members_to_organization` boolean, required: Team leads can invite new members to the organization
      - `notifications_for_job_sites` boolean, required: Team leads receive job site notifications
      - `notifications_for_job_sites_only_leads` boolean, required: Only team leads receive job site notifications. Requires notifications_for_job_sites enabled.
      - `others_screenshots` boolean, required: View screenshots/activities for other members
      - `manage_billing` boolean, required: Manage financials

## Other responses

- `400`: Invalid parameters
- `401`: Unauthorized
- `403`: API access is only for organizations on an active plan
- `404`: Could not find record
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api.md) - [All operations](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/revisions/c6b90e4e4bdc?raw)
