{"id":737,"date":"2026-10-24T10:40:14","date_gmt":"2026-10-24T15:40:14","guid":{"rendered":"https:\/\/archietechnology.com\/ayuda\/guia\/crear-y-proteger-una-clave-de-api\/"},"modified":"2026-10-24T10:40:14","modified_gmt":"2026-10-24T15:40:14","slug":"crear-y-proteger-una-clave-de-api","status":"publish","type":"ayuda","link":"https:\/\/archietechnology.com\/en\/ayuda\/guia\/crear-y-proteger-una-clave-de-api\/","title":{"rendered":"Create and protect an API key"},"content":{"rendered":"<p><!-- Archie Send \u00b7 Integraciones \u00b7 Estado: borrador (sin publicar; pasos a\u00fan sin verificar en pantalla) \u00b7 P\u00fablico: administrador del cliente \u00b7 Plan: Todos --><\/p>\n<h2>What you'll achieve<\/h2>\n<p>Create a key so another tool (your website, your CRM, your automation) can connect to your Archie Send account, and protect it with an expiration date, a request limit and the IP addresses it can be used from.<\/p>\n<h2>Before you start<\/h2>\n<ul>\n<li>Sign in with a user who can manage users (for example, Administrator).<\/li>\n<li>Decide what the other tool needs to do (only read contacts, add contacts, send transactional emails&#8230;). First create a role with <strong>only<\/strong>\u00a0those permissions in <strong>Users \u2192 User roles<\/strong>: a key can only do what its role allows.<\/li>\n<\/ul>\n<h2>Step 1: create the key<\/h2>\n<ol>\n<li>Go to <strong>Users \u2192 Users<\/strong>\u00a0and click <strong>New<\/strong>.<\/li>\n<li>Choose the type <strong>API<\/strong>, enter a username (for example, online-store) and select the role from the previous step.<\/li>\n<li>Click <strong>Save<\/strong>.<\/li>\n<li>Copy the key that appears. <strong>It's only shown once<\/strong>: save it in your password manager. If you lose it, create another key.<\/li>\n<\/ol>\n<p><span class=\"ay-captura\">Screenshot: window with the API key shown only once<\/span><\/p>\n<h2>Step 2: set limits on the key<\/h2>\n<ol>\n<li>In <strong>Users \u2192 Users<\/strong>, open the key (pencil).<\/li>\n<li>In <strong>Limits for this key<\/strong>\u00a0set:<\/li>\n<\/ol>\n<ul>\n<li><strong>Requests per minute:<\/strong>\u00a0between 10 and 1,200. The default is 120.<\/li>\n<li><strong>Expires on:<\/strong>\u00a0a date. The key stops working at the end of that day (Colombia time). Empty = doesn't expire.<\/li>\n<li><strong>Allowed IP addresses:<\/strong>\u00a0one per line (ranges like 10.0.0.0\/8 too). Empty = from any address.<\/li>\n<\/ul>\n<ol>\n<li>Click <strong>Save<\/strong>. Changes take effect immediately.<\/li>\n<\/ol>\n<p><span class=\"ay-captura\">Screenshot: &#8220;Limits for this key&#8221; section with usage for the last 30 days<\/span><\/p>\n<h2>How to use it<\/h2>\n<p>Send the key with every request in the header Authorization: token USER:KEY, where USER is the key's username.<\/p>\n<h2>Expected result<\/h2>\n<ul>\n<li>The user list shows, under each key, when it was last used and when it expires.<\/li>\n<li>In the key you see the requests and errors for the last 30 days.<\/li>\n<\/ul>\n<h2>Common issues<\/h2>\n<details>\n<summary>The API responds 429<\/summary>\n<p>The key exceeded its per-minute limit. Wait the time shown in the Retry-After header or raise the limit.<\/p>\n<\/details>\n<details>\n<summary>The API responds 403 &#8220;The API key has expired&#8221;<\/summary>\n<p>Change the expiration date or create a new key.<\/p>\n<\/details>\n<details>\n<summary>403 &#8220;This key can't be used from the address&#8230;&#8221;<\/summary>\n<p>Add your server's IP to the list or empty the list. If your server changes IP often, don't use this option.<\/p>\n<\/details>\n<details>\n<summary>I lost the key<\/summary>\n<p>It can't be recovered. Create another one and deactivate the old one.<\/p>\n<\/details>\n<details>\n<summary>Lots of errors in usage<\/summary>\n<p>Check that the key has the necessary permissions and that the other tool sends valid data.<\/p>\n<\/details>\n<h2>When to contact support<\/h2>\n<p>If you think someone used your key without permission, deactivate it immediately and write to us with the key's username and the approximate time (never send the key).<\/p>","protected":false},"excerpt":{"rendered":"<p>Create a key so another tool (your website, your CRM, your automation) can connect to your Archie Send account, and protect it with an expiration date, a request limit and the IP addresses it can be used from.<\/p>","protected":false},"featured_media":0,"menu_order":39,"template":"","meta":{"ay_popular":0,"footnotes":""},"ayuda_seccion":[29,69],"class_list":["post-737","ayuda","type-ayuda","status-publish","hentry","ayuda_seccion-archie-send","ayuda_seccion-send-integraciones-y-api"],"_links":{"self":[{"href":"https:\/\/archietechnology.com\/en\/wp-json\/wp\/v2\/ayuda\/737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archietechnology.com\/en\/wp-json\/wp\/v2\/ayuda"}],"about":[{"href":"https:\/\/archietechnology.com\/en\/wp-json\/wp\/v2\/types\/ayuda"}],"version-history":[{"count":0,"href":"https:\/\/archietechnology.com\/en\/wp-json\/wp\/v2\/ayuda\/737\/revisions"}],"wp:attachment":[{"href":"https:\/\/archietechnology.com\/en\/wp-json\/wp\/v2\/media?parent=737"}],"wp:term":[{"taxonomy":"ayuda_seccion","embeddable":true,"href":"https:\/\/archietechnology.com\/en\/wp-json\/wp\/v2\/ayuda_seccion?post=737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}