Management API

Overview

Set up the Management API client to programmatically manage your Nahook workspace

The Management API lets you programmatically manage workspace resources — endpoints, event types, subscriptions, environments, applications, and portal sessions. It uses management tokens (nhm_...) which are separate from API keys used for ingestion.

Management tokens are created in Settings → Management Tokens in the dashboard.

Authentication

All management endpoints require a Bearer token in the Authorization header:

Authorization: Bearer nhm_YOUR_TOKEN

Base URL: https://api.nahook.com

Install

In every language except Node.js, the management SDK ships in the same package as the ingestion SDK. If you've already installed the package for sending webhooks, you don't need a second install — just import NahookManagement (or the equivalent) from the same package.

npm install @nahook/management
pip install nahook
go get github.com/getnahook/nahook-go
<dependency>
  <groupId>com.nahook</groupId>
  <artifactId>nahook-java</artifactId>
  <version>0.2.0</version>
</dependency>
dotnet add package Nahook
composer require nahook/nahook-php
gem install nahook
cargo add nahook

Setup

# All management endpoints use Bearer token auth
curl https://api.nahook.com/management/v1/workspaces/ws_abc/environments \
  -H "Authorization: Bearer nhm_YOUR_TOKEN"
import { NahookManagement } from "@nahook/management";

const mgmt = new NahookManagement("nhm_YOUR_TOKEN");
from nahook import NahookManagement

mgmt = NahookManagement("nhm_YOUR_TOKEN")
import "github.com/getnahook/nahook-go/management"

mgmt, _ := management.New("nhm_YOUR_TOKEN")
import com.nahook.NahookManagement;

var mgmt = NahookManagement.builder("nhm_YOUR_TOKEN").build();
using Nahook;

var mgmt = new NahookManagement("nhm_YOUR_TOKEN");
use Nahook\NahookManagement;

$mgmt = new NahookManagement("nhm_YOUR_TOKEN");
require "nahook"

mgmt = Nahook::Management.new("nhm_YOUR_TOKEN")
use nahook::NahookManagement;

let mgmt = NahookManagement::builder("nhm_YOUR_TOKEN").build()?;

Available Resources

For the raw API specification (request/response schemas), see the API Reference section in the sidebar.