API reference

Skills

Reusable instructions attached to a turn.

List skills

GETapi.niucore.com/api/v1/skills

Scope: skills:read

Skills visible to the credential: its own, the company's, and those shared with the user.

Query

pageintegerdefaults to 1

Page number, starting at 1.

sizeintegerdefaults to 50

Items per page. Maximum 200.

curl -sS -X GET 'https://api.niucore.com/api/v1/skills' \
  -H "Authorization: Bearer $NIUCORE_ACCESS_TOKEN"
Response
{
  "status": "success",
  "message": "Operación exitosa",
  "message_code": "api_v1_ok",
  "data": [
    {
      "id": 147,
      "name": "Redactar respuesta a cliente",
      "description": "Tono formal, máximo tres párrafos.",
      "instructions": "Respondé al cliente con tono formal…",
      "icon": "mail",
      "level": "company",
      "visibility": "public",
      "workspace_id": null,
      "is_active": true,
      "created_at": "2026-07-02T11:14:29Z"
    }
  ],
  "meta": {
    "request_id": "9f1c0a3e-7b2d-4f18-9a55-2c6e0d1b4a77",
    "page": 1,
    "size": 50,
    "total": 1
  }
}

Create a skill

POSTapi.niucore.com/api/v1/skills

Scope: skills:write

Creates a skill. Returns 201.

Request body

namestringrequired

Up to 255 characters.

instructionsstringrequired

The instructions the model receives when the skill is attached. Up to 12,000 characters. It can cite libraries, files, connectors, tools and other skills with {{type:id}}: see Resource references.

descriptionstring

Up to 500 characters.

iconstring

Icon.

levelstringdefaults to personal

Scope of the skill.

personalcompanyworkspace

visibilitystringdefaults to public

Who can see it.

publicprivateshared

workspace_idinteger

Owning library, with level: "workspace". It must be within scope.

shared_user_idsinteger[]

Users granted access, with visibility: "shared". They must belong to the same company; the ids come from `GET /users`.

Errors

  • 403api_v1_resource_policy_create_deniedThe credential is limited to specific resources (allowlist) and cannot create new ones of this type.
  • 422prompt_refs_invalidinstructions cites resources that do not exist, that the user cannot use, or that this type does not accept. data[0] groups them by category and nothing is saved. See Resource references.
  • 422prompt_text_too_longinstructions exceeds 12 000 characters.
  • 403api_v1_resource_not_allowedThe workspace_id or one of shared_user_ids is outside the scope.
curl -sS -X POST 'https://api.niucore.com/api/v1/skills' \
  -H "Authorization: Bearer $NIUCORE_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Redactar respuesta a cliente",
    "instructions": "Respondé al cliente con tono formal, en un máximo de tres párrafos.",
    "description": "Tono formal, máximo tres párrafos.",
    "level": "company",
    "visibility": "public"
  }'
Response
{
  "status": "success",
  "message": "Operación exitosa",
  "message_code": "api_v1_ok",
  "data": {
    "id": 147,
    "name": "Redactar respuesta a cliente",
    "description": "Tono formal, máximo tres párrafos.",
    "instructions": "Respondé al cliente con tono formal…",
    "icon": "mail",
    "level": "company",
    "visibility": "public",
    "workspace_id": null,
    "is_active": true,
    "created_at": "2026-07-02T11:14:29Z"
  },
  "meta": {
    "request_id": "9f1c0a3e-7b2d-4f18-9a55-2c6e0d1b4a77"
  }
}

Retrieve a skill

GETapi.niucore.com/api/v1/skills/{skill_id}

Scope: skills:read

Detail of one skill.

Path

skill_idintegerrequired

Identifier.

Errors

  • 404api_v1_not_foundIt does not exist, or it is outside the credential's scope. Both cases answer the same: a 403 would confirm the resource exists.
curl -sS -X GET 'https://api.niucore.com/api/v1/skills/147' \
  -H "Authorization: Bearer $NIUCORE_ACCESS_TOKEN"
