Skip to the content

Catalog

The shared SKU catalog - keep it in step with an ERP or PIM, check the codes in use against the active tariff schedule, and read the alerts raised when a schedule changes.

The catalog holds your products with the tariff code each one uses. It answers two questions an ERP or PIM integration has: is the code we use still a valid line of the current schedule, and which products are affected when the schedule changes.

A SKU is identified by sku and market together: the same sku can exist once for US, once for EU and once for VN. Creating a SKU that exists updates it, so a sync can be repeated safely.

The SKU object

Field Type Meaning
id integer The id of the SKU in the catalog
sku string Your SKU code, up to 128 characters
market string US, EU or VN
description, material, use, composition, origin, notes string The product, as on a lookup
origin_label string The country of origin, named in the language of the reader
external_ref string Your own reference, for example the id in the ERP. Stored and returned as sent
current_code string or null The code in use
code_status string valid (a declarable line of the active schedule), not_declarable (a heading or a line that is not declarable), invalid (not in the schedule), changed or expired (affected by a new version), or unknown (no code)
code_status_label, code_status_detail string The status in words
checked_version, checked_at string or null The tariff version the code was checked against, and when
suggested_code string or null The code of the latest lookup for this SKU
last_lookup_id string or null That lookup
created_at, updated_at string ISO 8601, UTC
alerts array The latest 50 alerts of the SKU, acknowledged or not. Only on GET /api/skus/{sku_id}

The alert object

An alert is raised for a SKU when a new version of the tariff schedule removes or changes its code. Each alert has an id, the sku_id, a kind (code_removed, code_changed or code_invalid), a message, created_at, and acknowledged_at with acknowledged_by once someone has dealt with it. Raising one sends the webhook event sku.alert (Webhooks).

POST /api/skus

Changes data in your account when executed. A SKU is identified by sku and market. current_code, when given, is checked against the active tariff schedule of the market.

Request body (application/json)

Name Type Required Description
sku string Yes Up to 128 characters
market string No Up to 8 characters, default "US"
description string Yes Up to 2000 characters
material string No Up to 500 characters
use string No Up to 500 characters
composition string No Up to 500 characters
origin string No Up to 100 characters
notes string No Up to 1000 characters
external_ref string No Up to 255 characters
current_code string or null No Up to 24 characters

Returns 200 with a JSON object, as in the example.

Errors: 401 No valid API key was sent; 403 The role of the key, or the plan of the account, does not allow this call; 422 The request is not valid; 500 An unexpected failure.

Try it in the explorer

POST /api/skus
curl -X POST "https://htspilot.com/api/skus" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME" \
  -H "Content-Type: application/json" \
  -d '{
  "sku": "EXAMPLE-TSH-001",
  "market": "US",
  "description": "Men'\''s T-shirt, knitted, 100% cotton, short sleeves",
  "material": "cotton",
  "use": "apparel",
  "composition": "100% cotton",
  "origin": "VN",
  "notes": "",
  "external_ref": "ERP-100045",
  "current_code": "6109.10.00.12"
}'
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://htspilot.com/api/skus",
    data=json.dumps({
        "sku": "EXAMPLE-TSH-001",
        "market": "US",
        "description": "Men's T-shirt, knitted, 100% cotton, short sleeves",
        "material": "cotton",
        "use": "apparel",
        "composition": "100% cotton",
        "origin": "VN",
        "notes": "",
        "external_ref": "ERP-100045",
        "current_code": "6109.10.00.12",
    }).encode(),
    headers={"X-API-Key": os.environ["HTS_PILOT_API_KEY"], "Content-Type": "application/json"},
    method="POST",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))
