1. Reference
  2. REST API

You usually don’t need to use the REST API directly. We provide SDKs to use Hop with various languages and frameworks. The primary reason you’ll need to use the REST API directly is if you’re writing a Hop API wrapper in a language which we don’t have SDK support for yet.

Every feature and action provided by Hop is implemented into our HTTP REST API. The Hop Console, Hop CLI and all server side SDKs use the Hop REST API in the background.

API Base Hostname

https://api.hop.io/v1/

Currently, only version 1 (v1) of the API exists.

View list of Hop API endpoints

Response Structure

All responses from the API will be sent to you in the following JSON format.

success
boolean

Indicates whether the response is successful

data
object

The response data object

error?
object

This field will be present if success is false

Error Structure

If success is false, the following error object type will be returned under the error field.

code
string

The Hop error code, e.g. invalid_token

message
string

The human-readable error message

Authentication

For most use-cases, you will just need to use a Project Token (they start with ptk_) to authenticate API routes. If you need access to user-scoped routes, then you can pass in a Personal Access Token generated from the Hop Console - they start with pat_.

To provide authentication to the API, send a token under the Authorization HTTP header. For example:

Authorization: ptk_xxx