> ## 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 Guidance

> Create a new guidance for a team.



## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml post /v2/guidances
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 Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Request API
  - name: Audit Log API
  - name: Change Blackout API
  - name: Change Model API
  - name: Custom Field API
  - name: Custom Service API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Type API
  - name: Folder API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: Report API
  - name: SLA API
  - name: Schedule API
  - name: Tag API
  - name: Team API
  - name: Team User API
  - name: Ticket API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
paths:
  /v2/guidances:
    post:
      tags:
        - Guidance API
      summary: Create Guidance
      description: Create a new guidance for a team.
      operationId: svrelay.publicv2.PublicAPIServiceV2.CreateGuidance
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/svflow.publicapi.CreateGuidanceRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/svflow.publicapi.CreateGuidanceResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
      security:
        - BearerAuth: []
components:
  schemas:
    svflow.publicapi.CreateGuidanceRequest:
      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 Help Desk 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." Required for the skill to be
             matched against incoming tickets.
          x-stainless-terraform-configurability: optional
        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. Required
             for the skill to actually do anything useful.
          x-stainless-terraform-configurability: required
        shouldAlwaysUse:
          type: boolean
          title: should_always_use
          description: >-
            Whether this guidance should always be used (optional, defaults to
            false).
          nullable: true
          x-stainless-terraform-configurability: computed_optional
        isPublished:
          type: boolean
          title: is_published
          description: Whether to publish the guidance after creation (optional).
          nullable: true
          x-stainless-terraform-configurability: computed_optional
      title: CreateGuidanceRequest
      required:
        - teamId
        - name
        - content
      additionalProperties: false
    svflow.publicapi.CreateGuidanceResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/svflow.pubapimodels.Guidance'
          title: data
          description: The created guidance.
          x-stainless-terraform-configurability: optional
      title: CreateGuidanceResponse
      additionalProperties: false
    connect.error:
      type: object
      properties:
        code:
          type: string
          examples:
            - not_found
          enum:
            - canceled
            - unknown
            - invalid_argument
            - deadline_exceeded
            - not_found
            - already_exists
            - permission_denied
            - resource_exhausted
            - failed_precondition
            - aborted
            - out_of_range
            - unimplemented
            - internal
            - unavailable
            - data_loss
            - unauthenticated
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          x-stainless-terraform-configurability: optional
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
          x-stainless-terraform-configurability: optional
        detail:
          $ref: '#/components/schemas/google.protobuf.Any'
          x-stainless-terraform-configurability: optional
      title: Connect Error
      additionalProperties: true
      description: >-
        Error type returned by Connect:
        https://connectrpc.com/docs/go/errors/#http-representation
    svflow.pubapimodels.Guidance:
      type: object
      properties:
        id:
          type: string
          title: id
          description: The ID of the guidance.
          readOnly: true
          x-stainless-terraform-configurability: computed
        teamId:
          type: string
          title: team_id
          description: The ID of the team that the guidance belongs to.
          x-stainless-terraform-configurability: optional
        name:
          type: string
          title: name
          description: The name of the guidance.
          x-stainless-terraform-configurability: optional
        description:
          type: string
          title: description
          description: A description of the guidance.
          x-stainless-terraform-configurability: optional
        content:
          type: string
          title: content
          description: The content of the guidance.
          x-stainless-terraform-configurability: optional
        shouldAlwaysUse:
          type: boolean
          title: should_always_use
          description: >-
            Whether this guidance should always be used (skipping LLM
            selection).
          x-stainless-terraform-configurability: computed_optional
        isPublished:
          type: boolean
          title: is_published
          description: >-
            Whether the guidance is published. Set to true to publish the
            guidance.
          x-stainless-terraform-configurability: computed_optional
        hasUnpublishedChanges:
          type: boolean
          title: has_unpublished_changes
          description: >-
            Whether there are unpublished changes to the guidance (computed by
            server).
          readOnly: true
          x-stainless-terraform-configurability: computed
        scopedId:
          type: string
          title: scoped_id
          description: >-
            The copy-invariant scoped ID of the guidance (e.g. "skill_..."),
            stable across cross-team copies.
          readOnly: true
          x-stainless-terraform-configurability: computed
        folderId:
          type: string
          title: folder_id
          description: |-
            The ID of the folder the guidance lives in, if any. Populated on the
             single-guidance responses (Get/Create/Update and the folder-move
             endpoint); omitted from ListGuidances responses — fetch the guidance to
             read its folder membership.
          nullable: true
          readOnly: true
          x-stainless-terraform-configurability: computed
      title: Guidance
      additionalProperties: false
    google.protobuf.Any:
      type: object
      properties:
        type:
          type: string
          x-stainless-terraform-configurability: optional
        value:
          type: string
          format: binary
          x-stainless-terraform-configurability: optional
        debug:
          type: object
          additionalProperties: true
          x-stainless-terraform-configurability: optional
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````