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.
- π 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
Add to your Gemfile:
gem 'autentique'Then run bundle install, or install directly with gem install autentique.
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']}"
endclient = Autentique::Client.new(api_key: ENV['AUTENTIQUE_API_KEY'])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.clientCreate 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?
endbegin
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- Documents β creating, retrieving, listing, deleting, and rejecting documents
- Folders β folder management
- Webhooks β processing incoming webhook events
- Configuration Reference β all document and signer options
bundle exec rspec
COVERAGE=true bundle exec rspecgit clone https://github.com/keithyoder/autentique-ruby.git
cd autentique-ruby
bundle install
bundle exec rspec
gem build autentique.gemspec- Fork the repository
- Create your feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -am 'Add my feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
Available as open source under the MIT License.
This gem is not officially maintained by Autentique. It is a community-driven project to simplify Ruby integration with the Autentique API.
- π Report bugs
- π¬ Ask questions
See CHANGELOG.md.