signdocs-com-br Signing API

Preparação e conclusão de assinatura digital com certificado ICP-Brasil A1.

Operations 2

POST /v1/transactions/{transactionId}/signing/prepare Preparar assinatura digital #
POST /v1/transactions/{transactionId}/signing/complete Concluir assinatura digital #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/signdocs-com-br:signdocs-com-br-signing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

signdocs-com-br-signing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Signdocs Com Br Signing API
  version: 1.4.0
  contact:
    name: SignDocs Brasil API Support
    email: suporte@signdocs.com.br
  license:
    name: Proprietary
    url: https://www.signdocs.com.br/termos-de-uso.html
  description: 'Operations tagged Signing across 2 of this provider''s published API definitions: openapi.yaml, signdocs-com-br-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.signdocs.com.br
  description: Produção
- url: https://api-hml.signdocs.com.br
  description: Homologação
- url: https://mtls-api.signdocs.com.br
  description: Produção (mTLS)
- url: https://mtls-api-hml.signdocs.com.br
  description: Homologação (mTLS)
security:
- bearerJwt: []
tags:
- name: Signing
  description: Preparação e conclusão de assinatura digital com certificado ICP-Brasil A1.
paths:
  /v1/transactions/{transactionId}/signing/prepare:
    post:
      operationId: prepareSigning
      tags:
      - Signing
      summary: Preparar assinatura digital
      description: 'Prepara o documento para assinatura digital com certificado ICP-Brasil A1.

        Retorna o hash que deve ser assinado pelo certificado do cliente.


        O cliente deve enviar a cadeia de certificados PEM para que o servidor

        prepare o placeholder no PDF (para documentos PDF) ou compute o hash

        do arquivo inteiro (para documentos genéricos — CAdES .p7s com conteúdo anexado).


        O formato é determinado automaticamente pelo `documentFormat` da transação,

        definido no momento do upload do documento.


        Requer scope `transactions:write`.'
      security:
      - bearerJwt: []
      parameters:
      - name: transactionId
        in: path
        required: true
        description: Identificador único da transação.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrepareSigningRequest'
      responses:
        '200':
          description: Hash para assinatura gerado com sucesso.
          headers:
            Strict-Transport-Security:
              $ref: '#/components/headers/Strict-Transport-Security'
            X-Content-Type-Options:
              $ref: '#/components/headers/X-Content-Type-Options'
            X-Frame-Options:
              $ref: '#/components/headers/X-Frame-Options'
            Referrer-Policy:
              $ref: '#/components/headers/Referrer-Policy'
            Cache-Control:
              $ref: '#/components/headers/Cache-Control'
            API-Version:
              $ref: '#/components/headers/API-Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrepareSigningResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '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'
    servers:
    - url: https://api.signdocs.com.br
      description: Produção
    - url: https://api-hml.signdocs.com.br
      description: Homologação
    - url: https://mtls-api.signdocs.com.br
      description: Produção (mTLS)
    - url: https://mtls-api-hml.signdocs.com.br
      description: Homologação (mTLS)
  /v1/transactions/{transactionId}/signing/complete:
    post:
      operationId: completeSigning
      tags:
      - Signing
      summary: Concluir assinatura digital
      description: 'Submete a assinatura digital bruta (raw signature) gerada pelo certificado A1 do cliente.


        - Para documentos PDF: o servidor injeta a assinatura no PDF (PAdES).

        - Para documentos genéricos: o servidor gera um arquivo `.p7s` CAdES com o conteúdo do documento anexado (enveloping).


        Conclui a etapa `DIGITAL_SIGN_A1`.


        **Carimbo do tempo (opcional, por contrato):** com o recurso habilitado no tenant, o servidor

        solicita um carimbo do tempo RFC 3161 a uma Autoridade de Carimbo do Tempo (ACT) credenciada na

        ICP-Brasil sobre o valor da assinatura e o embute nela (atributo não assinado

        `id-aa-signatureTimeStampToken`, PAdES-B-T / CAdES-T). A resposta traz então

        `result.digitalSignature.signatureTimestamp`. Se a ACT estiver indisponível, a resposta é `503`

        com `code: TIMESTAMP_UNAVAILABLE`: a solicitação de assinatura continua pendente e pode ser

        reenviada com a mesma `rawSignatureBase64` até expirar.


        Requer scope `transactions:write`.'
      security:
      - bearerJwt: []
      parameters:
      - name: transactionId
        in: path
        required: true
        description: Identificador único da transação.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteSigningRequest'
      responses:
        '200':
          description: Assinatura digital concluída com sucesso.
          headers:
            Strict-Transport-Security:
              $ref: '#/components/headers/Strict-Transport-Security'
            X-Content-Type-Options:
              $ref: '#/components/headers/X-Content-Type-Options'
            X-Frame-Options:
              $ref: '#/components/headers/X-Frame-Options'
            Referrer-Policy:
              $ref: '#/components/headers/Referrer-Policy'
            Cache-Control:
              $ref: '#/components/headers/Cache-Control'
            API-Version:
              $ref: '#/components/headers/API-Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SigningCompleteResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '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'
        '503':
          description: 'Carimbo do tempo indisponível (`code: TIMESTAMP_UNAVAILABLE`, `retryable: true`). Só ocorre em

            tenants com carimbo do tempo habilitado. A solicitação de assinatura continua pendente: reenvie

            a mesma assinatura após `Retry-After` segundos.

            '
          headers:
            Retry-After:
              description: Segundos a aguardar antes de reenviar.
              schema:
                type: integer
                example: 30
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
              example:
                type: https://api.signdocs.com.br/errors/service-unavailable
                title: Service Unavailable
                status: 503
                detail: O serviço de carimbo do tempo está indisponível no momento. Tente assinar novamente em instantes.
                code: TIMESTAMP_UNAVAILABLE
                retryable: true
    servers:
    - url: https://api.signdocs.com.br
      description: Produção
    - url: https://api-hml.signdocs.com.br
      description: Homologação
    - url: https://mtls-api.signdocs.com.br
      description: Produção (mTLS)
    - url: https://mtls-api-hml.signdocs.com.br
      description: Homologação (mTLS)
