Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview

Import a Catalog Skill

Imports a Catalog Skill into your organization. The import makes a Skill from the name, the description and the body of the Catalog Skill, and sets source. Your organization owns the Skill, and can edit it like any other Skill. Send {} to keep the slug of the Catalog Skill. Your organization holds at most one import of each Catalog Skill: a second import answers 409 with error=already_imported. If a Skill of your organization holds the slug, the answer is 409 with error=slug_conflict: send another slug.

POST/context/skill-catalog/{catalogSlug}/import
Authorization
AuthorizationBearer token · headerrequired

Send Authorization: Bearer <credential>.

Use an API key (acr_…), from the AdCrunch console under Settings → API keys.

The credential names the organization, and no operation takes an organization parameter.

See https://docs.adcrunch.dev/api/authentication.

Path parameters
catalogSlugstringrequired
Request body
requiredapplication/json
slugstring

Optional slug for the new Skill, normalized to kebab-case. It defaults to the slug of the Catalog Skill. Send one when a Skill of your organization holds that slug.

max length 120
Responses
201

The Skill as the import made it, at revision 1, with its source.

bodystringrequired

The agent instructions themselves — the SKILL.md-equivalent, in markdown.

createdAtnumberrequired

Milliseconds since the Unix epoch, UTC.

createdBystringrequired
descriptionstringrequired
idstringrequired
namestringrequired
revisionnumberrequired

Increments on every write. Send it back as base_revision to edit; a stale one answers 409.

slugstringrequired
sourceobject | nullrequired

The Catalog Skill and the version that this Skill was imported from. It is null for a Skill that your organization wrote. An edit keeps it.

Show properties
slugstringrequired

The slug of the Catalog Skill that the Skill was imported from.

versionstringrequired

The version of the Catalog Skill that the Skill was last imported from, YYYY-MM-DD.

updatedAtnumber | nullrequired

Milliseconds since the Unix epoch, UTC.

400

The request does not match the schema of this operation: a field is missing or has the wrong type, or the body is not valid JSON. error is invalid_request, and issues names each field. Nothing was changed.

issuesobject[]required

One entry for each field that does not match.

Show properties
Array of object
instringrequired

The part of the request that holds the field.

Allowed:bodycookieheadersparamsquery
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

pathstringrequired

A JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:invalid_request
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

401

No API key, or one that does not resolve. See the security scheme. error is unauthorized.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:unauthorized
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

403

The caller does not hold skill:write. error is forbidden.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:forbidden
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

404

No Catalog Skill with that slug. error is not_found.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

409

Two different conflicts share this status, and error tells them apart. already_imported means that your organization holds an import of this Catalog Skill: slug names that Skill. slug_conflict means that another Skill holds the slug: send another slug.

Any of:
object
slugstringrequired

The slug of the Skill that holds the live import.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:already_imported
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

object
slugstringrequired

The slug that is already taken.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:slug_conflict
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

422

The slug contains no letter or digit. error is invalid_slug.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

Request
curl -X POST 'https://api.pr-901.adcrunch.dev/context/skill-catalog/string/import' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "slug": "monday-review"
}'
Response
{
  "body": "## When to run\n\nEvery Monday, before the week starts.\n\n## Steps\n\n1. Call `list_campaigns` for each advertiser.\n2. Call `query_insights` for the last seven days.\n3. Write down the campaigns that missed their target.",
  "createdAt": 1790000000000,
  "createdBy": "usr_4d8b12",
  "description": "Use it every Monday to review the spend and the results of last week.",
  "id": "skl_7c1f90",
  "name": "Weekly performance review",
  "revision": 1,
  "slug": "weekly-performance-review",
  "source": {
    "slug": "weekly-performance-review",
    "version": "2026-10-09"
  },
  "updatedAt": null
}