const response = await fetch("https://htspilot.com/api/skus", {
  method: "POST",
  headers: { "X-API-Key": process.env.HTS_PILOT_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "sku": "EXAMPLE-TSH-001",
    "market": "US",
    "description": "Men's T-shirt, knitted, 100% cotton, short sleeves",
    "material": "cotton",
    "use": "apparel",
    "composition": "100% cotton",
    "origin": "VN",
    "notes": "",
    "external_ref": "ERP-100045",
    "current_code": "6109.10.00.12"
  }),
});
console.log(await response.json());
Response 200
{
  "id": 1,
  "sku": "EXAMPLE-TSH-001",
  "market": "US",
  "description": "Men's T-shirt, knitted, 100% cotton, short sleeves",
  "material": "cotton",
  "use": "apparel",
  "composition": "100% cotton",
  "origin": "VN",
  "origin_label": "Vietnam (VN)",
  "notes": "",
  "external_ref": "ERP-100045",
  "current_code": "6109.10.00.12",
  "code_status": "valid",
  "code_status_label": "Valid",
  "code_status_detail": "Valid declarable code",
  "checked_version": "2026-SAMPLE",
  "checked_at": "2026-10-03T16:07:52.330808+00:00",
  "suggested_code": null,
  "last_lookup_id": null,
  "created_at": "2026-10-03T16:07:52.330808+00:00",
  "updated_at": "2026-10-03T16:07:52.330808+00:00"
}

Sync many SKUs

POST /api/skus/bulk

Changes data in your account when executed. Up to 5000 items per call. With check_codes every current_code is checked against the active tariff schedule. With classify_missing the SKUs without a code are classified in the background, which spends credits.

Request body (application/json)

Name Type Required Description
items SkuIn[] Yes -
check_codes boolean No Default true
classify_missing boolean No Classify SKUs without a code (in the background). Default false

items: SkuIn

Name Type Required Description
sku string Yes Up to 128 characters
market string No Up to 8 characters, default "US"
description string Yes Up to 2000 characters
material string No Up to 500 characters
use string No Up to 500 characters
composition string No Up to 500 characters
origin string No Up to 100 characters
notes string No Up to 1000 characters
external_ref string No Up to 255 characters
current_code string or null No Up to 24 characters

Returns 200 with a JSON object, as in the example.

Errors: 401 No valid API key was sent; 403 The role of the key, or the plan of the account, does not allow this call; 422 The request is not valid; 500 An unexpected failure.

Try it in the explorer

The answer lists each item with its id and code_status. classify_missing creates a lookup for every SKU without a code: the lookups can be charged, the call needs the plan feature feature.batch, and the whole call is refused when the count is over the plan's row limit. The call itself never answers 402: a lookup that cannot be charged is not created, and its SKU stays without a suggested code. The suggested codes arrive as the lookups finish: read them from the SKUs (suggested_code, last_lookup_id). These lookups send no lookup.completed event.

POST /api/skus/bulk
curl -X POST "https://htspilot.com/api/skus/bulk" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME" \
  -H "Content-Type: application/json" \
  -d '{
  "items": [
    {
      "sku": "EXAMPLE-TSH-001",
      "market": "US",
      "description": "Men'\''s T-shirt, knitted, 100% cotton, short sleeves",
      "material": "cotton",
      "use": "apparel",
      "composition": "100% cotton",
      "origin": "VN",
      "notes": "",
      "external_ref": "ERP-100045",
      "current_code": "6109.10.00.12"
    },
    {
      "sku": "EXAMPLE-TWL-014",
      "market": "US",
      "description": "Cotton terry bath towel, 70 x 140 cm",
      "origin": "IN",
      "external_ref": "ERP-100046"
    }
  ],
  "check_codes": true,
  "classify_missing": false
}'
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://htspilot.com/api/skus/bulk",
    data=json.dumps({
        "items": [
            {
                "sku": "EXAMPLE-TSH-001",
                "market": "US",
                "description": "Men's T-shirt, knitted, 100% cotton, short sleeves",
                "material": "cotton",
                "use": "apparel",
                "composition": "100% cotton",
                "origin": "VN",
                "notes": "",
                "external_ref": "ERP-100045",
                "current_code": "6109.10.00.12",
            },
            {
                "sku": "EXAMPLE-TWL-014",
                "market": "US",
                "description": "Cotton terry bath towel, 70 x 140 cm",
                "origin": "IN",
                "external_ref": "ERP-100046",
            },
        ],
        "check_codes": True,
        "classify_missing": False,
    }).encode(),
    headers={"X-API-Key": os.environ["HTS_PILOT_API_KEY"], "Content-Type": "application/json"},
    method="POST",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))
