Skip to content
POST/api/v1/admin/threat-feed-sync

Trigger threat-feed sync

Synchronously syncs threat-intel feeds and returns the sync report. Auth via Bearer THREAT_FEED_SYNC_TOKEN. Optional body { sourceIds } restricts to a subset of sources. Authentication: the deployment's `THREAT_FEED_SYNC_TOKEN` shared secret as `Authorization: Bearer <token>` (the ThreatFeedSyncToken scheme), NOT an `eg_` API key. It is an operator/cron credential: no organization is resolved and no API-key scope is evaluated, so none is published.

Authentication

Deployment operator token. Send the deployment's THREAT_FEED_SYNC_TOKEN as Authorization: Bearer <token>.

This is a cron/operator credential, not a per-organization eg_ API key — an eg_ key is rejected, no organization is resolved and no API-key scope is evaluated. If the variable is unset the endpoint answers 500 to every caller rather than failing open.

Request body

Example

{
  "sourceIds": [
    "string"
  ]
}
Schema
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "sourceIds": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "maxItems": 100,
          "description": "Restrict the sync to these source ids; omit to sync all."
        }
      }
    }
  }
}

Response

200 example

{
  "success": true
}

All status codes

200Sync report.
400(no description)
401(no description)
500THREAT_FEED_SYNC_TOKEN not set.

Code samples

cURL

curl -X POST \
  https://evalguard.ai/api/v1/admin/threat-feed-sync \
  -H "Authorization: Bearer $EVALGUARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "sourceIds": [ "string" ] }'

TypeScript

// The TypeScript SDK (@evalguard/sdk) exposes TYPED methods — runEval,
// getEval, runSecurityScan, checkFirewall, … — not a generic request().
// For an arbitrary endpoint, call it directly:

const res = await fetch("https://evalguard.ai/api/v1/admin/threat-feed-sync", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.EVALGUARD_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "sourceIds": [
      "string"
    ]
  }),
});
console.log(res.status, await res.json());

Python

# The Python SDK (pip install evalguardai) exposes TYPED methods on
# EvalGuardClient — run_eval, get_eval, … — not a generic request().
# For an arbitrary endpoint, call it directly:

import os
import requests

headers = {"Authorization": f"Bearer {os.environ['EVALGUARD_API_KEY']}"}
headers["Content-Type"] = "application/json"

response = requests.request(
    "POST",
    "https://evalguard.ai/api/v1/admin/threat-feed-sync",
    headers=headers,
    json={
    "sourceIds": [
        "string"
    ]
},
)
print(response.status_code, response.json())

Go

package main

import (
	"context"
	"fmt"
	"net/http"
	"os"
	"strings"
)

func main() {
	body := strings.NewReader(`{"sourceIds":["string"]}`)
	req, _ := http.NewRequestWithContext(context.Background(), "POST", "https://evalguard.ai/api/v1/admin/threat-feed-sync", body)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	resp, err := http.DefaultClient.Do(req)
	if err != nil { panic(err) }
	defer resp.Body.Close()
	fmt.Println(resp.Status)
}

Errors

400401500

Other Admin endpoints