# CSR Parser API

> CSR Parser extracts and analyzes information from Certificate Signing Requests (CSRs), providing detailed subject information, public key details, and fingerprints.

**Endpoint:** `POST https://api.apiverve.com/v1/csrparser`  
**Category:** Security  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/csrparser

## Overview

CSR Parser reads a Certificate Signing Request and returns what is inside it in plain JSON. Works as a CSR decoder: paste the PEM-encoded certificate signing request generated for an SSL certificate and read back its subject, public key and fingerprints before you submit it to a CA. It reads the request's real ASN.1 structure, so typos in the common name or a key smaller than intended show up before a certificate is issued against them.

It fits SSL/TLS certificate management systems, certificate request parser steps in ACME and PKI automation, security tooling that audits keys before signing, and support desks that need to confirm what a customer sent.

The Free plan returns the subject fields, the public key algorithm and size, the CSR version, the PEM and its size in bytes. Paid plans add the RSA exponent, the signature algorithm, SHA-1, SHA-256 and MD5 fingerprints, and a security assessment that flags weak keys and deprecated signature hashes, which is the check most teams want before x509 certificates are requested.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/csrparser" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"csr":"-----BEGIN CERTIFICATE REQUEST-----\nMIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx\nFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCkV4YW1wbGUgQ28xEDAO\nBgNVBAsMB0RldlRlYW0xFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjd/RepiCLQ5/HfKynijcPdiwygrSgxQeTKPo\nT/WiEaRTaUToW9uDUeiIHK83Tgn2+TIONpMoLJRNG+zslpHybWhVVWNlamkrlRwP\nXFQJzsxDN5+TQugILatLsp680SgMNyyPtDIpT3niiNuQ4NFepQLvQTbjXgj1celb\nU86CCeJzYengTF0ZE9Ra+/SsRTA+oy0fNLChNMc2DBaybccxwV2rNWvlvPdhfB7M\nsel3sw/x2hsbWoYC/kudzYmoDPZKX+XOhCkFwUgwib8V4hbjVLcOYsPBJcROYpRh\n9d5g7xdRlbF1I7dHsCRKnsvkIONtwKQmJ2v/UPqYahjtm2TPUQIDAQABoAAwDQYJ\nKoZIhvcNAQELBQADggEBAFEHOsN2SkB3qFBMk9JR5IDoh8rSUKj/310DOwilOQm+\n5lAwRfcFMYCl9yf4IV+XPPfvT3ahzUFfi8Fc98CDeIxAhEwtuZFlE7LA5+/F4HXM\nH3gzqTFwOZq+Wa2m029/BvcyII830h4Z+gU68R52px7O7wYSbAR/n7t1fh2bxzmW\nKqqjrvCpHoMVpgcm9y2bYTj+HLxgX4/uADFvotQppOWZi0ctam+if3Kqb3Kd2MFD\nvVHZp9NwEoqNPxmFEzcyOk2y1PYhhRja7rjdC6bdAqj6JRt+WSzStvgx7aEsxBQj\nrJCMi+GypGf9xQUfCJBhTDQVQ3fmCKTfddDeeVbJBrA=\n-----END CERTIFICATE REQUEST-----"}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `csr` | string | Yes | The PEM-formatted Certificate Signing Request to parse |

## Response fields

- `version` — string · CSR format version identifier
- `subject` — object
  - `subject.common_name` — string · Common name from CSR subject distinguished name
  - `subject.organization` — string · Organization name from CSR subject field
  - `subject.organizational_unit` — string · Organizational unit from CSR subject
  - `subject.locality` — string · Locality or city from CSR subject
  - `subject.state` — string · State or province from CSR subject
  - `subject.country` — string · Country code from CSR subject
  - `subject.email` — object · Email address from CSR subject
- `public_key` — object
  - `public_key.algorithm` — string · Public key algorithm type used in CSR
  - `public_key.size_bits` — number · Public key size in bits
  - `public_key.exponent` — number · RSA public exponent value · (premium)
- `signature_algorithm` — string · Algorithm used to sign the CSR · (premium)
- `extensions` — array · X.509 extensions included in CSR · (premium)
- `fingerprints` — object · CSR fingerprints in various hash formats · (premium)
  - `fingerprints.sha1` — string · SHA1 fingerprint of CSR in colon format · (premium)
  - `fingerprints.sha256` — string · SHA256 fingerprint of CSR in colon format · (premium)
  - `fingerprints.md5` — string · MD5 fingerprint of CSR in colon format · (premium)
