> For the complete documentation index, see [llms.txt](https://docs.defguard.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.defguard.net/for-developers/rest-api/core/certificates/set-up-the-certificate-for-the-external-edge-url.md).

# Set up the certificate for the external (edge) URL

```json
{"openapi":"3.1.0","info":{"title":"defguard Core API","version":"2.0.3"},"tags":[{"name":"certificates","description":"Internal (core) and external (edge) URL certificates."}],"security":[{"cookie":[]},{"api_token":[]}],"components":{"securitySchemes":{"cookie":{"type":"apiKey","in":"cookie","name":"defguard_session"},"api_token":{"type":"http","scheme":"bearer"}},"schemas":{"ExternalUrlSettingsConfig":{"type":"object","required":["ssl_type"],"properties":{"cert_pem":{"type":["string","null"]},"key_pem":{"type":["string","null"]},"ssl_type":{"$ref":"#/components/schemas/ExternalSslType"}}},"ExternalSslType":{"type":"string","description":"SSL configuration type for the external (proxy) web server.","enum":["none","lets_encrypt","defguard_ca","own_cert"]},"ApiErrorResponse":{"type":"object","description":"Body returned with error responses.","required":["msg"],"properties":{"code":{"type":["string","null"],"description":"Machine-readable error code, returned for selected errors."},"msg":{"type":"string","description":"Human-readable error message."}}}}},"paths":{"/api/v1/proxy/cert/external_url_settings":{"post":{"tags":["certificates"],"summary":"Set up the certificate for the external (edge) URL","operationId":"set_external_url_settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalUrlSettingsConfig"}}},"required":true},"responses":{"201":{"description":"External URL certificate settings applied.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid certificate settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Session is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Requires admin privileges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unable to apply external URL certificate settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}}}
```
