Skip to content
On this page

Introduction

Welcome to the Nightwatch API docs! Here you can find guides on how to interact with data associated with your Nightwatch account using HTTP requests (REST API).

If you don't have an account yet, sign up for a Nightwatch account.

API Access is enabled on Optimize and Agency plans only.

Obtain an access token for your user

shell
curl 'https://api.nightwatch.io/api/v1/token' \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"email": "YOUR_EMAIL", "password": "YOUR_PASSWORD"}

The above command returns JSON structured like this:

json
  {
    "access_token": "TOKEN"
  }

This endpoint gets you the access token that you must include with all your requests.

HTTP Request

POST https://api.nightwatch.io/api/v1/token

Body Parameters

ParameterDescription
emailYour Nightwatch e-mail
passwordYour Nightwatch password