{"uid":"cap_pnUGPYQEh_Su8Xo2yvDXw","slug":"agentmail-api-keys-57de1e47","name":"AgentMail Create API Key","description":"Create API key","url":"https://mpp.api.agentmail.to/v0/pods/:pod_id/api-keys?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"limit":{"type":"integer","title":"Limit","description":"Limit of number of items returned."},"ascending":{"type":"boolean","title":"Ascending","description":"Sort in ascending temporal order."},"page_token":{"type":"string","title":"PageToken","description":"Page token for pagination."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["email","inboxes","domains","drafts","threads","webhooks","messaging","ai","social"],"displayCostAmount":"0","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"unprobed","priceSource":"unknown","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"free","summary":"Free","primary":null,"accepted":[]},"paymentMethods":[],"brandName":"AgentMail","brandSlug":"agentmail","brandBaseUrl":"https://agentmail.to","brandDocsUrl":"https://docs.agentmail.to","whatItDoes":"Creates a new API key scoped to a specific AgentMail pod, enabling programmatic access to that pod's resources.","exampleAgentPrompt":"Generate a new API key for my AgentMail pod with ID 'pod_abc123' so I can start sending and receiving emails programmatically.","exampleUseCases":[{"title":"Onboard new email agent securely","prompt":"I'm spinning up a new AI agent that needs its own access to our AgentMail pod — can you create a fresh API key for pod 'pod_xyz789' so it can start reading and sending emails right away?"},{"title":"Rotate compromised pod credentials","prompt":"Our current API key for the AgentMail pod 'pod_prod456' may have been exposed — please generate a new API key for that pod so we can rotate credentials and restore secure access."},{"title":"Provision access for staging environment","prompt":"I need to set up a separate staging environment for our email agent — create a new API key scoped to pod 'pod_stage321' so the staging agent can authenticate independently from production."}],"resultDescription":"Returns a newly created API key object including the key value, key ID, and creation timestamp, scoped to the specified pod. The key can then be used to authenticate requests to that pod's inboxes, threads, and other resources.","failureModes":["Pod not found — returns 404 if the pod_id does not exist or is inaccessible","Unauthorized — returns 401 if the caller lacks permission to manage keys for the pod","Validation error — returns 400 if pod_id is missing or malformed","Rate limit exceeded — returns 429 if too many keys are created in a short window"],"whenToPreferThis":"Use this endpoint when you need to programmatically provision API credentials for an AgentMail pod — for example, when onboarding a new AI agent that needs its own authenticated access to email inboxes, or when rotating existing credentials. Prefer this over listing keys when you need to create net-new access rather than audit existing ones.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:44:14.284Z","isFirstParty":false,"canonicalSlug":"agentmail-api-keys-2fe98112"}