const response = await fetch("https://htspilot.com/api/skus/bulk", {
  method: "POST",
  headers: { "X-API-Key": process.env.HTS_PILOT_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "items": [
      {
        "sku": "EXAMPLE-TSH-001",
        "market": "US",
        "description": "Men's T-shirt, knitted, 100% cotton, short sleeves",
        "material": "cotton",
        "use": "apparel",
        "composition": "100% cotton",
        "origin": "VN",
        "notes": "",
        "external_ref": "ERP-100045",
        "current_code": "6109.10.00.12"
      },
      {
        "sku": "EXAMPLE-TWL-014",
        "market": "US",
        "description": "Cotton terry bath towel, 70 x 140 cm",
        "origin": "IN",
        "external_ref": "ERP-100046"
      }
    ],
    "check_codes": true,
    "classify_missing": false
  }),
});
console.log(await response.json());
Response 200
{
  "upserted": 2,
  "classification_queued": 0,
  "examples_skipped": 0,
  "items": [
    {
      "id": 1,
      "sku": "EXAMPLE-TSH-001",
      "market": "US",
      "code_status": "valid"
    },
    {
      "id": 2,
      "sku": "EXAMPLE-TWL-014",
      "market": "US",
      "code_status": "unknown"
    }
  ]
}

List SKUs

GET /api/skus

Query parameters

Name Type Required Description
q string or null No Up to 200 characters
market string or null No -
code_status string or null No -
has_code boolean or null No True: only SKUs with an existing code; false: only without
has_alert boolean or null No True: only SKUs with an open alert; false: only without
page integer No Minimum 1, default 1
page_size integer No Minimum 1, maximum 500, default 50

Returns 200 with a JSON object, as in the example.

Errors: 401 No valid API key was sent; 403 The role of the key, or the plan of the account, does not allow this call; 422 The request is not valid; 500 An unexpected failure.

Try it in the explorer

GET /api/skus
curl "https://htspilot.com/api/skus?page=1&page_size=50" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME"
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://htspilot.com/api/skus?page=1&page_size=50",
    headers={"X-API-Key": os.environ["HTS_PILOT_API_KEY"]},
    method="GET",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))
const response = await fetch("https://htspilot.com/api/skus?page=1&page_size=50", {
  headers: { "X-API-Key": process.env.HTS_PILOT_API_KEY },
});
console.log(await response.json());
Response 200
{
  "items": [
    {
      "id": 1,
      "sku": "EXAMPLE-TSH-001",
      "market": "US",
      "description": "Men's T-shirt, knitted, 100% cotton, short sleeves",
      "material": "cotton",
      "use": "apparel",
      "composition": "100% cotton",
      "origin": "VN",
      "origin_label": "Vietnam (VN)",
      "notes": "",
      "external_ref": "ERP-100045",
      "current_code": "6109.10.00.12",
      "code_status": "valid",
      "code_status_label": "Valid",
      "code_status_detail": "Valid declarable code",
      "checked_version": "2026-SAMPLE",
      "checked_at": "2026-10-03T16:07:52.338295",
      "suggested_code": null,
      "last_lookup_id": null,
      "created_at": "2026-10-03T16:07:52.330808",
      "updated_at": "2026-10-03T16:07:52.338295",
      "open_alerts": 0
    },
    {
      "id": 2,
      "sku": "EXAMPLE-TWL-014",
      "market": "US",
      "description": "Cotton terry bath towel, 70 x 140 cm",
      "material": "",
      "use": "",
      "composition": "",
      "origin": "IN",
      "origin_label": "India (IN)",
      "notes": "",
      "external_ref": "ERP-100046",
      "current_code": null,
      "code_status": "unknown",
      "code_status_label": "No code",
      "code_status_detail": "",
      "checked_version": "",
      "checked_at": null,
      "suggested_code": null,
      "last_lookup_id": null,
      "created_at": "2026-10-03T16:07:52.338295",
      "updated_at": "2026-10-03T16:07:52.338295",
      "open_alerts": 0
    }
  ],
  "total": 2,
  "page": 1,
  "page_size": 50,
  "counts": {
    "unknown": 1,
    "valid": 1
  }
}

