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

# Choose a skill's login

> Pick the saved login a skill signs in with when the site asks.

Only the skill's owner can do this, with a login they own. Send `"login_id": null` to remove it.

The login is used on your own runs only. A teammate running a shared skill, or anyone running a public copy, never signs in as you: their run stops with `needs_user.kind = "no_login"`.


## OpenAPI

````yaml PATCH /v1/skills/{slug}
openapi: 3.0.3
info:
  title: Valendata REST API
  version: 1.0.0
  description: >-
    Trigger Skills, manage Workflows, retrieve Runs, and stream structured
    results from any language using JSON over HTTPS.
servers:
  - url: https://api.valendata.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Skills
    description: Execute and inspect published Skills.
  - name: Workflows
    description: Trigger multi-step Workflows and list them.
  - name: Runs
    description: Start async Skill runs and read Skill and Workflow run results.
  - name: Skill creation
    description: Create a Skill from a plain-language task.
  - name: Skill improvement
    description: >-
      Fix a Skill, add fields to it or re-learn its detail steps, poll the
      result, and read its change history.
  - name: Versions
    description: List, diff, restore, and pin a Skill's recipe versions.
  - name: Webhooks
    description: Signed delivery of finished async runs.
paths:
  /v1/skills/{slug}:
    patch:
      tags:
        - Logins
      summary: Choose the login a skill signs in with
      description: >-
        Owner only. The login must be yours. Needs `logins:write` and
        `skills:write` on an API key. The login is used on your own runs only —
        never a teammate's run or a public copy of the skill.
      operationId: setSkillLogin
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
          example: test-login-demo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetSkillLoginRequest'
      responses:
        '200':
          description: The skill's login, masked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillLogin'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SetSkillLoginRequest:
      type: object
      properties:
        login_id:
          type: string
          nullable: true
          description: The saved login this skill signs in with. `null` or `""` removes it.
    SkillLogin:
      type: object
      properties:
        slug:
          type: string
        login_id:
          type: string
          nullable: true
        login:
          allOf:
            - $ref: '#/components/schemas/Login'
          nullable: true
    Login:
      type: object
      description: >-
        A saved login as every endpoint shows it. Never the password, seed or a
        code.
      properties:
        id:
          type: string
        site:
          type: string
          nullable: true
        username_hint:
          type: string
          example: to***h
        label:
          type: string
        notes:
          type: string
          nullable: true
        has_totp:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        detail:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          description: >-
            Error message. Usually a plain string; may be a structured object
            for some errors.
      example:
        detail: Invalid or expired API key
  responses:
    Unauthorized:
      description: >-
        Unauthorized. The Authorization header is missing, malformed, or the
        credential is invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        Forbidden. You may not run or change this Skill, or it is not published
        or active.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found in your Workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: vd_sk_...
      description: >-
        API key with the `vd_sk_` prefix. Create keys from Settings, API Keys in
        the dashboard.

````

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