Remove an uploaded certificate
const url = 'https://api.nsin.ir/domains/example.com/ssl/certificates/1';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comThe id of a certificate from GET /domains/{domain}/ssl/certificates.
Responses
Section titled “ Responses ”Removed. hostnames lists the names that fell back.
object
Example generated
{ "message": "example", "hostnames": [ "example" ]}The certificate is managed by NSIN, or removing it would leave a hostname with nothing to serve.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}Missing, malformed, revoked or expired API key — or the owning account is inactive.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "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.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}No such certificate for this domain.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}