---
source: CrewKit documentation
url: https://crewkit.io/docs/api-resources.md
title: "Resources API"
description: "Manage agents, skills, rules, and commands via the API."
---


The Resources API provides a unified interface for managing all resource types (agents, skills, rules, commands) across the three-tier inheritance model.

---

## Effective content (bulk sync)

```
GET /api/v1/resources/effective
```

Returns the effective (merged) content for all resources. This is the primary endpoint used by the CLI during sync.

**Query parameters:**

| Parameter | Description |
|-----------|-------------|
| `organization_id` | Organization scope |
| `project_id` | Project scope (optional) |
| `resource_type` | Filter by type: agent, skill, rule, command |

---

## Single effective content

```
GET /api/v1/resources/:id/effective
```

Returns the merged content for a single resource.

---

## Tiered view

```
GET /api/v1/resources/:id/tiered
```

Returns the resource content at each tier separately (platform, organization, project), showing how they compose.

---

## Fork a resource

```
POST /api/v1/resources/:id/fork
```

Creates a snapshot copy of a resource at a lower tier. The forked resource is independent from the original.

---

## Publish

```
POST /api/v1/resources/:id/publish
```

Publish a resource to make it available to downstream tiers.

---

## Versions

### List versions

```
GET /api/v1/resources/:id/versions
```

Returns all versions of a resource, ordered by version number.

### Show version

```
GET /api/v1/resources/:id/versions/:hash
```

Returns a specific version by its content hash.

### Rollback

```
POST /api/v1/resources/:id/versions/rollback
Content-Type: application/json

{
  "version_hash": "abc123..."
}
```

Roll back to a previous version.

### Check for upgrades

```
GET /api/v1/resources/:id/versions/upgrade_available
```

Check if a newer version is available from a parent tier.

### Upgrade

```
POST /api/v1/resources/:id/versions/upgrade
```

Upgrade to the latest parent tier version.

---

## Diff

```
GET /api/v1/resources/:id/diff/:from_hash/:to_hash
```

Compare two versions of a resource.

---

## Stats

```
GET /api/v1/resources/:id/stats
```

Resource performance statistics (session count, tokens, cost, quality scores).

### Compare versions

```
GET /api/v1/resources/:id/stats/compare
```

Statistical comparison between two resource versions (p-value, significance, recommendation).

---

## Import

```
POST /:org_id/resources/import
Content-Type: application/json

{
  "resources": [
    {
      "name": "rails-expert",
      "resource_type": "agent",
      "content": "..."
    }
  ]
}
```

Import local resources to the organization or project level.

---

## Next steps

- [API overview](/docs/api-overview)
- [Organizations API](/docs/api-organizations)
