Skip to main content

Overview

This migration guide covers the breaking change introduced in Blnk v0.13.6 for the 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.

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.
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 ?? {};

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 or join our Discord community.
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 →