TLS Certificates
Create TLS Certificate
Upload a new TLS certificate
Request
POST /tls_certificates
Example Request
curl \
-X POST \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"certificate_pem":"-----BEGIN CERTIFICATE-----\nMIIDDTCCAfWgAwIBAgIUBUunDdA4gjgtEbZA8w9Ljhvl3bEwDQYJKoZIhvcNAQEL\nBQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wHhcNMjAwMzI0MTgxODE5WhcNMjAw\nNDIzMTgxODE5WjAWMRQwEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAPKVkkKYNl3d9cqrz4tIFlwsohED5W4y1dcBixy4\nGANFFnw43nc2wPyKwYXumJqJIFrcW/NkUZL07bd+dou6mT6Gh/zbaTW91IkREPXL\n7b3KfVu4XkFosVXpWs0U6o4GrZ81CLiKBWI+H03x/ij5OSiJ1l71pqLeTJLOydAR\nAl8kpp7axeHU4UbDrAZkW5SnuZTjIKwVg0UNsBg1yNfUOu1Uah3BYaqPgQitC0Yg\nLW+NUGu/T91bkD7tLsVInkQXeQGdXBAqOycfJ7wj8OlIpyuXjTnGFA0izVmbQw5f\nrQnZ0geGyhLamvz9Gcd7mIlD/+/AEN9Lht82tAOzKG98/O8CAwEAAaNTMFEwHQYD\nVR0OBBYEFKv6RsvEC6T+zCtJZwB0FCR1sEkhMB8GA1UdIwQYMBaAFKv6RsvEC6T+\nzCtJZwB0FCR1sEkhMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB\nAC5fBrouinespo5+9AipjhY/HOKTg+OCnppFnSnqeU1eXZZJ0oakdHTpTNxtbQP9\ntOJTA2f3KWvmpNDMohEQXZz8wHDkdbrIXJKVp6zs1pEp+0BIjA4y9mSywa5xuyk0\noGeChRgGqp2JujDyPCb7LEaKKQEEdMqy73QG+jEAh14+wKixlAf1nATBdeCUvssK\n2x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Nk0cRw6LH8feKiorXHdDRB33t0c47QSD/6AGOjBtxqD7B\n3ZxyR3P+7RdQopLLRFN+FHAnmzsCgYEA9VSGZDFSK+fbg4CgwkWdzuHrAXaUEv0U\novqqWd/yXB9wauEvRHnOrSgW6hFZQiatJOXx0KnalJQzohz/SLGO0MqGtwQbYWVT\nWiJgjUbNeiPEHBeUA6U55lVQr26kQSUWdXEtRbDz+hqV1K+6tTEMzaSPmJiHNgki\nlNMO2gqGQd0CgYBJ268qx5zn2UJEGWG41j5NYbg1TfgFsLxugzI2/heX0TNxZVP1\nPQI7ydmYq2ElSJ6qZxSnoX5255i7FqT8xskV/bOkw83mhAGrxb8Cw+/I90wDq8h+\nl/ggOPdkijfDybq8TBae6SVgd/l3r6f9M1KcypmNMApVBSPN8daNvBOyVQKBgQDo\nsj2utyFrx8Xsm4rf+kxOuPbBMooM4MQ8OmpuSP6G5sMofWLqHmcs0sO5TK9PEYRV\nZU3ST+ml2FSJRdvWRaRi4laZLWoTHZrL+aN/HVM0sMwIoUyhkIy0ruOTIuzlZZpB\n1xHL8qXX6nOHgw8jYdz1CUuyv6owVMXaR77kjer+eQKBgByYZlR/eNTzlot0SdFl\nIbgQ9bV7VLIo+vKzOXE3trfzRJMgUosLTp+5wdSVSW/VBdYZ7Ir3n0bbpY/dGinI\nVShxPbChhCZnhvG2lEEiekI44m5jHSA6hhtRdt/CrhL65Rw2SE5lMEe8htg1UGus\nwzLHWHBl72FjbjdhvEgrq60W\n-----END PRIVATE KEY-----"}' \
https://api.ngrok.com/tls_certificates
Parameters
Name | Type | Description |
---|---|---|
description | string | human-readable description of this TLS certificate. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes. |
certificate_pem | string | chain of PEM-encoded certificates, leaf first. See Certificate Bundles. |
private_key_pem | string | private key for the TLS certificate, PEM-encoded. See Private Keys. |
Response
Returns a 201 response on success
Example Response
{
"certificate_pem": "-----BEGIN CERTIFICATE-----\nMIIDDT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-----END CERTIFICATE-----\n",
"created_at": "2024-08-02T07:15:38Z",
"extended_key_usages": [],
"id": "cert_2k5ok5NwV3GKMBeRYQWJlbAb6yc",
"issued_at": null,
"issuer_common_name": "example.com",
"key_usages": [],
"not_after": "2020-04-23T18:18:19Z",
"not_before": "2020-03-24T18:18:19Z",
"private_key_type": "rsa",
"serial_number": "054ba70dd03882382d11b640f30f4b8e1be5ddb1",
"subject_alternative_names": {
"dns_names": [],
"ips": []
},
"subject_common_name": "example.com",
"subject_country": "",
"subject_locality": "",
"subject_organization": "",
"subject_organizational_unit": "",
"subject_province": "",
"uri": "https://api.ngrok.com/tls_certificates/cert_2k5ok5NwV3GKMBeRYQWJlbAb6yc"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this TLS certificate |
uri | string | URI of the TLS certificate API resource |
created_at | string | timestamp when the TLS certificate was created, RFC 3339 format |
description | string | human-readable description of this TLS certificate. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes. |
certificate_pem | string | chain of PEM-encoded certificates, leaf first. See Certificate Bundles. |
subject_common_name | string | subject common name from the leaf of this TLS certificate |
subject_alternative_names | TLSCertificateSANs | subject alternative names (SANs) from the leaf of this TLS certificate |
issued_at | string | timestamp (in RFC 3339 format) when this TLS certificate was issued automatically, or null if this certificate was user-uploaded |
not_before | string | timestamp when this TLS certificate becomes valid, RFC 3339 format |
not_after | string | timestamp when this TLS certificate becomes invalid, RFC 3339 format |
key_usages | List<string> | set of actions the private key of this TLS certificate can be used for |
extended_key_usages | List<string> | extended set of actions the private key of this TLS certificate can be used for |
private_key_type | string | type of the private key of this TLS certificate. One of rsa, ecdsa, or ed25519. |
issuer_common_name | string | issuer common name from the leaf of this TLS certificate |
serial_number | string | serial number of the leaf of this TLS certificate |
subject_organization | string | subject organization from the leaf of this TLS certificate |
subject_organizational_unit | string | subject organizational unit from the leaf of this TLS certificate |
subject_locality | string | subject locality from the leaf of this TLS certificate |
subject_province | string | subject province from the leaf of this TLS certificate |
subject_country | string | subject country from the leaf of this TLS certificate |
TLSCertificateSANs fields
Name | Type | Description |
---|---|---|
dns_names | List<string> | set of additional domains (including wildcards) this TLS certificate is valid for |
ips | List<string> | set of IP addresses this TLS certificate is also valid for |
Delete TLS Certificate
Delete a TLS certificate
Request
DELETE /tls_certificates/{id}
Example Request
curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/tls_certificates/cert_2k5ok5NwV3GKMBeRYQWJlbAb6yc
Response
Returns a 204 response with no body on success
Get TLS Certificate
Get detailed information about a TLS certificate
Request
GET /tls_certificates/{id}
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/tls_certificates/cert_2k5ok5NwV3GKMBeRYQWJlbAb6yc
Response
Returns a 200 response on success
Example Response
{
"certificate_pem": "-----BEGIN CERTIFICATE-----\nMIIDDTCCAfWgAwIBAgIUBUunDdA4gjgtEbZA8w9Ljhvl3bEwDQYJKoZIhvcNAQEL\nBQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wHhcNMjAwMzI0MTgxODE5WhcNMjAw\nNDIzMTgxODE5WjAWMRQwEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAPKVkkKYNl3d9cqrz4tIFlwsohED5W4y1dcBixy4\nGANFFnw43nc2wPyKwYXumJqJIFrcW/NkUZL07bd+dou6mT6Gh/zbaTW91IkREPXL\n7b3KfVu4XkFosVXpWs0U6o4GrZ81CLiKBWI+H03x/ij5OSiJ1l71pqLeTJLOydAR\nAl8kpp7axeHU4UbDrAZkW5SnuZTjIKwVg0UNsBg1yNfUOu1Uah3BYaqPgQitC0Yg\nLW+NUGu/T91bkD7tLsVInkQXeQGdXBAqOycfJ7wj8OlIpyuXjTnGFA0izVmbQw5f\nrQnZ0geGyhLamvz9Gcd7mIlD/+/AEN9Lht82tAOzKG98/O8CAwEAAaNTMFEwHQYD\nVR0OBBYEFKv6RsvEC6T+zCtJZwB0FCR1sEkhMB8GA1UdIwQYMBaAFKv6RsvEC6T+\nzCtJZwB0FCR1sEkhMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB\nAC5fBrouinespo5+9AipjhY/HOKTg+OCnppFnSnqeU1eXZZJ0oakdHTpTNxtbQP9\ntOJTA2f3KWvmpNDMohEQXZz8wHDkdbrIXJKVp6zs1pEp+0BIjA4y9mSywa5xuyk0\noGeChRgGqp2JujDyPCb7LEaKKQEEdMqy73QG+jEAh14+wKixlAf1nATBdeCUvssK\n2x1uZMyqjJFB5y/5EdnWQzD4WJkrsCkxsZHVMN1d+dqf2sf3dTRV8fzsFGOG17NS\n6u2n9iGcFdBA82XN8yeLIWhy1t3GWutG1sdxENbFRRXea+iUqzDsmRtkaBma2GLQ\nd6JTpFbsCtwDjP23UEi7SZo=\n-----END CERTIFICATE-----\n",
"created_at": "2024-08-02T07:15:38Z",
"extended_key_usages": [],
"id": "cert_2k5ok5NwV3GKMBeRYQWJlbAb6yc",
"issued_at": null,
"issuer_common_name": "example.com",
"key_usages": [],
"metadata": "{\"example\": true}",
"not_after": "2020-04-23T18:18:19Z",
"not_before": "2020-03-24T18:18:19Z",
"private_key_type": "rsa",
"serial_number": "054ba70dd03882382d11b640f30f4b8e1be5ddb1",
"subject_alternative_names": {
"dns_names": [],
"ips": []
},
"subject_common_name": "example.com",
"subject_country": "",
"subject_locality": "",
"subject_organization": "",
"subject_organizational_unit": "",
"subject_province": "",
"uri": "https://api.ngrok.com/tls_certificates/cert_2k5ok5NwV3GKMBeRYQWJlbAb6yc"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this TLS certificate |
uri | string | URI of the TLS certificate API resource |
created_at | string | timestamp when the TLS certificate was created, RFC 3339 format |
description | string | human-readable description of this TLS certificate. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes. |
certificate_pem | string | chain of PEM-encoded certificates, leaf first. See Certificate Bundles. |
subject_common_name | string | subject common name from the leaf of this TLS certificate |
subject_alternative_names | TLSCertificateSANs | subject alternative names (SANs) from the leaf of this TLS certificate |
issued_at | string | timestamp (in RFC 3339 format) when this TLS certificate was issued automatically, or null if this certificate was user-uploaded |
not_before | string | timestamp when this TLS certificate becomes valid, RFC 3339 format |
not_after | string | timestamp when this TLS certificate becomes invalid, RFC 3339 format |
key_usages | List<string> | set of actions the private key of this TLS certificate can be used for |
extended_key_usages | List<string> | extended set of actions the private key of this TLS certificate can be used for |
private_key_type | string | type of the private key of this TLS certificate. One of rsa, ecdsa, or ed25519. |
issuer_common_name | string | issuer common name from the leaf of this TLS certificate |
serial_number | string | serial number of the leaf of this TLS certificate |
subject_organization | string | subject organization from the leaf of this TLS certificate |
subject_organizational_unit | string | subject organizational unit from the leaf of this TLS certificate |
subject_locality | string | subject locality from the leaf of this TLS certificate |
subject_province | string | subject province from the leaf of this TLS certificate |
subject_country | string | subject country from the leaf of this TLS certificate |
TLSCertificateSANs fields
Name | Type | Description |
---|---|---|
dns_names | List<string> | set of additional domains (including wildcards) this TLS certificate is valid for |
ips | List<string> | set of IP addresses this TLS certificate is also valid for |
List TLS Certificates
List all TLS certificates on this account
Request
GET /tls_certificates
Example Request
curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/tls_certificates
Response
Returns a 200 response on success
Example Response
{
"next_page_uri": null,
"tls_certificates": [
{
"certificate_pem": "-----BEGIN CERTIFICATE-----\nMIIDDTCCAfWgAwIBAgIUBUunDdA4gjgtEbZA8w9Ljhvl3bEwDQYJKoZIhvcNAQEL\nBQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wHhcNMjAwMzI0MTgxODE5WhcNMjAw\nNDIzMTgxODE5WjAWMRQwEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAPKVkkKYNl3d9cqrz4tIFlwsohED5W4y1dcBixy4\nGANFFnw43nc2wPyKwYXumJqJIFrcW/NkUZL07bd+dou6mT6Gh/zbaTW91IkREPXL\n7b3KfVu4XkFosVXpWs0U6o4GrZ81CLiKBWI+H03x/ij5OSiJ1l71pqLeTJLOydAR\nAl8kpp7axeHU4UbDrAZkW5SnuZTjIKwVg0UNsBg1yNfUOu1Uah3BYaqPgQitC0Yg\nLW+NUGu/T91bkD7tLsVInkQXeQGdXBAqOycfJ7wj8OlIpyuXjTnGFA0izVmbQw5f\nrQnZ0geGyhLamvz9Gcd7mIlD/+/AEN9Lht82tAOzKG98/O8CAwEAAaNTMFEwHQYD\nVR0OBBYEFKv6RsvEC6T+zCtJZwB0FCR1sEkhMB8GA1UdIwQYMBaAFKv6RsvEC6T+\nzCtJZwB0FCR1sEkhMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB\nAC5fBrouinespo5+9AipjhY/HOKTg+OCnppFnSnqeU1eXZZJ0oakdHTpTNxtbQP9\ntOJTA2f3KWvmpNDMohEQXZz8wHDkdbrIXJKVp6zs1pEp+0BIjA4y9mSywa5xuyk0\noGeChRgGqp2JujDyPCb7LEaKKQEEdMqy73QG+jEAh14+wKixlAf1nATBdeCUvssK\n2x1uZMyqjJFB5y/5EdnWQzD4WJkrsCkxsZHVMN1d+dqf2sf3dTRV8fzsFGOG17NS\n6u2n9iGcFdBA82XN8yeLIWhy1t3GWutG1sdxENbFRRXea+iUqzDsmRtkaBma2GLQ\nd6JTpFbsCtwDjP23UEi7SZo=\n-----END CERTIFICATE-----\n",
"created_at": "2024-08-02T07:15:17Z",
"extended_key_usages": [],
"id": "cert_2k5ohRXQbVjCdrrgV7UnrYJRjUg",
"issued_at": null,
"issuer_common_name": "example.com",
"key_usages": [],
"not_after": "2020-04-23T18:18:19Z",
"not_before": "2020-03-24T18:18:19Z",
"private_key_type": "rsa",
"serial_number": "054ba70dd03882382d11b640f30f4b8e1be5ddb1",
"subject_alternative_names": {
"dns_names": [],
"ips": []
},
"subject_common_name": "example.com",
"subject_country": "",
"subject_locality": "",
"subject_organization": "",
"subject_organizational_unit": "",
"subject_province": "",
"uri": "https://api.ngrok.com/tls_certificates/cert_2k5ohRXQbVjCdrrgV7UnrYJRjUg"
},
{
"certificate_pem": "-----BEGIN CERTIFICATE-----\nMIIDDTCCAfWgAwIBAgIUBUunDdA4gjgtEbZA8w9Ljhvl3bEwDQYJKoZIhvcNAQEL\nBQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wHhcNMjAwMzI0MTgxODE5WhcNMjAw\nNDIzMTgxODE5WjAWMRQwEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAPKVkkKYNl3d9cqrz4tIFlwsohED5W4y1dcBixy4\nGANFFnw43nc2wPyKwYXumJqJIFrcW/NkUZL07bd+dou6mT6Gh/zbaTW91IkREPXL\n7b3KfVu4XkFosVXpWs0U6o4GrZ81CLiKBWI+H03x/ij5OSiJ1l71pqLeTJLOydAR\nAl8kpp7axeHU4UbDrAZkW5SnuZTjIKwVg0UNsBg1yNfUOu1Uah3BYaqPgQitC0Yg\nLW+NUGu/T91bkD7tLsVInkQXeQGdXBAqOycfJ7wj8OlIpyuXjTnGFA0izVmbQw5f\nrQnZ0geGyhLamvz9Gcd7mIlD/+/AEN9Lht82tAOzKG98/O8CAwEAAaNTMFEwHQYD\nVR0OBBYEFKv6RsvEC6T+zCtJZwB0FCR1sEkhMB8GA1UdIwQYMBaAFKv6RsvEC6T+\nzCtJZwB0FCR1sEkhMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB\nAC5fBrouinespo5+9AipjhY/HOKTg+OCnppFnSnqeU1eXZZJ0oakdHTpTNxtbQP9\ntOJTA2f3KWvmpNDMohEQXZz8wHDkdbrIXJKVp6zs1pEp+0BIjA4y9mSywa5xuyk0\noGeChRgGqp2JujDyPCb7LEaKKQEEdMqy73QG+jEAh14+wKixlAf1nATBdeCUvssK\n2x1uZMyqjJFB5y/5EdnWQzD4WJkrsCkxsZHVMN1d+dqf2sf3dTRV8fzsFGOG17NS\n6u2n9iGcFdBA82XN8yeLIWhy1t3GWutG1sdxENbFRRXea+iUqzDsmRtkaBma2GLQ\nd6JTpFbsCtwDjP23UEi7SZo=\n-----END CERTIFICATE-----\n",
"created_at": "2024-08-02T07:15:38Z",
"extended_key_usages": [],
"id": "cert_2k5ok5NwV3GKMBeRYQWJlbAb6yc",
"issued_at": null,
"issuer_common_name": "example.com",
"key_usages": [],
"not_after": "2020-04-23T18:18:19Z",
"not_before": "2020-03-24T18:18:19Z",
"private_key_type": "rsa",
"serial_number": "054ba70dd03882382d11b640f30f4b8e1be5ddb1",
"subject_alternative_names": {
"dns_names": [],
"ips": []
},
"subject_common_name": "example.com",
"subject_country": "",
"subject_locality": "",
"subject_organization": "",
"subject_organizational_unit": "",
"subject_province": "",
"uri": "https://api.ngrok.com/tls_certificates/cert_2k5ok5NwV3GKMBeRYQWJlbAb6yc"
}
],
"uri": "https://api.ngrok.com/tls_certificates"
}
Fields
Name | Type | Description |
---|---|---|
tls_certificates | TLSCertificate | the list of all TLS certificates on this account |
uri | string | URI of the TLS certificates list API resource |
next_page_uri | string | URI of the next page, or null if there is no next page |
TLSCertificate fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this TLS certificate |
uri | string | URI of the TLS certificate API resource |
created_at | string | timestamp when the TLS certificate was created, RFC 3339 format |
description | string | human-readable description of this TLS certificate. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes. |
certificate_pem | string | chain of PEM-encoded certificates, leaf first. See Certificate Bundles. |
subject_common_name | string | subject common name from the leaf of this TLS certificate |
subject_alternative_names | TLSCertificateSANs | subject alternative names (SANs) from the leaf of this TLS certificate |
issued_at | string | timestamp (in RFC 3339 format) when this TLS certificate was issued automatically, or null if this certificate was user-uploaded |
not_before | string | timestamp when this TLS certificate becomes valid, RFC 3339 format |
not_after | string | timestamp when this TLS certificate becomes invalid, RFC 3339 format |
key_usages | List<string> | set of actions the private key of this TLS certificate can be used for |
extended_key_usages | List<string> | extended set of actions the private key of this TLS certificate can be used for |
private_key_type | string | type of the private key of this TLS certificate. One of rsa, ecdsa, or ed25519. |
issuer_common_name | string | issuer common name from the leaf of this TLS certificate |
serial_number | string | serial number of the leaf of this TLS certificate |
subject_organization | string | subject organization from the leaf of this TLS certificate |
subject_organizational_unit | string | subject organizational unit from the leaf of this TLS certificate |
subject_locality | string | subject locality from the leaf of this TLS certificate |
subject_province | string | subject province from the leaf of this TLS certificate |
subject_country | string | subject country from the leaf of this TLS certificate |
TLSCertificateSANs fields
Name | Type | Description |
---|---|---|
dns_names | List<string> | set of additional domains (including wildcards) this TLS certificate is valid for |
ips | List<string> | set of IP addresses this TLS certificate is also valid for |
Update TLS Certificate
Update attributes of a TLS Certificate by ID
Request
PATCH /tls_certificates/{id}
Example Request
curl \
-X PATCH \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"metadata":"{\"example\": true}"}' \
https://api.ngrok.com/tls_certificates/cert_2k5ok5NwV3GKMBeRYQWJlbAb6yc
Parameters
Name | Type | Description |
---|---|---|
id | string | |
description | string | human-readable description of this TLS certificate. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes. |
Response
Returns a 200 response on success
Example Response
{
"certificate_pem": "-----BEGIN CERTIFICATE-----\nMIIDDTCCAfWgAwIBAgIUBUunDdA4gjgtEbZA8w9Ljhvl3bEwDQYJKoZIhvcNAQEL\nBQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wHhcNMjAwMzI0MTgxODE5WhcNMjAw\nNDIzMTgxODE5WjAWMRQwEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcN\nAQEBBQADggEPADCCAQoCggEBAPKVkkKYNl3d9cqrz4tIFlwsohED5W4y1dcBixy4\nGANFFnw43nc2wPyKwYXumJqJIFrcW/NkUZL07bd+dou6mT6Gh/zbaTW91IkREPXL\n7b3KfVu4XkFosVXpWs0U6o4GrZ81CLiKBWI+H03x/ij5OSiJ1l71pqLeTJLOydAR\nAl8kpp7axeHU4UbDrAZkW5SnuZTjIKwVg0UNsBg1yNfUOu1Uah3BYaqPgQitC0Yg\nLW+NUGu/T91bkD7tLsVInkQXeQGdXBAqOycfJ7wj8OlIpyuXjTnGFA0izVmbQw5f\nrQnZ0geGyhLamvz9Gcd7mIlD/+/AEN9Lht82tAOzKG98/O8CAwEAAaNTMFEwHQYD\nVR0OBBYEFKv6RsvEC6T+zCtJZwB0FCR1sEkhMB8GA1UdIwQYMBaAFKv6RsvEC6T+\nzCtJZwB0FCR1sEkhMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB\nAC5fBrouinespo5+9AipjhY/HOKTg+OCnppFnSnqeU1eXZZJ0oakdHTpTNxtbQP9\ntOJTA2f3KWvmpNDMohEQXZz8wHDkdbrIXJKVp6zs1pEp+0BIjA4y9mSywa5xuyk0\noGeChRgGqp2JujDyPCb7LEaKKQEEdMqy73QG+jEAh14+wKixlAf1nATBdeCUvssK\n2x1uZMyqjJFB5y/5EdnWQzD4WJkrsCkxsZHVMN1d+dqf2sf3dTRV8fzsFGOG17NS\n6u2n9iGcFdBA82XN8yeLIWhy1t3GWutG1sdxENbFRRXea+iUqzDsmRtkaBma2GLQ\nd6JTpFbsCtwDjP23UEi7SZo=\n-----END CERTIFICATE-----\n",
"created_at": "2024-08-02T07:15:38Z",
"extended_key_usages": [],
"id": "cert_2k5ok5NwV3GKMBeRYQWJlbAb6yc",
"issued_at": null,
"issuer_common_name": "example.com",
"key_usages": [],
"metadata": "{\"example\": true}",
"not_after": "2020-04-23T18:18:19Z",
"not_before": "2020-03-24T18:18:19Z",
"private_key_type": "rsa",
"serial_number": "054ba70dd03882382d11b640f30f4b8e1be5ddb1",
"subject_alternative_names": {
"dns_names": [],
"ips": []
},
"subject_common_name": "example.com",
"subject_country": "",
"subject_locality": "",
"subject_organization": "",
"subject_organizational_unit": "",
"subject_province": "",
"uri": "https://api.ngrok.com/tls_certificates/cert_2k5ok5NwV3GKMBeRYQWJlbAb6yc"
}
Fields
Name | Type | Description |
---|---|---|
id | string | unique identifier for this TLS certificate |
uri | string | URI of the TLS certificate API resource |
created_at | string | timestamp when the TLS certificate was created, RFC 3339 format |
description | string | human-readable description of this TLS certificate. optional, max 255 bytes. |
metadata | string | arbitrary user-defined machine-readable data of this TLS certificate. optional, max 4096 bytes. |
certificate_pem | string | chain of PEM-encoded certificates, leaf first. See Certificate Bundles. |
subject_common_name | string | subject common name from the leaf of this TLS certificate |
subject_alternative_names | TLSCertificateSANs | subject alternative names (SANs) from the leaf of this TLS certificate |
issued_at | string | timestamp (in RFC 3339 format) when this TLS certificate was issued automatically, or null if this certificate was user-uploaded |
not_before | string | timestamp when this TLS certificate becomes valid, RFC 3339 format |
not_after | string | timestamp when this TLS certificate becomes invalid, RFC 3339 format |
key_usages | List<string> | set of actions the private key of this TLS certificate can be used for |
extended_key_usages | List<string> | extended set of actions the private key of this TLS certificate can be used for |
private_key_type | string | type of the private key of this TLS certificate. One of rsa, ecdsa, or ed25519. |
issuer_common_name | string | issuer common name from the leaf of this TLS certificate |
serial_number | string | serial number of the leaf of this TLS certificate |
subject_organization | string | subject organization from the leaf of this TLS certificate |
subject_organizational_unit | string | subject organizational unit from the leaf of this TLS certificate |
subject_locality | string | subject locality from the leaf of this TLS certificate |
subject_province | string | subject province from the leaf of this TLS certificate |
subject_country | string | subject country from the leaf of this TLS certificate |
TLSCertificateSANs fields
Name | Type | Description |
---|---|---|
dns_names | List<string> | set of additional domains (including wildcards) this TLS certificate is valid for |
ips | List<string> | set of IP addresses this TLS certificate is also valid for |