> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serval.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Skill

> Create a help desk skill for a team. The skill is saved as an unpublished draft unless is_published is true.

## Authentication and permissions

> **Token requirements:** **User-based token (OAuth)** or **Organization-scoped API key** or **Team-scoped API key**.
>
> Send a bearer access token for one of these identities. The permissions and resource restrictions below also apply.

| Credential | Access requirements |
| - | - |
| Organization-scoped API key | `skills:write` |
| Team-scoped API key | `skills:write` |
| User-based token (OAuth) | Supported, subject to permissions |

Permissions joined by **+** are all required; **or** separates alternatives. Full-access keys still cannot call endpoints marked unsupported. Team keys must allow every team checked by the request. OAuth access depends on the user’s roles and resource access.


## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml post /v2/skills
openapi: 3.1.0
info:
  title: Serval Public API
  description: Serval Public API
  contact:
    name: Serval
    url: https://serval.com
    email: support@serval.com
  license:
    name: Serval License
    url: https://serval.com/license
  version: 2.0.0
servers:
  - url: https://public.api.serval.com
security:
  - BearerAuth: []
tags:
  - name: Access Membership API
  - name: Access Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent API
  - name: Alerts API
  - name: Analytics API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Procedure API
  - name: Approval Request API
  - name: Assignment Rules API
  - name: Audit Log API
  - name: Billing API
  - name: Browser API
  - name: Campaign API
  - name: Change Blackout API
  - name: Change Model API
  - name: Connected Channels API
  - name: Custom Field API
  - name: Custom Role API
  - name: Custom Service API
  - name: Dashboards API
  - name: Email Intake API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Type API
  - name: Folder API
  - name: Forms API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Improvement Request API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: One-Time Window API
  - name: Package API
  - name: Project API
  - name: Report API
  - name: Review API
  - name: Role Sync API
  - name: Roles API
  - name: SLA API
  - name: Schedule API
  - name: Skills API
  - name: Tag API
  - name: Team API
  - name: Team Group API
  - name: Team SDLC Settings API
  - name: Team User API
  - name: Ticket API
  - name: Ticket Import API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Widgets API
  - name: Worker API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
