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

# Bulk add account mappings

> Link connected integration accounts using separate serviceId, accountId,
and optional subunitId fields. Repeated selections are deduplicated.
Linking an account already included through
its whole integration is rejected. Supply the risk scenario's object ID.



## OpenAPI

````yaml /reference/manage-vanta.json post /risk-scenarios/{riskScenarioId}/mappings/accounts
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:
  /risk-scenarios/{riskScenarioId}/mappings/accounts:
    post:
      tags:
        - Risk Scenarios
      summary: Bulk add account mappings
      description: |-
        Link connected integration accounts using separate serviceId, accountId,
        and optional subunitId fields. Repeated selections are deduplicated.
        Linking an account already included through
        its whole integration is rejected. Supply the risk scenario's object ID.
      operationId: AddAccountMappings
      parameters:
        - in: path
          name: riskScenarioId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddRiskScenarioAccountMappingsInput'
      responses:
        '204':
          description: No content
      security:
        - bearerAuth: []
components:
  schemas:
    AddRiskScenarioAccountMappingsInput:
      properties:
        accountsToLink:
          items:
            $ref: '#/components/schemas/RiskScenarioAccountMapping'
          type: array
          description: >-
            Accounts to link. Repeated account selections in this request are
            deduplicated.
          minItems: 1
          maxItems: 100
      required:
        - accountsToLink
      type: object
      additionalProperties: false
    RiskScenarioAccountMapping:
      properties:
        serviceId:
          type: string
          description: >-
            The integration's service identifier, returned as integrationId by
            GET /v1/integrations.
        accountId:
          type: string
          description: >-
            The Vanta connection ID, returned as connections[].connectionId by
            GET /v1/integrations.
        subunitId:
          type: string
          description: >-
            The provider's subunit identifier for an organization connection,
            such as an AWS account ID.

            Omit for standalone connections.
      required:
        - serviceId
        - accountId
      type: object
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

## Related topics

- [Bulk add integration mappings](/api-reference/risk-scenarios/bulk-add-integration-mappings.md)
- [Bulk add issue mappings](/api-reference/risk-scenarios/bulk-add-issue-mappings.md)
- [Bulk add custom asset mappings](/api-reference/risk-scenarios/bulk-add-custom-asset-mappings.md)
- [Bulk add vendor finding mappings](/api-reference/risk-scenarios/bulk-add-vendor-finding-mappings.md)
- [Bulk remove account mappings](/api-reference/risk-scenarios/bulk-remove-account-mappings.md)
