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

# Set document owner

> Assign or unassign a user to the document.



## OpenAPI

````yaml /reference/manage-vanta.json post /documents/{documentId}/set-owner
openapi: 3.0.0
info:
  title: Manage Vanta
  version: 1.0.0
  description: >-
    The REST API lets customers query and mutate Vanta's data. Use this API to
    automate bulk actions, query data for custom workflows and dashboards, and
    bolster your security operations


    **Note for Vanta Gov (FedRAMP) customers:** Select `Vanta Gov (FedRAMP)`
    from the server dropdown to issue requests against
    `https://api.vanta-gov.com`. The OAuth token URL shown below defaults to the
    commercial host — replace it with `https://api.vanta-gov.com/oauth/token`.
  termsOfService: https://www.vanta.com/terms
  license:
    name: UNLICENSED
  contact:
    name: API Support
    url: https://help.vanta.com/
    email: support@vanta.com
servers:
  - url: https://api.vanta.com/v1
    description: Vanta (Commercial)
  - url: https://api.vanta-gov.com/v1
    description: Vanta Gov (FedRAMP)
security: []
paths:
  /documents/{documentId}/set-owner:
    post:
      tags:
        - Documents
      summary: Set document owner
      description: Assign or unassign a user to the document.
      operationId: SetOwnerForDocument
      parameters:
        - in: path
          name: documentId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetOwnerForDocumentInput'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
              examples:
                Example 1:
                  value:
                    id: '1'
                    ownerId: '2'
                    category: Account setup
                    description: >-
                      Provide two examples of a recent access request and
                      approval 
                    isSensitive: false
                    title: Document Title
                    uploadStatus: Needs document
                    uploadStatusDate: '2024-03-17T00:00:00.000Z'
                    url: https://example.com
      security:
        - bearerAuth: []
components:
  schemas:
    SetOwnerForDocumentInput:
      properties:
        userId:
          type: string
          nullable: true
          description: The new owner ID
      required:
        - userId
      type: object
      additionalProperties: false
    Document:
      properties:
        id:
          type: string
          description: The document's unique ID.
        ownerId:
          type: string
          nullable: true
          description: The user ID of the document's owner.
        category:
          $ref: '#/components/schemas/DocumentAndTestCategory'
          description: The document's category.
        description:
          type: string
          description: The document's description.
        isSensitive:
          type: boolean
          description: Determines whether or not the document is sensitive.
        title:
          type: string
          description: The document's title.
        uploadStatus:
          $ref: '#/components/schemas/DocumentStatus'
          description: The document's status.
        uploadStatusDate:
          type: string
          format: date-time
          nullable: true
          description: The date the document's uploadStatus changed.
        url:
          type: string
          nullable: true
          description: The URL to view the document within Vanta.
      required:
        - id
        - ownerId
        - category
        - description
        - isSensitive
        - title
        - uploadStatus
        - uploadStatusDate
        - url
      type: object
      additionalProperties: false
    DocumentAndTestCategory:
      type: string
      enum:
        - Accounts access
        - Account security
        - Account setup
        - Computers
        - Custom
        - Data storage
        - Employees
        - Infrastructure
        - IT
        - Logging
        - Monitoring alerts
        - People
        - Policies
        - Risk analysis
        - Software development
        - CSPM alert management
        - Vendors
        - Vulnerability management
    DocumentStatus:
      type: string
      enum:
        - Needs document
        - Needs update
        - Not relevant
        - OK
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````