paths:
  /v2/skills:
    post:
      tags:
        - Skills API
      summary: Create Skill
      description: >-
        Create a help desk skill for a team. The skill is saved as an
        unpublished draft unless is_published is true.
      operationId: svrelay.publicv2.PublicAPIServiceV2.CreateSkill
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/svflow.publicapi.CreateSkillRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/svflow.publicapi.CreateSkillResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    svflow.publicapi.CreateSkillRequest:
      type: object
      properties:
        teamId:
          type: string
          title: team_id
          description: The ID of the team.
          x-stainless-terraform-configurability: required
        name:
          type: string
          title: name
          description: >-
            Short title identifying this skill (e.g. "Route password reset
            tickets
             to IT"). Shown in the skills list and in chips when the skill is
             referenced. Keep it descriptive but concise.
          x-stainless-terraform-configurability: required
        description:
          type: string
          title: description
          description: |-
            TRIGGER condition — when should the help desk agent invoke this
             skill? Plain prose answering "When should Serval use this skill?".
             Example: "When a ticket is about an SSO login failure or a user
             cannot access their Okta account."
          x-stainless-terraform-configurability: required
        content:
          type: string
          title: content
          description: |-
            BEHAVIOR instructions — how should the help desk agent handle the
             situation when this skill fires? Plain prose answering "How should
             Serval handle this situation?". Include the concrete steps,
             workflows to run (use `<@workflow:ID>` mentions), who to escalate
             to (use `<@user:ID>` mentions), and any relevant context.
          x-stainless-terraform-configurability: required
        shouldAlwaysUse:
          type:
            - boolean
            - 'null'
          title: should_always_use
          description: |-
            Whether the help desk agent always uses this skill instead of
             selecting it by its description. Defaults to false.
          x-stainless-terraform-configurability: computed_optional
        isPublished:
          type:
            - boolean
            - 'null'
          title: is_published
          description: |-
            Whether to publish the skill after creating it. Defaults to false,
             which saves an unpublished draft.
          x-stainless-terraform-configurability: computed_optional
        channelFilter:
          $ref: >-
            #/components/schemas/serval.resources.v1.agentchannels.AgentChannelFilter
          title: channel_filter
          description: |-
            The channels where the help desk agent can use the skill. Omitted or
             empty selects every channel, including channels added later.
          x-stainless-terraform-configurability: optional
      title: CreateSkillRequest
      required:
        - teamId
        - name
        - description
        - content
      additionalProperties: false
    svflow.publicapi.CreateSkillResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/svflow.pubapimodels.Skill'
          title: data
          description: The created skill.
          x-stainless-terraform-configurability: optional
      title: CreateSkillResponse
      additionalProperties: false
    serval.resources.v1.agentchannels.AgentChannelFilter:
      type: object
      properties:
        channels:
          type: array
          items:
            $ref: >-
              #/components/schemas/serval.resources.v1.agentchannels.AgentChannel
          title: channels
          x-stainless-terraform-configurability: optional
      title: AgentChannelFilter
      additionalProperties: false
      description: |-
        Empty channels means unrestricted, including future channels.
         Otherwise, any selected channel may match.
    svflow.pubapimodels.Skill:
      type: object
      properties:
        id:
          type: string
          title: id
          description: The ID of the skill.
          readOnly: true
          x-stainless-terraform-configurability: computed
        teamId:
          type: string
          title: team_id
          description: The ID of the team that the skill belongs to.
          x-stainless-terraform-configurability: optional
        name:
          type: string
          title: name
          description: The name of the skill.
          x-stainless-terraform-configurability: optional
        description:
          type: string
          title: description
          description: When the help desk agent should use the skill.
          x-stainless-terraform-configurability: optional
        content:
          type: string
          title: content
          description: >-
            How the help desk agent should handle a ticket when it uses the
            skill.
          x-stainless-terraform-configurability: optional
        shouldAlwaysUse:
          type: boolean
          title: should_always_use
          description: >-
            Whether the help desk agent always uses this skill instead of
            selecting
             it by its description.
          x-stainless-terraform-configurability: computed_optional
        isPublished:
          type: boolean
          title: is_published
          description: Whether the skill has ever been published.
          readOnly: true
          x-stainless-terraform-configurability: computed
        hasUnpublishedChanges:
          type: boolean
          title: has_unpublished_changes
          description: Whether the skill has saved changes that are not yet published.
          readOnly: true
          x-stainless-terraform-configurability: computed
        scopedId:
          type: string
          title: scoped_id
          description: |-
            The copy-invariant scoped ID of the skill (e.g. "skill_..."), stable
             across cross-team copies.
          readOnly: true
          x-stainless-terraform-configurability: computed
        folderId:
          type:
            - string
            - 'null'
          title: folder_id
          description: |-
            The ID of the folder the skill lives in, if any. Populated on the
             single-skill responses (Get/Create/Update); omitted from ListSkills
             responses — fetch the skill to read its folder membership.
          readOnly: true
          x-stainless-terraform-configurability: computed
        channelFilter:
          $ref: >-
            #/components/schemas/serval.resources.v1.agentchannels.AgentChannelFilter
          title: channel_filter
          description: >-
            The channels where the help desk agent can use the skill. Empty
            means
             every channel, including channels added later.
          x-stainless-terraform-configurability: optional
      title: Skill
      additionalProperties: false
      description: >-
        A help desk skill: instructions the help desk agent follows when a
        ticket
         matches the skill's description.
    serval.resources.v1.agentchannels.AgentChannel:
      type: string
      title: AgentChannel
      enum:
        - AGENT_CHANNEL_UNSPECIFIED
        - AGENT_CHANNEL_CHAT
        - AGENT_CHANNEL_VOICE
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.