External API

Build on the NetworkHQ API.

Explore the public API, authorize with a workspace key, and test campaign, campaign lead, sender account, lead list, lead import, enrichment, and conversation requests in a dedicated OpenAPI reference.

networkhq.io/apisLive

Sample request

List conversations

200 OK
GET/api/v1/conversations
Authorization: Bearer nhq_live_...

{
  "data": [{
    "lead": {
      "first_name": "Priya",
      "last_name": "Shah"
    },
    "intent": "INTERESTED",
    "last_message": {
      "direction": "received",
      "content": "Interested - send details."
    }
  }]
}
Scoped key

conversations:read

Messages

Direction included

Spec

OpenAPI 3.1

Ready for docs, client generators, and external tooling.

Auth

Bearer API key

Authorize once in the reference with a workspace-scoped token.

Base URL

https://sneakattack.networkhq.io/api/v1

Requests are scoped to the workspace that owns the API key.

Quick start

Two lines to your
first response.

Pick your language, copy the snippet, and replace the key. Conversation responses include the real latest message content and direction.

curl -G "https://sneakattack.networkhq.io/api/v1/conversations?limit=10" \
  -H "Authorization: Bearer nhq_live_..."

Sample response

200application/json
{
  "data": [
    {
      "id": "conv_01jwxq...",
      "intent": "INTERESTED",
      "is_unread": true,
      "last_message": {
        "direction": "received",
        "content": "Interested - send details."
      }
    }
  ],
  "pagination": {"has_more": false}
}
AI agents & LLMs

Hand your agent the whole API in one paste.

We publish a plain-text brief built for models. It teaches an LLM the base URL, how to authenticate, where to get an API key, and points it at the live OpenAPI schema so it can call endpoints on its own.

  1. 01Paste the prompt

    Drop llms.txt into your agent's system prompt or context window. It explains the base URL, auth, and pagination in one block.

  2. 02Add a scoped key

    Generate a workspace API key in Settings, grant only the scopes you need, and hand it to the agent as a secret.

  3. 03Let it read the schema

    The agent fetches openapi.json and builds correct, typed requests itself — no hand-written client required.

/apis/llms.txt
Agent-ready
# NetworkHQ Public API — Guide for AI agents & LLMs

You are an assistant integrating with the NetworkHQ public API on behalf of a
single workspace. Read this guide, then drive every request from the live
OpenAPI schema below.

## 1. Base URL
https://sneakattack.networkhq.io/api/v1

## 2. Schema is the source of truth
Fetch the OpenAPI 3.1 contract before building any request:
  GET https://sneakattack.networkhq.io/api/v1/openapi.json
It lists every path, query parameter, request body, and response shape. Always
trust the schema over assumptions — paths and fields may change.

## 3. Authentication
Every request needs a workspace-scoped API key sent as a bearer token:
  Authorization: Bearer nhq_live_...

Create a key as a workspace OWNER or MANAGER:
  https://sneak.networkhq.io  ->  Settings  ->  API Keys  ->  Create key
Grant only the scopes your integration needs (read/write per resource). A key is
shown once at creation — store it as a secret and never print it back.

## 4. Conventions
- Send and expect JSON.
- List endpoints are cursor-paginated: pass ?limit= and ?cursor=, then follow
  pagination.next_cursor while pagination.has_more is true.
- Status codes: 400 invalid request, 401 missing/invalid key,
  403 key lacks the required scope, 404 not found, 429 rate limited.

## 5. Endpoints and required scopes
  GET  /campaigns                                  campaigns:read
  GET  /campaigns/{campaign_id}/leads              campaigns:read
  GET  /linkedin_accounts                          linkedin_accounts:read
  GET  /lead_lists                                 lead_lists:read
  POST /lead_lists                                 lead_lists:write
  POST /lead_lists/{lead_list_id}/leads            leads:write
  POST /leads/{lead_id}/enrich                     leads:write
  GET  /conversations                              conversations:read
  GET  /conversations/{conversation_id}            conversations:read
  POST /conversations/{conversation_id}/messages   conversations:write

## 6. Example request
  curl -G "https://sneakattack.networkhq.io/api/v1/conversations?limit=10" \
    -H "Authorization: Bearer nhq_live_..."

## 7. Rules for the agent
1. Load https://sneakattack.networkhq.io/api/v1/openapi.json first and build requests from it.
2. Use only the scopes the key was granted; if a 403 means a missing scope, tell
   the user which scope to add rather than retrying.
3. Page through list endpoints with the cursor until has_more is false.
4. Treat the API key as a secret — never echo it back to the user.
5. Confirm with the user before any write action (sending a message, importing
   leads, or enriching) that changes workspace data or spends credits.
API surface

Workspace data, ready for external systems.

Public endpoints for campaign reporting, campaign lead status, sender accounts, batch lead list creation, batch lead import, and conversation history.

Open schema
GET

Campaigns

Campaign status, sender accounts, lead totals, sent activity, replies, and timestamps.

/campaignscampaigns:read
GET

Campaign leads

Review campaign lead status, current state, sender account, lead details, and chronological activity events.

/campaigns/{campaign_id}/leadscampaigns:read
GET

LinkedIn accounts

List workspace sender accounts with profile, status, sending limits, usage, and cooldown fields.

/linkedin_accountslinkedin_accounts:read
GET / POST

Lead lists

Create one or more lead lists, list existing lists, and inspect the leads attached to a list.

/lead_listsread + write
POST

Lead import

Add one lead or submit a batch of leads with per-item validation and results.

/lead_lists/{lead_list_id}/leadsleads:write
POST

Enrichment

Refresh lead profiles with success, cached, failed, and credit-aware states.

/leads/{lead_id}/enrichleads:write
GET

Conversations

List workspace conversations with lead, account, intent, unread state, and latest-message direction.

/conversationsconversations:read
GET

Conversation messages

Fetch one conversation with paginated message history ordered oldest first.

/conversations/{conversation_id}conversations:read
POST

Send messages

Send a plain-text message into an existing LinkedIn conversation thread.

/conversations/{conversation_id}/messagesconversations:write
Setup flow

From API key to first request without guesswork.

Keep setup inside NetworkHQ, then use the generated key in this reference or any external integration that can send bearer-token requests.

  1. 1

    Create the key

    Generate a workspace API key from NetworkHQ settings.

  2. 2

    Choose scopes

    Grant only the public API permissions your integration needs.

  3. 3

    Authorize the docs

    Paste the token into Swagger's Authorize dialog and keep it for the session.

  4. 4

    Ship against the schema

    Test requests here or open the raw OpenAPI JSON in a new tab.

Interactive reference

Test the public API on its own page.

Open the dedicated Swagger UI page to authorize with a bearer token and run live requests against the public API schema. The raw configuration is still available at https://sneakattack.networkhq.io/api/v1/openapi.json.

Cookies

We use essential cookies to keep NetworkHQ working. With your permission, we use non-essential cookies to improve your experience.