Skip to content

Upload Load Balancer Certificate

POST
/gateway/certificates/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/certificates/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "example-cert",
"cert_chain": "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----\n",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIE...\n-----END PRIVATE KEY-----\n"
}'

Adds a Certificate you bring: a chain in PEM text, your certificate first and then each issuer, with its private key. The pair is checked before it is saved: the key must match the certificate, be unencrypted and strong enough (RSA 2048 bits or more, EC 256 bits or more), the certificate must not have expired and the chain must be in order and include the intermediates. Adding a Certificate changes no Load Balancer. Needs the Create permission for Load Balancers.

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
name
required

The Certificate’s name, up to 255 characters, not used by another Certificate of the project.

string

Example

example-cert
cert_chain
required

The chain as PEM text: your certificate first, then each issuer above it.

string

Example

-----BEGIN CERTIFICATE-----
MIIB...
-----END CERTIFICATE-----
private_key
required

The certificate’s private key as PEM text, not protected by a passphrase. It is never returned.

string

Example

-----BEGIN PRIVATE KEY-----
MIIE...
-----END PRIVATE KEY-----

The Certificate that was added

Media typeapplication/json
object
code
integer
message
string
data
object
id
integer
name

The Certificate’s name.

string
source

UPLOADED for one you added. ACME and PLATFORM are Certificates E2E manages for you.

string
Allowed values: UPLOADED ACME PLATFORM
status

Active, Pending or Expired.

string
Allowed values: Active Pending Expired
cert_chain

The certificate chain you uploaded, as PEM text. Empty for a Certificate E2E manages.

string
domains

The names the certificate covers, read from the certificate.

Array<string>
not_before

Start of the validity period.

string
nullable
not_after

End of the validity period.

string
nullable
issuer

Who issued the certificate, read from the certificate.

string
key_type

The key’s type and size, for example RSA-2048 or EC-secp256r1.

string
fingerprint

SHA-256 fingerprint of the first certificate.

string
days_remaining

Whole days until not_after; negative once it has passed. null when there is no end date.

integer
nullable
is_expired

true once not_after has passed.

boolean
in_use_by

IDs of the Load Balancers that use the Certificate.

Array<integer>
created_by

Who created it.

object
id
integer
name
string
email
string
username
string
created_at
string
updated_at
string
errors
object

Example

{
"code": 201,
"message": "Created Successfully",
"data": {
"id": 5,
"name": "example-cert",
"source": "UPLOADED",
"status": "Active",
"cert_chain": "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----\n",
"domains": [
"example.com"
],
"not_before": "2026-09-01T00:00:00Z",
"not_after": "2026-12-01T00:00:00Z",
"issuer": "CN=Example CA,O=Example",
"key_type": "RSA-2048",
"fingerprint": "9f2c4b7a1d0e5c3b8a6f4e2d1c0b9a8f7e6d5c4b3a291807f6e5d4c3b2a19087",
"days_remaining": 37,
"is_expired": false,
"in_use_by": [
42
],
"created_by": {
"id": 101,
"name": "A User",
"email": "user@example.com",
"username": "auser"
},
"created_at": "2026-10-21T11:17:29Z",
"updated_at": "2026-10-21T11:17:29Z"
},
"errors": {}
}

The upload was refused. errors is an object keyed by field, each holding a list of messages. Under cert_chain: “A certificate is required.”, “Could not read the certificate. Expected PEM text beginning with ‘—–BEGIN CERTIFICATE—–’.”, “This certificate has already expired.”, “Key is too small. Minimum is <2048 for RSA, 256 for EC> bits.”, “Certificate chain is out of order. Put your certificate first, then each issuer above it.”, “Intermediate certificate(s) are missing. Append the issuer chain supplied by your CA, or some clients will reject the connection.”. Under private_key: “A private key is required.”, “Could not read the private key. Expected PEM text beginning with ‘—–BEGIN … PRIVATE KEY—–’.”, “This private key does not belong to this certificate.”, “This private key is passphrase-protected. Upload a decrypted key.”. For a name already used (the name of a deleted Certificate counts as used) errors says the name is taken. Otherwise “Failed to save the certificate. Please try again later.” The same 400 is returned, with the project’s own text, when project_id is missing or not a number.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
object

Example

{
"code": 400,
"message": "Bad Request",
"data": {},
"errors": {
"private_key": [
"A private key is required."
]
}
}