Skip to content

Remove an uploaded certificate

DELETE
/domains/{domain}/ssl/certificates/{certificateId}
curl --request DELETE \
--url https://api.nsin.ir/domains/example.com/ssl/certificates/1 \
--header 'Authorization: Bearer <token>'

Forgets a certificate you uploaded. Any hostname serving it falls back to the certificate NSIN manages.

Only uploads can be removed — a certificate NSIN issues is replaced by its own renewal, so select a different one instead. The request is refused when a hostname serving it has nothing to fall back on, rather than taking that hostname off HTTPS. Requires ssl.manage.

domain
required
string

The domain name (for example example.com) — not a numeric id.

Example
example.com
certificateId
required
integer

The id of a certificate from GET /domains/{domain}/ssl/certificates.

Removed. hostnames lists the names that fell back.

Media type application/json
object
message
string
hostnames
Array<string>
Example generated
{
"message": "example",
"hostnames": [
"example"
]
}

The certificate is managed by NSIN, or removing it would leave a hostname with nothing to serve.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

Missing, malformed, revoked or expired API key — or the owning account is inactive.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

The key is read-only, your role on the domain lacks the required permission, or the domain’s plan does not include the feature.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

No such certificate for this domain.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}