components:
  headers:
    X-Content-Type-Options:
      description: Prevenção de MIME sniffing.
      schema:
        type: string
        example: nosniff
    Referrer-Policy:
      description: Política de referrer.
      schema:
        type: string
        example: strict-origin-when-cross-origin
    Strict-Transport-Security:
      description: Política HSTS.
      schema:
        type: string
        example: max-age=31536000; includeSubDomains
    API-Version:
      description: Versão da API.
      schema:
        type: string
        example: '1.0'
    X-Frame-Options:
      description: Prevenção de clickjacking.
      schema:
        type: string
        example: DENY
    Cache-Control:
      description: Controle de cache.
      schema:
        type: string
        example: no-store
  responses:
    Unauthorized:
      description: Autenticação ausente ou inválida.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
          example:
            type: https://api.signdocs.com.br/errors/unauthorized
            title: Unauthorized
            status: 401
            detail: Invalid or missing authentication
    InternalServerError:
      description: Erro interno do servidor.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
          example:
            type: https://api.signdocs.com.br/errors/internal-server-error
            title: Internal Server Error
            status: 500
    Forbidden:
      description: 'Permissões insuficientes para a operação solicitada.


        Inclui `purpose: "ACTION_AUTHENTICATION"` sem `featureFlags.trustSessionsEnabled`. A

        verificação é pelo `purpose`, não pela rota: vale em `/v1/transactions`,

        `/v1/signing-sessions` e `/v1/envelopes/{envelopeId}/sessions`, além de `/v1/trust-sessions`.

        O remédio é habilitar a flag para o tenant e provisionar a cota `monthlyTrustSessions`.

        '
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
          example:
            type: https://api.signdocs.com.br/errors/forbidden
            title: Forbidden
            status: 403
            detail: Insufficient permissions
    Conflict:
      description: Conflito de estado — a operação não pode ser realizada no estado atual do recurso.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
          example:
            type: https://api.signdocs.com.br/errors/conflict
            title: Conflict
            status: 409
            detail: Transaction already finalized
    UnprocessableEntity:
      description: 'Entidade não processável — a requisição é sintaticamente válida mas semanticamente incorreta.


        Inclui o perfil de política não autorizado para o tenant. As rotas de criação

        (`/v1/transactions`, `/v1/signing-sessions` e `/v1/envelopes/{envelopeId}/sessions`)

        verificam a mesma regra, antes de cota, convite e gravação — a recusa não consome

        documento. As flags envolvidas são `featureFlags.customPolicyEnabled` (perfil `CUSTOM`),

        `serpro.enabled` (perfis SERPRO), `featureFlags.documentExtractionEnabled` (fallback por

        documento; `BIOMETRIC_SERPRO_AUTO_FALLBACK` exige as duas últimas) e

        `featureFlags.biometricRequired`. O remédio é habilitar a flag para o tenant.


        `signer.cpf` e `signer.birthDate`, exigidos pelos perfis SERPRO, são validados como

        **400** e não aqui: requisição malformada, corrigível na mesma chamada.

        '
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
          examples:
            generic:
              summary: Erro genérico de validação
              value:
                type: https://api.signdocs.com.br/errors/unprocessable-entity
                title: Unprocessable Entity
                status: 422
                detail: O documento deve ser um PDF válido.
            pdf-quality:
              summary: PDF com qualidade insuficiente
              value:
                type: https://api.signdocs.com.br/errors/pdf-quality-validation-failed
                title: PDF Quality Validation Failed
                status: 422
                detail: 'O PDF não atende aos critérios mínimos de qualidade: resolução insuficiente, páginas em branco ou arquivo corrompido.'
            policy-not-enabled:
              summary: Perfil de política não habilitado para o tenant
              value:
                type: https://api.signdocs.com.br/errors/unprocessable-entity
                title: Unprocessable Entity
                status: 422
                detail: SERPRO identity verification is not enabled for this tenant
            pdf-password-protected:
              summary: PDF protegido por senha
              value:
                type: https://api.signdocs.com.br/errors/pdf-password-protected
                title: PDF Password Protected
                status: 422
                detail: O PDF está protegido por senha e não pode ser processado. Envie um PDF sem proteção.
            feature-not-enabled:
              summary: Feature flag não habilitada
              value:
                type: https://api.signdocs.com.br/errors/feature-not-enabled
                title: Feature Not Enabled
                status: 422
                detail: A feature 'documentExtractionEnabled' não está habilitada para este tenant.
            geolocation-required:
              summary: Geolocalização obrigatória
              value:
                type: https://api.signdocs.com.br/errors/geolocation-required
                title: Geolocation Required
                status: 422
                detail: O campo 'geolocation' é obrigatório para etapas biométricas quando 'biometricRequired' está habilitado.
    NotFound:
      description: Recurso não encontrado.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
          example:
            type: https://api.signdocs.com.br/errors/not-found
            title: Not Found
            status: 404
            detail: Transaction not found
    BadRequest:
      description: Requisição inválida — parâmetros ausentes ou malformados.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
          example:
            type: https://api.signdocs.com.br/errors/bad-request
            title: Bad Request
            status: 400
            detail: O campo 'purpose' é obrigatório.
  schemas:
    PrepareSigningResponse:
      type: object
      description: Resposta de preparação para assinatura digital.
      required:
      - signatureRequestId
      - hashToSign
      - hashAlgorithm
      - signatureAlgorithm
      properties:
        signatureRequestId:
          type: string
          description: Identificador da requisição de assinatura.
        hashToSign:
          type: string
          description: Hash que deve ser assinado pelo certificado A1 do cliente.
        hashAlgorithm:
          type: string
          description: Algoritmo de hash utilizado.
          enum:
          - SHA-256
        signatureAlgorithm:
          type: string
          description: Algoritmo de assinatura esperado.
          enum:
          - RSASSA-PKCS1-v1_5
    SignatureTimestamp:
      type: object
      description: 'Carimbo do tempo ICP-Brasil embutido na assinatura (token RFC 3161 emitido por uma ACT

        credenciada, gravado como `id-aa-signatureTimeStampToken`). Presente apenas quando o recurso

        está habilitado no tenant. `signedAt` continua sendo a hora do servidor SignDocs; `genTime` é a

        hora atestada pela ACT.

        '
      required:
      - genTime
      - tsaName
      - serial
      - policyOid
      - tokenSha256
      properties:
        genTime:
          type: string
          format: date-time
          description: Data e hora atestadas pela ACT.
          example: '2026-10-05T19:58:39.066Z'
        tsaName:
          type: string
          description: Nome distinto (DN) do certificado do servidor de carimbo do tempo.
          example: C=BR, O=ICP-Brasil, OU=Certificado Carimbo de Tempo, CN=SERVIDOR DE CARIMBO DE TEMPO ACT SERPRO 50103
        serial:
          type: string
          description: Número de série do carimbo (hexadecimal).
          example: 78F42C1F9B1D36B9
        policyOid:
          type: string
          description: OID da política de carimbo do tempo ICP-Brasil.
          example: 2.16.76.1.6.2
        tokenSha256:
          type: string
          description: SHA-256 (hex) do token de carimbo do tempo, para conferência com o embutido no documento.
    SigningCompleteResponse:
      type: object
      description: 'Resposta de conclusão de assinatura digital.

        Para PDF: inclui `signedPdfHash` e `signatureFieldName`.

        Para genérico: inclui `signedP7sHash` e `documentFormat`.

        '
      required:
      - status
      - result
      properties:
        stepId:
          type: string
        status:
          type: string
          enum:
          - COMPLETED
        result:
          type: object
          required:
          - digitalSignature
          properties:
            digitalSignature:
              type: object
              properties:
                certificateSubject:
                  type: string
                certificateSerial:
                  type: string
                certificateIssuer:
                  type: string
                algorithm:
                  type: string
                  example: SHA256withRSA
                signedAt:
                  type: string
                  format: date-time
                signedPdfHash:
                  type: string
                  description: Hash SHA-256 do PDF assinado (apenas para documentos PDF).
                signatureFieldName:
                  type: string
                  description: Nome do campo de assinatura no PDF (apenas para documentos PDF).
                signedP7sHash:
                  type: string
                  description: Hash SHA-256 do arquivo .p7s (apenas para documentos genéricos).
                documentFormat:
                  type: string
                  description: Formato do documento assinado.
                  enum:
                  - pdf
                  - generic
                signatureTimestamp:
                  $ref: '#/components/schemas/SignatureTimestamp'
    ProblemDetail:
      type: object
      description: Formato de erro RFC 7807 Problem Details.
      required:
      - type
      - title
      - status
      properties:
        type:
          type: string
          format: uri
          description: URI que identifica o tipo de erro.
          example: https://api.signdocs.com.br/errors/bad-request
        title:
          type: string
          description: Resumo legível do tipo de erro.
          example: Bad Request
        status:
          type: integer
          description: Código de status HTTP.
          example: 400
        detail:
          type: string
          description: Explicação específica da ocorrência do erro.
          example: O campo 'purpose' é obrigatório.
        instance:
          type: string
          description: URI que identifica a ocorrência específica do erro (path da requisição).
          example: /v1/transactions
        code:
          type: string
          description: 'Código estável e legível por máquina para o caso específico, quando houver (ex.:

            `SIGNER_TURN`, `TIMESTAMP_UNAVAILABLE`). Prefira tratar o erro por `code` a interpretar `detail`.

            '
          example: TIMESTAMP_UNAVAILABLE
        retryable:
          type: boolean
          description: Presente quando a API afirma que reenviar a mesma requisição é seguro.
      additionalProperties: true
    PrepareSigningRequest:
      type: object
      description: Requisição de preparação para assinatura digital.
      required:
      - certificateChainPems
      properties:
        certificateChainPems:
          type: array
          description: Cadeia de certificados PEM do signatário (certificado do signatário primeiro).
          items:
            type: string
          minItems: 1
    CompleteSigningRequest:
      type: object
      description: Requisição de conclusão de assinatura digital.
      required:
      - signatureRequestId
      - rawSignatureBase64
      properties:
        signatureRequestId:
          type: string
          description: Identificador da requisição de assinatura (retornado por `/signing/prepare`).
        rawSignatureBase64:
          type: string
          description: Assinatura digital bruta codificada em base64.
  securitySchemes:
    bearerJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token de acesso OAuth2 obtido via `POST /oauth2/token`.
    embedToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Token de sessão (clientSecret) retornado por `POST /v1/signing-sessions`.

        Usado pelos endpoints advance/get/resend-otp para autenticar a sessão.

        Contém claims: sub (sessionId), tenantId, transactionId, purpose: signing_session_embed.

        '
x-refined-from:
- openapi.yaml
- signdocs-com-br-openapi.yaml