Get a SKU

GET /api/skus/{sku_id}

Path parameters

Name Type Description
sku_id integer -

Returns 200 with a JSON object, as in the example.

Errors: 401 No valid API key was sent; 403 The role of the key, or the plan of the account, does not allow this call; 422 The request is not valid; 500 An unexpected failure.

Try it in the explorer

GET /api/skus/{sku_id}
curl "https://htspilot.com/api/skus/1" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME"
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://htspilot.com/api/skus/1",
    headers={"X-API-Key": os.environ["HTS_PILOT_API_KEY"]},
    method="GET",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))
const response = await fetch("https://htspilot.com/api/skus/1", {
  headers: { "X-API-Key": process.env.HTS_PILOT_API_KEY },
});
console.log(await response.json());
Response 200
{
  "id": 1,
  "sku": "EXAMPLE-TSH-001",
  "market": "US",
  "description": "Men's T-shirt, knitted, 100% cotton, short sleeves",
  "material": "cotton",
  "use": "apparel",
  "composition": "100% cotton",
  "origin": "VN",
  "origin_label": "Vietnam (VN)",
  "notes": "",
  "external_ref": "ERP-100045",
  "current_code": "6109.10.00.12",
  "code_status": "valid",
  "code_status_label": "Valid",
  "code_status_detail": "Valid declarable code",
  "checked_version": "2026-SAMPLE",
  "checked_at": "2026-10-03T16:07:52.338295",
  "suggested_code": null,
  "last_lookup_id": null,
  "created_at": "2026-10-03T16:07:52.330808",
  "updated_at": "2026-10-03T16:07:52.338295",
  "alerts": []
}

Replace a SKU

PUT /api/skus/{sku_id}

Changes data in your account when executed. sku and market identify the SKU and are not changed.

Path parameters

Name Type Description
sku_id integer -

Request body (application/json)

Name Type Required Description
sku string Yes Up to 128 characters
market string No Up to 8 characters, default "US"
description string Yes Up to 2000 characters
material string No Up to 500 characters
use string No Up to 500 characters
composition string No Up to 500 characters
origin string No Up to 100 characters
notes string No Up to 1000 characters
external_ref string No Up to 255 characters
current_code string or null No Up to 24 characters

Returns 200 with a JSON object, as in the example.

Errors: 401 No valid API key was sent; 403 The role of the key, or the plan of the account, does not allow this call; 422 The request is not valid; 500 An unexpected failure.

Try it in the explorer

PUT /api/skus/{sku_id}
curl -X PUT "https://htspilot.com/api/skus/1" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME" \
  -H "Content-Type: application/json" \
  -d '{
  "sku": "EXAMPLE-TSH-001",
  "market": "US",
  "description": "Men'\''s T-shirt, knitted, 100% cotton, short sleeves",
  "material": "cotton",
  "use": "apparel",
  "composition": "100% cotton",
  "origin": "VN",
  "notes": "",
  "external_ref": "ERP-100045",
  "current_code": "6109.10.00.12"
}'
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://htspilot.com/api/skus/1",
    data=json.dumps({
        "sku": "EXAMPLE-TSH-001",
        "market": "US",
        "description": "Men's T-shirt, knitted, 100% cotton, short sleeves",
        "material": "cotton",
        "use": "apparel",
        "composition": "100% cotton",
        "origin": "VN",
        "notes": "",
        "external_ref": "ERP-100045",
        "current_code": "6109.10.00.12",
    }).encode(),
    headers={"X-API-Key": os.environ["HTS_PILOT_API_KEY"], "Content-Type": "application/json"},
    method="PUT",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))
