---
title: Upload Certificate
slug: tp-api/upload-certificate
docTags: 
createdAt: 2023-12-26T14:37:58.070Z
---

{
  "id": "mwy_qxSagqbq3SLPKP2IJ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/api/portal/external/certificates",
    "servers": [
      {
        "url": "{{url}}/api/portal/external/certificates",
        "description": "Development environment"
      }
    ],
    "name": "Upload Certificate",
    "description": "It provides the capability to load security certificates for both destination and source components.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "schema": [
            {
              "name": "files",
              "kind": "required",
              "type": "array",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "cookieAuth",
          "name": "SESSION",
          "kind": "optional",
          "type": "apiKey",
          "in": "cookie"
        },
        {
          "id": "tokenAuth",
          "name": "X-XSRF-TOKEN",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "xPOoMfpAVRH-wostAf5tn",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/api/portal/external/certificates \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"files\": []\n     }'"
        },
        {
          "id": "U8FVtoC_9rCipc9y9WpLB",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"files\": []\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/api/portal/external/certificates\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "b80NjRPKB6NefieHZKOoD",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/api/portal/external/certificates\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"files\": []\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "dAg8S3dPV1xu-f1rPkRwu",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/api/portal/external/certificates\"\n\npayload = json.dumps({\n   \"files\": []\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "xPOoMfpAVRH-wostAf5tn"
    },
    "results": {
      "languages": [
        {
          "id": "8ul7FcPjiolPPhFV4jTVQ",
          "language": "200",
          "code": "// OK\n"
        }
      ],
      "selectedLanguageId": "8ul7FcPjiolPPhFV4jTVQ"
    }
  },
  "children": [
    {
      "id": "Cci1SdWNWLGNVRej_4DFN",
      "type": "paragraph",
      "children": [
        {
          "text": "It provides the capability to load security certificates for both destination and source components.",
          "id": "6s6E_tvJ9JgofYlko7g3j"
        }
      ]
    }
  ]
}