- `pem` — string · PEM-encoded CSR data
- `size_bytes` — number · CSR size in bytes
- `format` — string · Certificate encoding format type
- `is_valid` — boolean · Whether CSR format is valid
- `security_assessment` — object · Derived security posture of the request: weak-key detection (RSA < 2048 / EC < 256), deprecated signature hash (SHA1/MD5), and an overall key strength rating · (premium)
  - `security_assessment.is_weak_key` — boolean · (premium)
  - `security_assessment.is_deprecated_signature` — boolean · (premium)
  - `security_assessment.key_strength` — string · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "version": "v1",
    "subject": {
      "common_name": "example.com",
      "organization": "Example Co",
      "organizational_unit": "DevTeam",
      "locality": "San Francisco",
      "state": "California",
      "country": "US",
      "email": null
    },
    "public_key": {
      "algorithm": "RSA",
      "size_bits": 2048,
      "exponent": 65537
    },
    "signature_algorithm": "SHA256withRSA",
    "extensions": [],
    "fingerprints": {
      "sha1": "05:E5:65:28:8A:47:01:D3:05:EA:3B:3F:F5:DC:C7:42:BF:06:E2:5F",
      "sha256": "E0:0B:C1:59:A3:9E:F9:96:13:7B:CE:98:BC:8F:A1:49:62:4D:2E:CF:85:D5:36:2C:DD:46:9E:96:CF:92:A3:AF",
      "md5": "27:C7:EC:94:73:34:E3:B7:3F:F6:FD:3E:0A:81:EA:3D"
    },
    "pem": "-----BEGIN CERTIFICATE REQUEST-----\nMIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx\nFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCkV4YW1wbGUgQ28xEDAO\nBgNVBAsMB0RldlRlYW0xFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjd/RepiCLQ5/HfKynijcPdiwygrSgxQeTKPo\nT/WiEaRTaUToW9uDUeiIHK83Tgn2+TIONpMoLJRNG+zslpHybWhVVWNlamkrlRwP\nXFQJzsxDN5+TQugILatLsp680SgMNyyPtDIpT3niiNuQ4NFepQLvQTbjXgj1celb\nU86CCeJzYengTF0ZE9Ra+/SsRTA+oy0fNLChNMc2DBaybccxwV2rNWvlvPdhfB7M\nsel3sw/x2hsbWoYC/kudzYmoDPZKX+XOhCkFwUgwib8V4hbjVLcOYsPBJcROYpRh\n9d5g7xdRlbF1I7dHsCRKnsvkIONtwKQmJ2v/UPqYahjtm2TPUQIDAQABoAAwDQYJ\nKoZIhvcNAQELBQADggEBAFEHOsN2SkB3qFBMk9JR5IDoh8rSUKj/310DOwilOQm+\n5lAwRfcFMYCl9yf4IV+XPPfvT3ahzUFfi8Fc98CDeIxAhEwtuZFlE7LA5+/F4HXM\nH3gzqTFwOZq+Wa2m029/BvcyII830h4Z+gU68R52px7O7wYSbAR/n7t1fh2bxzmW\nKqqjrvCpHoMVpgcm9y2bYTj+HLxgX4/uADFvotQppOWZi0ctam+if3Kqb3Kd2MFD\nvVHZp9NwEoqNPxmFEzcyOk2y1PYhhRja7rjdC6bdAqj6JRt+WSzStvgx7aEsxBQj\nrJCMi+GypGf9xQUfCJBhTDQVQ3fmCKTfddDeeVbJBrA=\n-----END CERTIFICATE REQUEST-----",
    "size_bytes": 704,
    "format": "PEM",
    "is_valid": true,
    "security_assessment": {
      "is_weak_key": false,
      "is_deprecated_signature": false,
      "key_strength": "acceptable"
    }
  }
}
```

## Use cases

- **CSR Validation** — Validate Certificate Signing Requests before certificate issuance to ensure proper formatting and required fields
- **Information Extraction** — Extract subject information, public key details, and signature algorithms from certificate requests for processing
- **Certificate Management** — Build certificate management systems with automated CSR parsing and validation capabilities
- **SSL/TLS Automation** — Automate SSL/TLS certificate workflows including CSR generation validation, certificate issuance, and renewal processes

## SDKs

- **npm** — `npm install @apiverve/csrparser` (https://www.npmjs.com/package/@apiverve/csrparser)
- **NuGet** — `dotnet add package APIVerve.API.CSRParser` (https://www.nuget.org/packages/APIVerve.API.CSRParser)
- **Source** — https://github.com/apiverve/csrparser-api

## More

- Full reference: https://docs.apiverve.com/ref/csrparser
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
