Main Site HUB Security Scorecard API 6.2 Create a new portfolio

HUB

6.2 Create a new portfolio

Create A New Portfolio

SecurityScorecard allows you to manage your portfolios via an API. You can create, update, and delete portfolios as well as get a list of all your current portfolios. This API endpoint allows you to create a new portfolio. You can check out the full specification for this endpoint here

Resource URI

/portfolios

Parameters:

Name Required Description
Name Y Name of the portfolio)
Description Y A description of the portfolio
Privacy Y Either private or shared indicating if you want to create a private or shared (with all other users in your company) portfolio

Sample Code:


            curl -X POST \
                https://api.securityscorecard.io/portfolios/ \
                -H 'Accept: application/json' \
                -H 'Authorization: Token <Your API Key>' \
                -H 'Content-Type: application/json' \
                -H 'cache-control: no-cache' \
                -d '{"name": "Finance Dept. Vendors", "description": "All vendors used by the finance department.", "privacy": "private"}'
        

Sample Response:


{
    "description": "All vendors used by the finance department.",
    "id": "5d55b74ab9989f0022b0d2b4",
    "name": "Finance Dept. Vendors",
    "privacy": "private"
}