> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hop.io/llms.txt
> Use this file to discover all available pages before exploring further.

# REST API

> About the Hop REST API

<Note>
  You usually don't need to use the REST API directly. We provide
  [SDKs](/sdks/overview) 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.
</Note>

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](https://api-staging.hop.io/docs/static/index.html#/)

## Response Structure

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

<ParamField path="success" type="boolean">
  Indicates whether the response is successful
</ParamField>

<ParamField path="data" type="object">
  The response data object
</ParamField>

<ParamField path="error?" type="object">
  This field will be present if success is false
</ParamField>

### Error Structure

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

<ParamField path="code" type="string">
  The Hop error code, e.g. `invalid_token`
</ParamField>

<ParamField path="message" type="string">
  The human-readable error message
</ParamField>

## Authentication

For most use-cases, you will just need to use a [Project Token](./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
```