const response = await fetch("https://htspilot.com/api/skus/1", {
  method: "PUT",
  headers: { "X-API-Key": process.env.HTS_PILOT_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "sku": "EXAMPLE-TSH-001",
    "market": "US",
    "description": "Men's T-shirt, knitted, 100% cotton, short sleeves",
    "material": "cotton",
    "use": "apparel",
    "composition": "100% cotton",
    "origin": "VN",
    "notes": "",
    "external_ref": "ERP-100045",
    "current_code": "6109.10.00.12"
  }),
});
console.log(await response.json());
Response 200
{
  "id": 1,
  "sku": "EXAMPLE-TSH-001",
  "market": "US",
  "description": "Men's T-shirt, knitted, 100% cotton, short sleeves",
  "material": "cotton",
  "use": "apparel",
  "composition": "100% cotton",
  "origin": "VN",
  "origin_label": "Vietnam (VN)",
  "notes": "",
  "external_ref": "ERP-100045",
  "current_code": "6109.10.00.12",
  "code_status": "valid",
  "code_status_label": "Valid",
  "code_status_detail": "Valid declarable code",
  "checked_version": "2026-SAMPLE",
  "checked_at": "2026-10-03T16:07:52.354454+00:00",
  "suggested_code": null,
  "last_lookup_id": null,
  "created_at": "2026-10-03T16:07:52.330808",
  "updated_at": "2026-10-03T16:07:52.338295"
}

Delete a SKU

DELETE /api/skus/{sku_id}

Deletes for real when executed, and cannot be undone. Needs the reviewer or the admin role.

Path parameters

Name Type Description
sku_id integer -

Returns 200 with a JSON object, as in the example.

Errors: 401 No valid API key was sent; 403 The role of the key, or the plan of the account, does not allow this call; 422 The request is not valid; 500 An unexpected failure.

Try it in the explorer

DELETE /api/skus/{sku_id}
curl -X DELETE "https://htspilot.com/api/skus/1" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME"
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://htspilot.com/api/skus/1",
    headers={"X-API-Key": os.environ["HTS_PILOT_API_KEY"]},
    method="DELETE",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))
const response = await fetch("https://htspilot.com/api/skus/1", {
  method: "DELETE",
  headers: { "X-API-Key": process.env.HTS_PILOT_API_KEY },
});
console.log(await response.json());
Response 200
{
  "ok": true
}

Classify a SKU

POST /api/skus/{sku_id}/classify

Changes data in your account when executed. Runs a lookup for the SKU and stores the result as its suggested code. Spends credits.

Path parameters

Name Type Description
sku_id integer -

Returns 200 with a JSON object, as in the example.

Errors: 401 No valid API key was sent; 403 The role of the key, or the plan of the account, does not allow this call; 422 The request is not valid; 500 An unexpected failure.

Try it in the explorer

Unlike POST /api/classify, this call waits for the result and answers with the outcome. The lookup has the kind sku and sends no lookup.completed event.

POST /api/skus/{sku_id}/classify
curl -X POST "https://htspilot.com/api/skus/1/classify" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME"
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://htspilot.com/api/skus/1/classify",
    headers={"X-API-Key": os.environ["HTS_PILOT_API_KEY"]},
    method="POST",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))
const response = await fetch("https://htspilot.com/api/skus/1/classify", {
  method: "POST",
  headers: { "X-API-Key": process.env.HTS_PILOT_API_KEY },
});
console.log(await response.json());
Response 200
{
  "lookup_id": "75da21139a044da0bc3bbe3acc4ad2f9",
  "status": "proposed",
  "recommended_code": "6109.10.00.14",
  "confidence": 0.75
}

POST /api/skus/check

Changes data in your account when executed. Checks every SKU that has a current_code, or only those of one market or the ones listed in sku_ids.

Request body (application/json)

Name Type Required Description
market string or null No -
sku_ids integer[] or null No -

Returns 200 with a JSON object, as in the example.

