> ## Documentation Index
> Fetch the complete documentation index at: https://docs.basaltic.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke certificate

> Request revocation through the platform CA and flip the
certificate to revoked. Async — returns 202 with the cert in
its previous state; poll GET until status=revoked.

Uploaded certs are revoked locally without contacting the CA.
Re-revoking an already-revoked cert is a no-op.




## OpenAPI

````yaml /api-reference/specs/certificate.yaml post /v1/certificates/{certificate_id}/revoke
openapi: 3.0.3
info:
  title: Basaltic Certificate API
  version: 1.0.0
  description: |
    TLS certificates for load balancer listeners and platform endpoints —
    issue, inspect, retrieve material and revoke.
  contact:
    name: Basaltic Support
    email: ping@basaltic.sh
  license:
    name: Proprietary
    url: https://basaltic.sh/terms
servers:
  - url: https://certificate.{region}.basaltic.sh
    description: Regional API endpoint
    variables:
      region:
        default: sa-saopaulo-1
        description: Region code
security:
  - SignatureAuth: []
paths:
  /v1/certificates/{certificate_id}/revoke:
    post:
      tags:
        - Certificates
      summary: Revoke certificate
      description: |
        Request revocation through the platform CA and flip the
        certificate to revoked. Async — returns 202 with the cert in
        its previous state; poll GET until status=revoked.

        Uploaded certs are revoked locally without contacting the CA.
        Re-revoking an already-revoked cert is a no-op.
      operationId: revokeCertificate
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
        - $ref: '#/components/parameters/CertificateId'
      responses:
        '202':
          description: Revocation initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CertificateResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - SignatureAuth: []
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: >-
        Optional client-generated key that makes a create replay-safe. Retrying
        a request with the same key returns the original outcome verbatim
        instead of creating a duplicate resource. Reusing a key with a different
        request body is rejected (422); a request whose key is still being
        processed returns 409. Records are honored for 24 hours. Use a UUID or
        similarly unique token.
      required: false
      schema:
        type: string
        maxLength: 255
      example: 550e8400-e29b-41d4-a716-446655440000
    CertificateId:
      name: certificate_id
      in: path
      description: Certificate ID
      required: true
      schema:
        type: string
        format: uuid
      example: 550e8400-e29b-41d4-a716-446655440000
  schemas:
    CertificateResponse:
      type: object
      properties:
        certificate:
          $ref: '#/components/schemas/Certificate'
    Certificate:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
        crn:
          type: string
          readOnly: true
          description: >-
            Name-based, so an IAM policy can wildcard a naming convention
            (`crn:certificate::my-account:certificate/prod-*`). The region slot
            is empty — certs are not region-bound.
          example: crn:certificate::my-account:certificate/prod-frontend
        name:
          type: string
          example: prod-frontend
        domains:
          type: array
          items:
            type: string
          example:
            - example.com
            - www.example.com
            - api.example.com
        status:
          $ref: '#/components/schemas/CertificateStatus'
        source:
          $ref: '#/components/schemas/CertificateSource'
        key_algorithm:
          $ref: '#/components/schemas/CertificateKeyAlgorithm'
        challenges:
          type: array
          items:
            $ref: '#/components/schemas/CertificateChallenge'
          description: |
            Per-domain CNAME delegation state — one entry per domain on
            the cert. While status=pending_dns issuance waits for every
            challenge's `verified` to flip true; use `expected_cname` and
            `our_dns` to tell which records need to be added at the
            registrar.
        certificate_pem:
          type: string
          description: PEM-encoded leaf certificate. Empty until active.
          example: |
            -----BEGIN CERTIFICATE-----
            MIIDdzCCAl+gAwIBAgIEAaH...
            -----END CERTIFICATE-----
        chain_pem:
          type: string
          description: PEM-encoded intermediate chain.
          example: |
            -----BEGIN CERTIFICATE-----
            MIIEFzCCAv+gAwIBAgIEBb2...
            -----END CERTIFICATE-----
        fingerprint:
          type: string
          readOnly: true
          description: >
            Hex SHA-256 of the leaf's DER — the certificate's material version.
            Changes on every rotation; consumers use it to know when to re-fetch
            material and to verify they fetched the intended generation. Empty
            until the cert has a leaf.
          example: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2
        issued_at:
          type: string
          format: date-time
          readOnly: true
          example: '2026-01-15T09:30:00Z'
        expires_at:
          type: string
          format: date-time
          readOnly: true
          example: '2026-04-15T09:30:00Z'
        error_message:
          type: string
          description: Last failure reason (set when status=error).
          example: DNS challenge did not propagate before the deadline
        tags:
          $ref: '#/components/schemas/Tags'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: Error code identifying the type of error
              example: INVALID_INPUT
            message:
              type: string
              description: Human-readable error message
              example: Invalid request parameters
            request_id:
              type: string
              format: uuid
              description: Request ID for debugging
              example: 550e8400-e29b-41d4-a716-446655440000
    CertificateStatus:
      type: string
      enum:
        - pending_dns
        - pending
        - active
        - error
        - expired
        - revoked
      example: active
    CertificateSource:
      type: string
      enum:
        - acme
        - uploaded
      example: acme
    CertificateKeyAlgorithm:
      type: string
      enum:
        - ecdsa-p256
        - ecdsa-p384
        - rsa-2048
        - rsa-4096
      default: ecdsa-p256
    CertificateChallenge:
      type: object
      properties:
        domain:
          type: string
          description: The cert SAN this challenge belongs to (as the customer wrote it).
          example: '*.example.com'
        cname_record_name:
          type: string
          description: |
            Full LHS of the CNAME record the customer needs to add. For
            wildcard SANs this is the parent name
            (`_acme-challenge.example.com.`), not the literal SAN —
            wildcards validate at their parent under RFC 8555 §8.4.
          example: _acme-challenge.example.com.
        expected_cname:
          type: string
          description: |
            Target FQDN (RHS of the CNAME). Hosted in the platform's
            validation zone, where the per-order TXT is published during
            issuance.
          example: a1b2c3d4e5f6g7h8.acme.cloud.bycoded.dev.
        our_dns:
          type: boolean
          description: |
            True when the domain is hosted on the platform DNS service and
            the CNAME was created automatically. False means the customer
            owns the zone and must add the CNAME at their registrar.
          example: true
        verified:
          type: boolean
          description: |
            True once the CNAME has resolved to expected_cname; cert
            issuance only proceeds when every challenge is verified.
          example: true
        verified_at:
          type: string
          format: date-time
          readOnly: true
          example: '2026-01-15T09:28:00Z'
        error_message:
          type: string
          description: |
            Last verification failure (e.g. "CNAME = foo, want bar").
            Cleared when the challenge eventually verifies.
    Tags:
      type: object
      additionalProperties:
        type: string
      example:
        environment: production
        team: backend
  responses:
    Unauthorized:
      description: Authentication required or token invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Authentication required
              request_id: 550e8400-e29b-41d4-a716-446655440000
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: ACCESS_DENIED
              message: You don't have permission to perform this action
              request_id: 550e8400-e29b-41d4-a716-446655440000
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: NOT_FOUND
              message: Resource not found
              request_id: 550e8400-e29b-41d4-a716-446655440000
    Conflict:
      description: Resource conflict (e.g., already exists, invalid state)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: CONFLICT
              message: Resource with this name already exists
              request_id: 550e8400-e29b-41d4-a716-446655440000
    UnprocessableEntity:
      description: |
        The request is well-formed but cannot be processed as sent. On the
        operations that accept `Idempotency-Key` this is the key-reuse case: the
        key was first seen with a different request payload, so replaying the
        stored outcome would answer a question the caller did not ask.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: IDEMPOTENCY_KEY_REUSED
              message: >-
                This Idempotency-Key was already used with a different request
                payload
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INTERNAL_ERROR
              message: An internal error occurred
              request_id: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    SignatureAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >
        Request signing with an access key issued to a service account. An

        HMAC-SHA256 over a canonical form of the request, close to AWS SigV4.

        The `basaltic` CLI signs for you.


        Send `Authorization`, `X-Date` (UTC, `YYYYMMDDTHHMMSSZ`) and `X-Nonce`

        (random per request); add `X-Content-Sha256` to bind a body, and

        `X-Amz-Security-Token` when using temporary credentials.


        ```

        Authorization: BASALTIC-HMAC-SHA256
        Credential=<access_key_id>/<date>/<region>/basaltic/basaltic_request,
        SignedHeaders=host;x-date;x-nonce, Signature=<hex>

        ```


        `<region>` is the region code you are calling, or `global` for the
        global

        services. A signature is valid for 5 minutes from `X-Date`, and mutating

        requests are replay-guarded on the nonce.


        **Full signing procedure, including a working implementation:**

        https://docs.basaltic.sh/authentication


        ## Rate limits

        There is no global request budget. A limit applies only where an

        operation documents a `429`, and that operation says what it counts.

        Those responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining`,

        `X-RateLimit-Reset` and, on a `429`, `Retry-After` — read them rather

        than hard-coding a number. Retrying before `Retry-After` is refused and

        extends the window. Everything else is bounded by quota, not by request

        rate.

````