mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-31 15:53:33 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			102 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			102 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
| {
 | |
| 	"operationId": "createCertificate",
 | |
| 	"summary": "Create a Certificate",
 | |
| 	"tags": ["certificates"],
 | |
| 	"security": [
 | |
| 		{
 | |
| 			"bearerAuth": ["certificates.manage"]
 | |
| 		}
 | |
| 	],
 | |
| 	"requestBody": {
 | |
| 		"description": "Certificate Payload",
 | |
| 		"required": true,
 | |
| 		"content": {
 | |
| 			"application/json": {
 | |
| 				"schema": {
 | |
| 					"type": "object",
 | |
| 					"additionalProperties": false,
 | |
| 					"required": ["provider"],
 | |
| 					"properties": {
 | |
| 						"provider": {
 | |
| 							"$ref": "../../../components/certificate-object.json#/properties/provider"
 | |
| 						},
 | |
| 						"nice_name": {
 | |
| 							"$ref": "../../../components/certificate-object.json#/properties/nice_name"
 | |
| 						},
 | |
| 						"domain_names": {
 | |
| 							"$ref": "../../../components/certificate-object.json#/properties/domain_names"
 | |
| 						},
 | |
| 						"meta": {
 | |
| 							"$ref": "../../../components/certificate-object.json#/properties/meta"
 | |
| 						}
 | |
| 					}
 | |
| 				},
 | |
| 				"example": {
 | |
| 					"provider": "letsencrypt",
 | |
| 					"domain_names": ["test.example.com"],
 | |
| 					"meta": {
 | |
| 						"dns_challenge": false
 | |
| 					}
 | |
| 				}
 | |
| 			}
 | |
| 		}
 | |
| 	},
 | |
| 	"responses": {
 | |
| 		"201": {
 | |
| 			"description": "201 response",
 | |
| 			"content": {
 | |
| 				"application/json": {
 | |
| 					"examples": {
 | |
| 						"default": {
 | |
| 							"value": {
 | |
| 								"expires_on": "2025-01-07 04:30:17",
 | |
| 								"modified_on": "2024-10-09 05:28:51",
 | |
| 								"id": 5,
 | |
| 								"created_on": "2024-10-09 05:28:35",
 | |
| 								"owner_user_id": 1,
 | |
| 								"provider": "letsencrypt",
 | |
| 								"nice_name": "test.example.com",
 | |
| 								"domain_names": ["test.example.com"],
 | |
| 								"meta": {
 | |
| 									"dns_challenge": false,
 | |
| 									"letsencrypt_certificate": {
 | |
| 										"cn": "test.example.com",
 | |
| 										"issuer": "C = US, O = Let's Encrypt, CN = E5",
 | |
| 										"dates": {
 | |
| 											"from": 1728448218,
 | |
| 											"to": 1736224217
 | |
| 										}
 | |
| 									}
 | |
| 								}
 | |
| 							}
 | |
| 						}
 | |
| 					},
 | |
| 					"schema": {
 | |
| 						"$ref": "../../../components/certificate-object.json"
 | |
| 					}
 | |
| 				}
 | |
| 			}
 | |
| 		},
 | |
| 		"400": {
 | |
| 			"description": "400 response",
 | |
| 			"content": {
 | |
| 				"application/json": {
 | |
| 					"examples": {
 | |
| 						"default": {
 | |
| 							"value": {
 | |
| 								"error": {
 | |
| 									"code": 400,
 | |
| 									"message": "Domains are invalid"
 | |
| 								}
 | |
| 							}
 | |
| 						}
 | |
| 					},
 | |
| 					"schema": {
 | |
| 						"$ref": "../../../components/error.json"
 | |
| 					}
 | |
| 				}
 | |
| 			}
 | |
| 		}
 | |
| 	}
 | |
| }
 |