API Key Created Successfully!

Your new API key has been generated and is ready to use.

Important: Save this key now!

This is the only time you'll be able to see the full API key. Make sure to copy it and store it securely. If you lose it, you'll need to generate a new key.

Your New API Key

<%= @raw_key %>

API Key Details

Name
<%= @api_key.name %>
Key Prefix
<%= @api_key.key_prefix %>...
Permissions
<% perms = @api_key.permissions || {} %> <% perms = {} unless perms.is_a?(Hash) %> <% perms.select { |_, v| v }.keys.each do |perm| %> <%= perm.to_s.humanize %> <% end %>
Expiration
<% if @api_key.expires_at %>
<%= @api_key.expires_at.strftime("%B %d, %Y at %l:%M %p") %>
<% else %> Never expires <% end %>
Status
Active
Created
<%= @api_key.created_at.strftime("%B %d, %Y at %l:%M %p") %>
<%= link_to admin_api_keys_path, class: "inline-flex items-center gap-2 rounded-lg bg-gray-100 px-6 py-3 text-sm font-semibold text-gray-700 hover:bg-gray-200 transition-all duration-200" do %> Back to API Keys <% end %>