import { CardGrid, LinkCard } from '@astrojs/starlight/components';

An API key is a secret credential that lets you call the Platform's REST API **from your own code** (a
script, a backend, an external CRM…) without going through the login form: instead of email and password,
your integration sends the key on every HTTP request. It's the mechanism meant for **M2M integrations**
(machine-to-machine) — automations, syncs with other systems, your business's internal scripts — never for
a person to log into the Platform's own interface with it.

<CardGrid>
  <LinkCard
    title="What API keys are and what they're for"
    description="An API key is a secret credential that lets you call the Platform's REST API from your own code (a script, a backend, an external CRM…) without going through the login form: instea"
    href="/en/guides/claves-api/01-que-son-las-claves-de-api-y-para-que-sirven/"
  />
  <LinkCard
    title="The two key types"
    description="The Platform distinguishes two key types by their owner."
    href="/en/guides/claves-api/02-los-dos-tipos-de-clave/"
  />
  <LinkCard
    title="Prerequisites"
    description="Your agency's active subscription (a key on an account blocked for billing can't be used — the same"
    href="/en/guides/claves-api/03-requisitos-previos/"
  />
  <LinkCard
    title="Procedure: create a personal key"
    description="Requirements: none in particular — any role can create keys for themselves."
    href="/en/guides/claves-api/04-procedimiento-crear-una-clave-personal/"
  />
  <LinkCard
    title="Procedure: create a company key"
    description="Requirements: Admin role."
    href="/en/guides/claves-api/05-procedimiento-crear-una-clave-de-la-empresa/"
  />
  <LinkCard
    title="Allowed origins"
    description="Every key has an optional list of allowed origins: the domains (hostnames) it's accepted from when the request arrives with an Origin header (that is, from a browser)."
    href="/en/guides/claves-api/06-origenes-permitidos/"
  />
  <LinkCard
    title="What each key can do: permissions and the &quot;Customize&quot; picker"
    description="No key carries &quot;à la carte&quot; permissions by default: it inherits an already-defined set of permissions, sealed the moment it's created (section 2)."
    href="/en/guides/claves-api/07-que-puede-hacer-cada-clave-permisos-y-el-picker-personalizar/"
  />
  <LinkCard
    title="Expiration"
    description="When you create the key you choose how long it lasts: Never, 30, 90 or 365 days."
    href="/en/guides/claves-api/08-expiracion/"
  />
  <LinkCard
    title="Revocation"
    description="There's no &quot;delete&quot; for a key: only revoke."
    href="/en/guides/claves-api/09-revocacion/"
  />
  <LinkCard
    title="Usage: authenticating with X-API-Key"
    description="Once you have the key, authenticate every request by adding the X-API-Key header with the key's full value."
    href="/en/guides/claves-api/10-uso-autenticacion-con-x-api-key/"
  />
  <LinkCard
    title="Request limits (rate limit)"
    description="Besides the general limits already applied to any request (per tenant, per user or per IP, depending on the case), every request that includes the X-API-Key header gets an addition"
    href="/en/guides/claves-api/11-limites-de-peticiones-rate-limit/"
  />
  <LinkCard
    title="Common errors and how to fix them"
    description="Code · When it happens · What to do"
    href="/en/guides/claves-api/12-errores-comunes-y-su-solucion/"
  />
  <LinkCard
    title="Custody best practices"
    description="Don't share it over chat, unencrypted email, or paste it anywhere public."
    href="/en/guides/claves-api/13-buenas-practicas-de-custodia/"
  />
  <LinkCard
    title="Frequently asked questions"
    description="Can I have several personal keys at once?"
    href="/en/guides/claves-api/14-preguntas-frecuentes/"
  />
</CardGrid>