Response envelope

The fixed outer shape every response has, wrapping the data.

What it means

An envelope puts the payload inside a wrapper with a predictable set of keys, so a client can check for success and read metadata the same way on every call.

How Onekey handles it

Every Onekey response, success or failure, has success, data, metadata and error. List endpoints that page add pagination; a URL lookup adds resolved. Branch on error.type, which is stable, not on the message text. Extra informational fields may appear over time, so read what you need and ignore the rest.

Read more

Related terms

← All terms