> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blnkfinance.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 0.13.6 Migration Guide

> Migration guide for upgrading to Blnk v0.13.6, covering the Update Metadata response field change from metadata to meta_data.

## Overview

This migration guide covers the breaking change introduced in Blnk v0.13.6 for the [Update Metadata](/reference/update-metadata) endpoint. The response now returns the field **`meta_data`** (with underscore) instead of the inconsistent **`metadata`**.

If your code reads the update-metadata response by key, you need to handle this change.

***

## Breaking changes summary

* **From:** Response contains `metadata` (inconsistent with request body and other APIs)
* **To:** Response uses `meta_data` (consistent with request body and other APIs)
* **Impact:** Code that reads the update-metadata response using the key `metadata` will no longer find the object. Use `meta_data` or support both for compatibility.

***

## What changed

1. **Update Metadata response:** `POST /{id}/metadata` responses now return the metadata object under the key **`meta_data`** only.
2. **Consistency:** This aligns the response with the request body parameter name (`meta_data`) and with how metadata is exposed elsewhere in the API.

***

## Recommended approach: Expect both keys

To support Blnk versions before and after 0.13.6, read the metadata from the response using either `meta_data` or `metadata`, with `meta_data` taking precedence when present.

<CodeGroup>
  ```typescript TypeScript theme={"system"}
  const response = await fetch(`${baseUrl}/${resourceId}/metadata`, {
    method: 'POST',
    headers: {
      'X-blnk-key': apiKey,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ meta_data: { key: 'value' } }),
  });

  const data = await response.json();

  // Support both meta_data (0.13.6+) and metadata (pre-0.13.6)
  const metadata = data.meta_data ?? data.metadata ?? {};
  ```

  ```go Go theme={"system"}
  var result struct {
    MetaData  map[string]interface{} `json:"meta_data"`
    Metadata map[string]interface{} `json:"metadata"` // pre-0.13.6
  }

  if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
    // handle error
  }

  metadata := result.MetaData

  if metadata == nil {
    metadata = result.Metadata
  }

  if metadata == nil {
    metadata = make(map[string]interface{})
  }
  ```

  ```python Python theme={"system"}
  response = requests.post(
      f"{base_url}/{resource_id}/metadata",
      headers={"X-blnk-key": api_key, "Content-Type": "application/json"},
      json={"meta_data": {"key": "value"}},
  )

  data = response.json()

  # Support both meta_data (0.13.6+) and metadata (pre-0.13.6)
  metadata = data.get("meta_data") or data.get("metadata") or {}
  ```

  ```php PHP theme={"system"}
  $response = $client->post("{$baseUrl}/{$resourceId}/metadata", [
      'headers' => [
          'X-blnk-key' => $apiKey,
          'Content-Type' => 'application/json',
      ],
      'json' => ['meta_data' => ['key' => 'value']],
  ]);

  $data = json_decode($response->getBody()->getContents(), true);

  // Support both meta_data (0.13.6+) and metadata (pre-0.13.6)
  $metadata = $data['meta_data'] ?? $data['metadata'] ?? [];
  ```
</CodeGroup>

***

## Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool.

To ask questions or discuss issues, please [contact us](mailto:support@blnkfinance.com) or [join our Discord community](https://discord.gg/7WNv94zPpx).

***

<Tip>
  **Tip:** Connect to Blnk Cloud to see your Core data.

  You can view your transactions, manage identities, create custom reports, invite other team members to collaborate, and perform operations on your Core — all in one dashboard.

  [Check out Blnk Cloud →](https://www.blnkfinance.com/products/cloud)
</Tip>
