---
title: "Set conversation custom metadata"
method: PUT
path: "/v1/conversations/{call_id}/metadata"
tags: ["Calls"]
---

# Set conversation custom metadata

`PUT /v1/conversations/{call_id}/metadata`

## Request

- Base URL: `https://app.goguava.ai`
- URL: `https://app.goguava.ai/v1/conversations/{call_id}/metadata`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/goguava/apis/guava-api-server/docs/v1/conversations/:call_id/metadata/put.ts> (a function with typed inputs; its response is checked against the schema)

Stores a custom JSON object on a conversation, replacing any existing metadata, and returns the stored metadata.
The object is also returned as `metadata` when fetching the conversation. The serialized object may be at
most 4 KiB, and objects and arrays may be nested at most 5 levels deep.

## Path parameters

- `call_id` string, required: ID of the call to attach metadata to.

## Request body

- object: An arbitrary JSON object.

## Response `200`

Successful Response

- UserMetadataResponse
  - `metadata` object, required

## Other responses

- `400`: Metadata is nested more than 5 levels deep, or contains NaN or Infinity.
- `401`: Missing or invalid credentials.
- `404`: Conversation not found.
- `413`: Metadata exceeds 4 KiB when serialized.
- `422`: Validation Error

---

[API](https://skmtc.dev/goguava/apis/guava-api-server.md) - [All operations](https://skmtc.dev/goguava/apis/guava-api-server/llms.txt) - [OpenAPI document](https://skmtc.dev/goguava/apis/guava-api-server/revisions/2d944746bc25?raw)
