---
title: "Update project metadata"
method: PUT
path: "/v2/projects/{project_id}/update_metadata"
tags: ["projects"]
---

# Update project metadata

`PUT /v2/projects/{project_id}/update_metadata`

## Request

- Base URL: `https://api.hubstaff.com`
- URL: `https://api.hubstaff.com/v2/projects/{project_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/projects/:project_id/update_metadata/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates metadata on the project.

Returns the updated project.

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

- `project_id` integer, required

## Request body

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

## Response `200`

A project

- object
  - `project` Project: Project model
    - `id` integer, required: Project ID
    - `name` string, required: Project name
    - `description` string: Project description
    - `created_at` string, date-time, required: When the record was created
    - `updated_at` string, date-time, required: When the record was last updated
    - `status` string, required: Project status
    - `type` string, required: Project type (project, work_order, work_break)
    - `client_id` integer: Client ID
    - `billable` boolean, required: Default state of billable attribute for new activity
    - `budget` Budget
      - `type` string, required: The budget type
      - `rate` string: The budget rate type
      - `cost` number, float: The budget cost limit
      - `hours` number, float: The budget hours limit
      - `start_date` string, date: The budget start date
      - `alerts` object, required
        - `near_limit` integer, required: The budget near limit percentage
        - `notify_enabled` boolean, required: Whether budget notifications are enabled
        - `notify_all_members` boolean, required: Whether to notify all project members
        - `notify_group` string: The group to notify
      - `recurrence` string: The budget recurrence frequency
      - `recurrence_start` integer: Day of week (0-6, 0=Sunday) for weekly recurrence, or day of month (1-31) for monthly recurrence
      - `include_non_billable` boolean, required: Whether the budget includes non-billable time
      - `stop_timer_when_budget_reached` boolean, required: Whether to stop timers when budget is reached
      - `stop_at` integer: The budget percentage at which timers stop
    - `metadata` object, required: Metadata attached to the project
    - `pay_rate` number, float: Default pay rate for the project
    - `bill_rate` number, float: Default bill rate for the project

## 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)
