---
agentTools:
  projectIndex: https://cocredo-api.readme.io/llms.txt
---

# /portfolios

Delete portfolio and it's content

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1",
    "title": "CoCredo RESTful API",
    "description": "The API allows users to automate CoCredo's services by providing access to credit reference data via a web service in JSON format.",
    "contact": {
      "name": "CoCredo Limited",
      "url": "https://www.cocredo.co.uk/contact"
    },
    "termsOfService": "https://www.cocredo.co.uk/about/terms-and-conditions"
  },
  "servers": [
    {
      "url": "https://apigw.cocredo.com/v1"
    }
  ],
  "paths": {
    "/portfolios": {
      "delete": {
        "tags": [
          "Delete portfolio"
        ],
        "description": "Delete portfolio and it's content",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "query",
            "description": "Portfolio ID to delete",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "metadata": {
                      "$ref": "#/components/schemas/metadata"
                    },
                    "request": {
                      "$ref": "#/components/schemas/request"
                    },
                    "response": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "success": {
                              "type": "boolean",
                              "enum": [
                                true
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "metadata": {
        "type": "object",
        "properties": {
          "datetime": {
            "type": "string",
            "format": "date-time"
          },
          "api": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "userid": {
            "type": "string"
          },
          "companyid": {
            "type": "string"
          }
        }
      },
      "request": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "PUT",
              "DELETE"
            ]
          },
          "arguments": {
            "type": "object"
          }
        }
      }
    },
    "responses": {
      "error": {
        "description": "Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "metadata": {
                  "$ref": "#/components/schemas/metadata"
                },
                "request": {
                  "$ref": "#/components/schemas/request"
                },
                "response": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "accessToken": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "To sign into the API call the /token endpoint to exchange your permanent API key and secret into a temporary security token. Put that token into the Authorization header when making any data requests. No need to prepend the token with words like Basic, Bearer, etc. The token expires after an hour."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 102,
      "1": 169,
      "2": 250,
      "3": 193,
      "4": 175,
      "5": 166,
      "6": 115,
      "7": 0,
      "8": 68,
      "9": 165,
      "10": 135,
      "11": 47
    }
  }
}
```