<.settings_tiles> <.tile docs="stats-api" current_user={@current_user} current_team={@current_team} feature_mod={Plausible.Billing.Feature.StatsAPI} > <:title> API keys <:subtitle :if={not Enum.empty?(@api_keys)}> Create and manage access. <%= if Enum.empty?(@api_keys) do %>

Create your first API key

Access your stats through the Plausible API. <.styled_link href="https://plausible.io/docs/stats-api">Learn more

<.button_link href={Routes.settings_path(@conn, :new_api_key)}> New API Key
<% else %> <.filter_bar filtering_enabled?={false}> <.button_link mt?={false} href={Routes.settings_path(@conn, :new_api_key)}> New API Key <.table rows={@api_keys}> <:thead> <.th> Name <.th hide_on_mobile> Key <.th :if={ee?()} hide_on_mobile> Type <.th invisible> Actions <:tbody :let={api_key}> <.td truncate max_width="max-w-40"> {api_key.name} <.td hide_on_mobile> {api_key.key_prefix} {String.duplicate("*", 32 - 6)} <.td :if={ee?()}> Stats API Sites API <.td actions> <.delete_button method="delete" href={Routes.settings_path(@conn, :delete_api_key, api_key.id)} data-confirm="Are you sure you want to revoke this key? This action cannot be reversed." /> <% end %>