---
updatedAt: 2026-07-16T17:26:45.000Z
agentTools:
  projectIndex: https://developer.arubanetworks.com/aoscx/llms.txt
---

# Create a certificate

Generate CSR or create self-signed certificate

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "AOS-CX REST API",
    "description": "RESTful interface for AOS-CX switch software",
    "version": "10.18"
  },
  "servers": [
    {
      "url": "switch-ip/rest/v10.18"
    }
  ],
  "paths": {
    "/certificates": {
      "post": {
        "description": "Generate CSR or create self-signed certificate",
        "summary": "Create a certificate",
        "tags": [
          "CertificateManager"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "cert_type": {
                    "description": "Type of the certificate",
                    "type": "string"
                  },
                  "certificate_name": {
                    "description": "Name of the certificate",
                    "type": "string"
                  },
                  "extensions": {
                    "description": "Certificate extensions",
                    "properties": {
                      "extended_key_usage": {
                        "description": "Extended key usage of the certificate",
                        "properties": {
                          "client_auth": {
                            "type": "boolean"
                          },
                          "server_auth": {
                            "type": "boolean"
                          }
                        }
                      },
                      "key_usage": {
                        "description": "Key usage of the certificate. EncipherOnly and DecipherOnly are mutually exclusive and only apply if KeyAgreement is set to true.",
                        "properties": {
                          "data_encipherment": {
                            "type": "boolean"
                          },
                          "decipher_only": {
                            "type": "boolean"
                          },
                          "digital_signature": {
                            "type": "boolean"
                          },
                          "encipher_only": {
                            "type": "boolean"
                          },
                          "key_agreement": {
                            "type": "boolean"
                          },
                          "key_encipherment": {
                            "type": "boolean"
                          },
                          "non_repudiation": {
                            "type": "boolean"
                          }
                        }
                      },
                      "subject_alternative_name": {
                        "properties": {
                          "dns_names": {
                            "description": "SAN DNS names for the certificate",
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "ip_addresses": {
                            "description": "SAN IP addresses for the certificate",
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      }
                    }
                  },
                  "key_size": {
                    "description": "Key size of the certificate. Default Value:2048",
                    "type": "integer"
                  },
                  "key_type": {
                    "description": "Key type of the certificate. Default Value:RSA",
                    "type": "string"
                  },
                  "subject": {
                    "properties": {
                      "common_name": {
                        "description": "Common name of the certificate request",
                        "type": "string"
                      },
                      "country": {
                        "description": "Country of the certificate request",
                        "type": "string"
                      },
                      "locality": {
                        "description": "Locality of the certificate request",
                        "type": "string"
                      },
                      "org": {
                        "description": "Organization of the certificate request",
                        "type": "string"
                      },
                      "org_unit": {
                        "description": "Organization Unit of the certificate request",
                        "type": "string"
                      },
                      "state": {
                        "description": "State of the certificate request",
                        "type": "string"
                      }
                    },
                    "required": [
                      "country",
                      "common_name"
                    ]
                  }
                },
                "required": [
                  "certificate_name",
                  "cert_type"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "502": {
            "description": "Bad Gateway"
          }
        }
      }
    }
  }
}
```