> ## 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 groups for a Trust Center subscriber

> Sets groups on a subscriber.



## OpenAPI

````yaml /reference/manage-vanta.json put /trust-centers/{slugId}/subscribers/{subscriberId}/groups
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:
  /trust-centers/{slugId}/subscribers/{subscriberId}/groups:
    put:
      tags:
        - Trust Centers
      summary: Set groups for a Trust Center subscriber
      description: Sets groups on a subscriber.
      operationId: UpsertGroupsForTrustCenterSubscriber
      parameters:
        - in: path
          name: slugId
          required: true
          schema:
            type: string
        - in: path
          name: subscriberId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetGroupsForTrustCenterSubscriberInput'
      responses:
        '200':
          description: Trust Center subscriber assigned to groups
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrustCenterSubscriber'
              examples:
                Example 1:
                  value:
                    id: a2f7e1b9d0c3f4e5a6c7b8d9
                    email: subscriber@example.com
                    isEmailVerified: true
                    creationDate: '2020-01-01T00:00:00.000Z'
                    customerTrustAccountId: null
                    groups:
                      - id: b3e8f2c0d1a4f5e6b7d8c9e0
                        name: Security Managers
      security:
        - bearerAuth: []
components:
  schemas:
    SetGroupsForTrustCenterSubscriberInput:
      properties:
        groupIds:
          items:
            type: string
          type: array
          description: >-
            Group IDs to set for the subscriber. The subscriber will be removed
            from

            any groups not included in this list.
      required:
        - groupIds
      type: object
      additionalProperties: false
    TrustCenterSubscriber:
      properties:
        id:
          type: string
          description: Unique identifier for the subscriber.
        email:
          type: string
          description: Email of the subscriber.
        isEmailVerified:
          type: boolean
          description: Whether the subscriber's email has been verified.
        creationDate:
          type: string
          format: date-time
          description: When the subscriber was created.
        customerTrustAccountId:
          type: string
          nullable: true
          description: >-
            The ID of the customer trust account this subscriber is linked to,
            if any.
        groups:
          items:
            $ref: '#/components/schemas/SubscriberGroup'
          type: array
          description: Groups this subscriber belongs to.
      required:
        - id
        - email
        - isEmailVerified
        - creationDate
        - customerTrustAccountId
        - groups
      type: object
      additionalProperties: false
    SubscriberGroup:
      properties:
        id:
          type: string
          description: Unique identifier for the group.
        name:
          type: string
          description: Name of the group.
      required:
        - id
        - name
      type: object
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````