# Crowdsec service API

> Crowdsec service API is an open-source agent skill for security. Guides an agent through the CrowdSec Console cloud API for blocklists and integrations. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/crowdsecurity/crowdsec-skill/tree/main/plugin/skills/crowdsec-service-api
- **Repository:** https://github.com/crowdsecurity/crowdsec-skill
- **GitHub stars:** 32
- **License:** MIT
- **Skill name:** crowdsec-service-api
- **Collection:** https://github.com/crowdsecurity/crowdsec-skill
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-04

## About

This skill lets an agent manage cloud-side CrowdSec objects through the premium Service API: private blocklists and their IPs, allowlists, org-level decisions, firewall appliance integrations and remediation metrics. It sends requests to the Console REST endpoint using the user's API key, and a per-area reference file covers each object type.

The workflow is built around safety. The agent first validates the key with a read call that reveals which organization would be changed, then runs reads directly while holding every state-changing request until the user has seen the exact URL and body and approved it. Destructive operations such as bulk overwrites, deletions, fleet-wide unblocking and org-wide bans are flagged with their consequences spelled out before confirmation. The skill also notes that cloud lists only take effect once an engine is enrolled and subscribed, and that enrolment and local engine work belong to the separate crowdsec skill.

The skill expects a CrowdSec Console API key, supplied through an environment variable or a locked-down file in the user's config folder, and the curl command line for its examples.

## When your agent uses it

> Use when the user wants to drive the CrowdSec Console **Service API (SAPI)** — the premium cloud REST API at admin.api.crowdsec.net — to programmatically manage blocklists (add/remove/bulk IPs, share, subscribe engines), allowlists, firewall/appliance integrations (Palo Alto, Fortinet, Cisco, F5, Sophos, pfSense/OPNsense…), remediation ROI metrics, and org-level decisions. Acts on the user's behalf with their API key. This is the cloud/API skill — for the local engine, cscli, and bouncers use the `crowdsec` skill.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/crowdsecurity/crowdsec-skill/tree/HEAD/plugin/skills/crowdsec-service-api)
- [License: MIT](https://github.com/crowdsecurity/crowdsec-skill/tree/HEAD/plugin/skills/crowdsec-service-api)

## Features

- **Blocklist management:** Covers creating private blocklists, adding or removing IPs and expiring entries through the API.
- **Allowlist control:** Explains how to manage cloud allowlists and subscribe engines or tags to them.
- **Firewall integrations:** Covers wiring vendor appliances such as Palo Alto, Fortinet and pfSense to a cloud integration and pulling feeds.
- **Org-level decisions:** Describes creating and looking up organization-wide decisions, including scope and target options.
- **Remediation metrics:** Shows how to query remediation statistics for a date range to report blocking results.
- **Safety confirmations:** Requires explicit approval before any state-changing call and warns about high-impact operations.

## Good for

- Add a list of suspicious IPs from a SIEM to a private CrowdSec blocklist
- Allow the office or CDN address range across all enrolled engines
- Connect a Fortinet firewall to a CrowdSec cloud integration
- Pull remediation metrics for last month to report blocked attacks
- Look up whether a specific IP has an active organization decision

## Install

### Claude Code

This skill ships in the `crowdsec` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add crowdsecurity/crowdsec-skill
/plugin install crowdsec@crowdsecurity
```

Or copy only this skill to `~/.claude/skills/crowdsec-service-api`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crowdsecurity/crowdsec-skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/crowdsec-service-api &&
cp -R "$tmp/plugin/skills/crowdsec-service-api" ~/.claude/skills/crowdsec-service-api &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/crowdsec-service-api` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/crowdsec-service-api` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crowdsecurity/crowdsec-skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/crowdsec-service-api &&
cp -R "$tmp/plugin/skills/crowdsec-service-api" ~/.agents/skills/crowdsec-service-api &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/crowdsec-service-api` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/crowdsec-service-api` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crowdsecurity/crowdsec-skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/crowdsec-service-api &&
cp -R "$tmp/plugin/skills/crowdsec-service-api" ~/.cursor/skills/crowdsec-service-api &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/crowdsec-service-api` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/crowdsecurity/crowdsec-skill.git --path plugin/skills/crowdsec-service-api
```

Or copy the folder to `~/.gemini/skills/crowdsec-service-api` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/crowdsec-service-api`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crowdsecurity/crowdsec-skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/crowdsec-service-api &&
cp -R "$tmp/plugin/skills/crowdsec-service-api" ~/.copilot/skills/crowdsec-service-api &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/crowdsec-service-api` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/crowdsecurity/crowdsec-skill.git
```

Then copy `crowdsec-skill/plugin/skills/crowdsec-service-api` into your agent's skills folder as `crowdsec-service-api`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Crowdsec service API need to run?

A CrowdSec Console Service API key, provided through the CROWDSEC_SAPI_KEY variable or a file at ~/.config/crowdsec/sapi_key, plus curl to call the API.

### Does Crowdsec service API change local CrowdSec engine settings?

No. It works with cloud objects through the admin API. Local engine, cscli and bouncer tasks are handled by the separate crowdsec skill.

### Will Crowdsec service API make changes without asking?

No. Read calls run directly, but any create, update or delete request is shown with its URL and body and waits for the user's approval.

### When does Crowdsec service API trigger?

When the user wants to drive the CrowdSec Console Service API to manage blocklists, allowlists, integrations, metrics or org decisions.

### How do I install Crowdsec service API in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/crowdsec-service-api to use it in all your projects, or to .claude/skills/crowdsec-service-api in one project. Or install the crowdsec plugin, which includes it: /plugin marketplace add crowdsecurity/crowdsec-skill, then /plugin install crowdsec@crowdsecurity.

### Does Crowdsec service API run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Crowdsec service API?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Crowdsec service API?

The closest alternatives to Crowdsec service API are Crowdsec, Mgmt console API, Crowdsec hub authoring, Cloud defense and Techstack security.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Crowdsec](https://ai-powered.com/skills/crowdsec): Crowdsec is an open-source agent skill for security.
- [Mgmt console API](https://ai-powered.com/skills/mgmt-console-api): Mgmt console API is an open-source agent skill for security.
- [Crowdsec hub authoring](https://ai-powered.com/skills/crowdsec-hub-authoring): Crowdsec hub authoring is an open-source agent skill for security.
- [Cloud defense](https://ai-powered.com/skills/cloud-defense): Cloud defense is an open-source agent skill for security.
- [Techstack security](https://ai-powered.com/skills/techstack-security): Techstack security is an open-source agent skill for security.
- [Security and hardening](https://ai-powered.com/skills/security-and-hardening): Security and hardening is an open-source agent skill for security.
- [Find exposed servers](https://ai-powered.com/skills/find-exposed-servers): Find exposed servers is an open-source agent skill for security.
- [Agent security hardening](https://ai-powered.com/skills/agent-security-hardening): Agent security hardening is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/crowdsec-service-api
