API Reference

Public Key

The shared public API key, served without a key to wallets that have no account yet. Not a secret: what it may call is confined server-side to routes that return no per-consumer data.

GET
/v1/public-key

Public: no API key, since a wallet without an account holds none yet. env=dev (the default) returns the testnet key and env=prod the mainnet one; that key reaches only the routes marked x-cosmos-public-key. Cached for 5 minutes (Cache-Control: public, max-age=300) so a rotation reaches wallets quickly; 503 misconfigured when this deployment publishes no key for that environment.

env?string

dev is the testnet key, prod the public-network one.

Default"dev"
Value in"dev""prod"

OK

The body, query or path failed validation. message is an array of the individual failures.

Routes that reject a valid request for a reason of their own (an amount, a memo, a state) document the code for it on their own 400.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

misconfigured: A server-side configuration error: retrying will not help

Example Request
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/public-key'
Example Response
{  "env": "dev",  "apiKey": "dv_4f1c9a7e0b2d6c8e3a5f7b9d1e3c5a7f9b1d3e5c7a9f1b3d5e7c9a1f3b5d7e9c"}