Using the API

Here's a quick rundown on how to use our REST based API.

HTTP Method

The HTTP method of an endpoint defines the type of action it performs on a given resource. Some common HTTP methods are GET, POST, DELETE, and PATCH. The REST API reference documentation provides the HTTP method for every endpoint.

Where possible, the Bankless API strives to use an appropriate HTTP method for each action.

  • GET: Used for retrieving resources.

  • POST: Used for creating resources.

  • PATCH: Used for updating properties of resources.

  • PUT: Used for replacing resources or collections of resources.

  • DELETE: Used for deleting resources.

Path

Each endpoint has a path. The API reference documentation gives the path for every endpoint. For example, the path for the "Get All Claimables" is /claimables/{address}.

The curly brackets {} in a path denote path parameters that you need to specify. Path parameters modify the endpoint path and are required in your request. For example, the path parameter for the "Get All Claimables" is {address}. To use this path in your API request, replace {address} with the address you wish to search claimables for.

Accept

Most Bankless API endpoints specify that you should pass an Accept header with a value of application/json. The value of the Accept header is a media type.

Authentication

Many endpoints require authentication or return additional information if you are authenticated. In order to authenticate a request, visit the "how to authenticate" section.

License

Depending on your agreement, you'll either have a Passthrough or Embedded license attached to your API key:

  • Passthrough: Links which users need to access to claim their Claimables or explore a Quest will link to a bankless.com/... link

  • Embedded: You'll have full access to all links so you can serve this in your own application and send users directly to the relevant Claimable or Quest, without having to go via bankless.com

Last updated