> ## Documentation Index
> Fetch the complete documentation index at: https://promptlayer-1023-gorgias-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Track Metadata

Associate a metadata dictionary with a request. This can be used for things like session\_ids, user\_ids, location, etc.

## Example Code

```python
import requests
response = requests.post(
  "https://api.promptlayer.com/rest/track-metadata",
  json={
      "api_key": "<YOUR_API_KEY>",
      "request_id": "<REQUEST_ID>",
      "metadata": {"session_id": "abc123", "user_id": "user123"}
  },
)
```

## Request Parameters

<ParamField body="api_key" type="string">
  Your PromptLayer API Key
</ParamField>

<ParamField body="request_id" type="string" />

<ParamField body="metadata" type="object" />

👋 Contact us at [hello@magniv.io](mailto:hello@magniv.io) if you run into any problems.