Errors: 401 No valid API key was sent; 403 The role of the key, or the plan of the account, does not allow this call; 422 The request is not valid; 500 An unexpected failure.

Try it in the explorer

POST /api/skus/check
curl -X POST "https://htspilot.com/api/skus/check" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME" \
  -H "Content-Type: application/json" \
  -d '{
  "market": "US"
}'
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://htspilot.com/api/skus/check",
    data=json.dumps({"market": "US"}).encode(),
    headers={"X-API-Key": os.environ["HTS_PILOT_API_KEY"], "Content-Type": "application/json"},
    method="POST",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))
const response = await fetch("https://htspilot.com/api/skus/check", {
  method: "POST",
  headers: { "X-API-Key": process.env.HTS_PILOT_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "market": "US"
  }),
});
console.log(await response.json());
Response 200
{
  "checked": 1,
  "counts": {
    "valid": 1
  }
}

GET /api/skus/template

An .xlsx file with the import columns and their lists: the countries of origin and the markets that are loaded.

Returns 200 with a file (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet).

Errors: 401 No valid API key was sent; 403 The role of the key, or the plan of the account, does not allow this call; 422 The request is not valid; 500 An unexpected failure.

Try it in the explorer

GET /api/skus/template
curl "https://htspilot.com/api/skus/template" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME" \
  -o "sku_catalog_template.xlsx"
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://htspilot.com/api/skus/template",
    headers={"X-API-Key": os.environ["HTS_PILOT_API_KEY"]},
    method="GET",
)
with urllib.request.urlopen(request) as response, open("sku_catalog_template.xlsx", "wb") as out:
    out.write(response.read())
import { writeFile } from "node:fs/promises";

const response = await fetch("https://htspilot.com/api/skus/template", {
  headers: { "X-API-Key": process.env.HTS_PILOT_API_KEY },
});
await writeFile("sku_catalog_template.xlsx", Buffer.from(await response.arrayBuffer()));
Response 200
{
  "file": true,
  "content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
  "content_disposition": "attachment; filename=\"sku_catalog_template.xlsx\"",
  "bytes": 11660
}

List alerts

GET /api/alerts

Query parameters

Name Type Required Description
open_only boolean No Default true
sku_id integer or null No -
limit integer No Minimum 1, maximum 1000, default 200

Returns 200 with a JSON object, as in the example.

Errors: 401 No valid API key was sent; 403 The role of the key, or the plan of the account, does not allow this call; 422 The request is not valid; 500 An unexpected failure.

Try it in the explorer

GET /api/alerts
curl "https://htspilot.com/api/alerts" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME"
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://htspilot.com/api/alerts",
    headers={"X-API-Key": os.environ["HTS_PILOT_API_KEY"]},
    method="GET",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))
const response = await fetch("https://htspilot.com/api/alerts", {
  headers: { "X-API-Key": process.env.HTS_PILOT_API_KEY },
});
console.log(await response.json());
Response 200
[]

POST /api/alerts/{alert_id}/ack

Changes data in your account when executed. Needs the reviewer or the admin role.

Path parameters

Name Type Description
alert_id integer -

Returns 200 with a JSON object, as in the example.

Errors: 401 No valid API key was sent; 403 The role of the key, or the plan of the account, does not allow this call; 422 The request is not valid; 500 An unexpected failure.

Try it in the explorer

POST /api/alerts/{alert_id}/ack
curl -X POST "https://htspilot.com/api/alerts/1/ack" \
  -H "X-API-Key: hts_EXAMPLE_KEY_REPLACE_ME"
import json
import os
import urllib.request

request = urllib.request.Request(
    "https://htspilot.com/api/alerts/1/ack",
    headers={"X-API-Key": os.environ["HTS_PILOT_API_KEY"]},
    method="POST",
)
with urllib.request.urlopen(request) as response:
    print(json.load(response))
const response = await fetch("https://htspilot.com/api/alerts/1/ack", {
  method: "POST",
  headers: { "X-API-Key": process.env.HTS_PILOT_API_KEY },
});
console.log(await response.json());

No example answer was captured for this operation.