---
title: "Update organization metadata"
method: PUT
path: "/v2/organizations/{organization_id}/update_metadata"
tags: ["organizations"]
---

# Update organization metadata

`PUT /v2/organizations/{organization_id}/update_metadata`

## Request

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

Updates metadata on the organization.

Returns the updated organization.

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

- `organization_id` integer, required

## Request body

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

## Response `200`

An organization

- object
  - `organization` Organization: Organization model
    - `id` integer, required: Organization ID
    - `name` string, required: Organization name
    - `status` string, required: Organization status
    - `created_at` string, date-time, required: When the record was created
    - `updated_at` string, date-time, required: When the record was last updated
    - `member_profile_fields` MemberProfileFields[], required
      - `key` string, required: The identifier for the custom field. This is used on the organization members endpoint.
      - `type` string, required: The type of the custom field
      - `title` string, required: The label for the custom field
      - `created_on` string, date, required: When the custom field was created
      - `created_by_id` integer, required: User ID who created the custom field
    - `metadata` object: Metadata attached to the organization. Only returned to users who can manage the organization
    - `invite_url` string, uri: Invite URL. Only returned to users who can manage invite links

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