Project

autentique

0.0
The project is in a healthy, maintained state
A Ruby gem for integrating with Autentique's document signing service via their GraphQL API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

 Project Readme

Autentique Ruby Gem

A Ruby client for the Autentique digital signature API. This gem provides a clean, idiomatic interface to Autentique's GraphQL API for document signing and management.

CI Security Gem Version Ruby

Features

  • 🔐 Simple Authentication — Easy API key configuration
  • 📄 Document Management — Create, retrieve, list, and delete documents
  • ✍️ Flexible Signing — Multiple signers with various authentication methods
  • 📁 Folder Management — Organize documents in folders
  • 🪝 Webhook Processing — Verify and process incoming Autentique webhook events
  • 🏖️ Sandbox Mode — Test without consuming document credits
  • 🛡️ Type Safety — Model classes for structured data

Installation

Add to your Gemfile:

gem 'autentique'

Then run bundle install, or install directly with gem install autentique.

Quick Start

client = Autentique::Client.new(api_key: ENV['AUTENTIQUE_API_KEY'])

# Create a document
document = client.documents.create(
  file: '/path/to/contract.pdf',
  document: { name: 'Employment Contract' },
  signers: [{ email: 'employee@example.com', action: 'SIGN' }]
)

puts document.id
puts document.signatures.first.short_link

# Retrieve a document
doc = client.documents.find('document-uuid')
puts doc.signed? ? 'Signed' : 'Pending'

# Process an incoming webhook
processor = Autentique::WebhookProcessor.new(
  request.body.read,
  secret: ENV['AUTENTIQUE_WEBHOOK_SECRET'],
  signature: request.headers['X-Autentique-Signature']
)

processor.process do |event_type, data|
  puts "#{event_type}: #{data['id']}"
end

Configuration

Environment variable

client = Autentique::Client.new(api_key: ENV['AUTENTIQUE_API_KEY'])

Global configuration (recommended for Rails)

Autentique.configure do |config|
  config.api_key = Rails.application.credentials.dig(:autentique, :api_key)
  config.sandbox = Rails.env.development? || Rails.env.test?
end

client = Autentique.client

Rails initializer

Create config/initializers/autentique.rb:

Autentique.configure do |config|
  config.api_key = Rails.application.credentials.dig(:autentique, :api_key)
  config.sandbox = Rails.env.development? || Rails.env.test?
end

Error Handling

begin
  document = client.documents.create(...)
rescue Autentique::AuthenticationError => e
  # Invalid or missing API key
rescue Autentique::RateLimitError => e
  # 60 requests/minute limit exceeded
rescue Autentique::ValidationError => e
  # Invalid input
rescue Autentique::QueryError => e
  # GraphQL query failed — e.errors contains details
rescue Autentique::UploadError => e
  # File upload failed
rescue Autentique::InvalidSignatureError => e
  # Webhook signature verification failed
rescue Autentique::WebhookError => e
  # Unknown webhook event type or processing error
rescue Autentique::Error => e
  # Base class for all gem errors
end

Documentation

Testing

bundle exec rspec
COVERAGE=true bundle exec rspec

Development

git clone https://github.com/keithyoder/autentique-ruby.git
cd autentique-ruby
bundle install
bundle exec rspec
gem build autentique.gemspec

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -am 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

Resources

License

Available as open source under the MIT License.

Acknowledgments

This gem is not officially maintained by Autentique. It is a community-driven project to simplify Ruby integration with the Autentique API.

Support

Changelog

See CHANGELOG.md.