---
title: "Add the discovered accounts of a specific credential"
method: POST
path: "/credentials/{id}/discovered-accounts"
tags: ["Discovery"]
---

# Add the discovered accounts of a specific credential

`POST /credentials/{id}/discovered-accounts`

## Request

- Base URL: `//basrvqaap6001.morningstar.com/WPDemo/webportfolio/api/v1` (relative, and the document’s source URL is not known)
- URL: `//basrvqaap6001.morningstar.com/WPDemo/webportfolio/api/v1/credentials/{id}/discovered-accounts`
- Auth: API key in header `Authorization`

Submit a new request for bulk addition of accounts discovered using the specific `id` of a credential. Adds either all or a subset of the accounts discovered during a discovery operation for the credential. On success (201) returns a list of account URIs for the created accounts.

## Path parameters

- `id` integer, required

## Request body

- DiscoveredAccountPostDto
  - `discoveredAccount` DiscoveredAccount
    - `id` integer: ID of the discovered account
    - `name` string: Name of the discovered account
  - `discoveryTicket` string, required: add all accounts associated with a specific discovery ticket
  - `id` integer
  - `name` string
  - `discoveredAccounts` DiscoveredAccount[]: add only a specific subset of accounts associated with a specific discovery ticket:
    - `id` integer: ID of the discovered account
    - `name` string: Name of the discovered account

## Response `200`

OK

- DataRecord
  - `data` object

## Other responses

- `201`: On success, indicates successful creation of the accounts
- `400`: Bad Request
- `401`: Not Authorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error

## Changes

- **2026-11-03** `475f167d1874`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/morningstar/apis/byallaccounts-api-07302024/changes/credentials/:id/discovered-accounts/post.md)

---

[API](https://skmtc.dev/morningstar/apis/byallaccounts-api-07302024.md) - [All operations](https://skmtc.dev/morningstar/apis/byallaccounts-api-07302024/llms.txt) - [OpenAPI document](https://skmtc.dev/morningstar/apis/byallaccounts-api-07302024/revisions/475f167d1874?raw)