Response
{
  "status": "success",
  "message": "Operación exitosa",
  "message_code": "api_v1_ok",
  "data": {
    "id": 147,
    "name": "Redactar respuesta a cliente",
    "description": "Tono formal, máximo tres párrafos.",
    "instructions": "Respondé al cliente con tono formal…",
    "icon": "mail",
    "level": "company",
    "visibility": "public",
    "workspace_id": null,
    "is_active": true,
    "created_at": "2026-07-02T11:14:29Z"
  },
  "meta": {
    "request_id": "9f1c0a3e-7b2d-4f18-9a55-2c6e0d1b4a77"
  }
}

Update a skill

PATCHapi.niucore.com/api/v1/skills/{skill_id}

Scope: skills:write

Updates the fields sent. level is not editable: a skill does not change scope.

Path

skill_idintegerrequired

Identifier.

Request body

namestring

New name.

instructionsstring

New instructions. If they change, all their {{type:id}} references are revalidated.

descriptionstring

Description.

iconstring

Icon.

visibilitystring

New visibility.

publicprivateshared

workspace_idinteger

Owning library.

shared_user_idsinteger[]

Replaces the shared list. The ids come from `GET /users`.

Errors

  • 404api_v1_not_foundIt does not exist, or it is outside the credential's scope. Both cases answer the same: a 403 would confirm the resource exists.
  • 422prompt_refs_invalidinstructions cites resources that do not exist, that the user cannot use, or that this type does not accept. data[0] groups them by category and nothing is saved. See Resource references.
  • 422prompt_text_too_longinstructions exceeds 12 000 characters.
curl -sS -X PATCH 'https://api.niucore.com/api/v1/skills/147' \
  -H "Authorization: Bearer $NIUCORE_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Tono formal, máximo dos párrafos."
  }'
Response
{
  "status": "success",
  "message": "Operación exitosa",
  "message_code": "api_v1_ok",
  "data": {
    "id": 147,
    "name": "Redactar respuesta a cliente",
    "description": "Tono formal, máximo dos párrafos.",
    "instructions": "Respondé al cliente con tono formal…",
    "icon": "mail",
    "level": "company",
    "visibility": "public",
    "workspace_id": null,
    "is_active": true,
    "created_at": "2026-07-02T11:14:29Z"
  },
  "meta": {
    "request_id": "9f1c0a3e-7b2d-4f18-9a55-2c6e0d1b4a77"
  }
}

Enable or disable

PATCHapi.niucore.com/api/v1/skills/{skill_id}/toggle

Scope: skills:write

Flips the active state. It takes no body: the new value is always the opposite of the current one.

Path

skill_idintegerrequired

Identifier.

Errors

  • 404api_v1_not_foundIt does not exist, or it is outside the credential's scope. Both cases answer the same: a 403 would confirm the resource exists.
curl -sS -X PATCH 'https://api.niucore.com/api/v1/skills/147/toggle' \
  -H "Authorization: Bearer $NIUCORE_ACCESS_TOKEN"
Response
{
  "status": "success",
  "message": "Operación exitosa",
  "message_code": "api_v1_ok",
  "data": {
    "id": 147,
    "name": "Redactar respuesta a cliente",
    "description": "Tono formal, máximo tres párrafos.",
    "instructions": "Respondé al cliente con tono formal…",
    "icon": "mail",
    "level": "company",
    "visibility": "public",
    "workspace_id": null,
    "is_active": false,
    "created_at": "2026-07-02T11:14:29Z"
  },
  "meta": {
    "request_id": "9f1c0a3e-7b2d-4f18-9a55-2c6e0d1b4a77"
  }
}

Delete a skill

DELETEapi.niucore.com/api/v1/skills/{skill_id}

Scope: skills:write

Soft delete.

Path

skill_idintegerrequired

Identifier.

Errors

  • 404api_v1_not_foundIt does not exist, or it is outside the credential's scope. Both cases answer the same: a 403 would confirm the resource exists.
curl -sS -X DELETE 'https://api.niucore.com/api/v1/skills/147' \
  -H "Authorization: Bearer $NIUCORE_ACCESS_TOKEN"
Response
{
  "status": "success",
  "message": "Operación exitosa",
  "message_code": "api_v1_ok",
  "data": {
    "id": 147
  },
  "meta": {
    "request_id": "9f1c0a3e-7b2d-4f18-9a55-2c6e0d1b4a77"
  }
}