@myagent.mx mailbox before a person joins the team. The agent completes a short proof-of-work check, registers the mailbox, reads and receives mail, asks Sendmux to invite the human owner, and uses owner-approved sending after the owner joins and grants it.
Pre-claim agent tokens include
mailbox.read and email.receive. They do
not include email.send.Default: save the agent credential bundle
When registering a new agent identity, immediately save the agent credential bundle in the safest secret store your environment provides before token exchange, owner invite, reporting success, or losing context. Later MCP, CLI, SDK, mailbox, and sending work depends on this bundle. Storeclaim_token, registration_id, mailbox.email, claim_token_expires, identity_assertion, token_endpoint, app_resource, and sending_resource. After token exchange, add the pre-claim smx_agent_ access token or keep identity_assertion available until the owner invite returns 202. If no secure store is available, ask the user where to store these credentials before continuing.
Success checklist
- Request a registration challenge.
- Solve the proof-of-work challenge.
- Register with
proof_of_work. - Immediately save the returned
claim_tokenand agent credential bundle in a secure store before token exchange. - Exchange the
identity_assertionfor ansmx_agent_access token. - Keep the
identity_assertionor pre-claim access token available until the owner invite returns202. - Call
/api/v1/mailbox/mewith that token. - Do not stop after pre-claim token success. Next required action: create an owner invite or ask the user for the owner email to invite.
- Do not poll the claim-token grant before the owner invite returns
202; after202, poll withclaim_tokenand handleauthorization_pendinguntil the owner approves sending.
Optional: install Sendmux skills
If your agent supports Skills, install the Sendmux pack before continuing.auth.md and this guide.
Critical ordering
claim_token is for the post-approval token exchange. Save it, but do not use it to invite the owner.
Use the identity_assertion to get a pre-claim smx_agent_ access token, then use that token for /api/v1/mailbox/me and POST /agent-auth/agent/identity/invite. Keep the identity_assertion or pre-claim token available until the invite returns 202.
If you lose both the identity_assertion and pre-claim token before inviting the owner, register a fresh agent identity and invite immediately in the same flow.
How it works
1
Discover the protected resource
Start from
https://app.sendmux.ai/auth.md, follow the auth.md link on
the human sign-up page, or call the Management API without credentials and
follow the WWW-Authenticate metadata hint.2
Request a registration challenge
Send the intended anonymous registration body to the challenge endpoint, then
solve the returned proof-of-work challenge.
3
Create an anonymous agent identity
Register with the same body and the solved proof payload to get an identity
assertion, a claim token, and a constrained agent mailbox.
4
Save the credential bundle
Store the agent credential bundle securely before any context is lost. The
agent needs it later for MCP, CLI, SDK, mailbox, and sending work.
5
Exchange the assertion
Use the JWT bearer grant to exchange the identity assertion for an
smx_agent_ access token. Keep the assertion or token available until the
owner invite succeeds.6
Verify the mailbox
Call
/api/v1/mailbox/me with the token before inviting the owner.7
Invite the owner or ask for the email
If you know the owner email, ask Sendmux to send the invite. If you do not
know it, ask:
What owner email should I invite for approval?8
Wait for owner approval
After the owner accepts, they can approve sending for the agent mailbox from
the Agent access card on the team page.
9
Exchange the claim token
Use the claim grant to request an app-resource token for mailbox work or a
Sending-resource token for the Sending API.
Discovery
Agents can read the human-readable service document first.auth.md link under
the Terms and Privacy line instead of filling in the form.
Agents can also start from a cold API request. Sendmux returns the protected-resource metadata URL in WWW-Authenticate:
/api/v1/mailbox and mailbox routes such as /api/v1/mailbox/me when the Bearer token is missing or invalid.
Fetch the protected-resource metadata, then follow its authorization_servers entry.
token_endpoint and revocation_endpoint at the top level. Its agent_auth block includes identity_endpoint, x_sendmux_proof_of_work_challenge_endpoint, x_sendmux_identity_invite_endpoint, and identity_types_supported. The proof-of-work extension points to the registration challenge endpoint. The invite field is the Sendmux-specific owner invite extension.
claim_endpoint. Human ownership uses the invite flow below instead of an OTP claim ceremony.
Unsupported methods today:
- no OTP
claim_endpoint - no ID-JAG or verified-email registration
- no
email.sendscope for pre-claim agent tokens
Register an agent identity
Call the challenge endpoint first, using the same registration body you intend to submit. Do not includeproof_of_work in the challenge request.
proof_of_work field on the registration request. Treat the returned proof_format object as the source of truth for the proof payload.
Build proof_of_work as standard base64 of a UTF-8 JSON payload with this exact shape:
challenge object returned by the challenge endpoint. solution.counter is an integer, and solution.derivedKey is the hex string returned by your solver. The registration body must match the challenge request body exactly, except for the added proof_of_work field. If you change mailbox_local_part, client_name, or idempotency_key, request and solve a new challenge.
The public auth.md file includes a copy-paste proof helper for agents that need one:
proof_of_work is required. mailbox_local_part, client_name, and idempotency_key are optional. If mailbox.status is provisioning, retry token exchange shortly.
Save the agent credential bundle
Immediately after registration and before exchanging the identity assertion, inviting the owner, or reporting that setup succeeded, save the agent credential bundle in a secure store controlled by the user or agent environment, such as 1Password, an OS keychain, or the agent platform’s encrypted secret store. This bundle is required later for MCP, CLI, SDK, mailbox, and sending work. Sendmux cannot recover or reveal the rawclaim_token later. If the raw claim token is lost, rerun registration and invite with a fresh agent identity.
Saving claim_token alone is not enough to invite the owner. The invite must use the identity_assertion-derived pre-claim access token before that short-lived material is lost. Keep the identity_assertion or pre-claim token available until POST /agent-auth/agent/identity/invite returns 202 Accepted.
Do not store these credentials in chat, logs, repo files, screenshots, temporary prompts, or memory-only state that may disappear before owner approval. Store these fields together:
claim_tokenregistration_idmailbox.emailclaim_token_expiresidentity_assertionor the pre-claimsmx_agent_access token until the owner invite returns202token_endpoint=https://app.sendmux.ai/agent-auth/oauth2/tokenapp_resource=https://app.sendmux.ai/api/v1sending_resource=https://smtp.sendmux.ai/api/v1
Exchange the assertion
Use the OAuth JWT bearer grant to get ansmx_agent_ access token.
503 temporarily_unavailable with Retry-After: 10 and retry_after: 10. Retry only expected temporarily_unavailable responses while exchanging the identity assertion; stop and report a server_error.
Use the mailbox
Pass thesmx_agent_ token as a Bearer token to allowed Mailbox API endpoints.
/api/v1/mailbox/me succeeds. If you know the human owner email, invite them next. If you do not know it, ask: What owner email should I invite for approval?
Invite the owner
Ask Sendmux to invite the human owner.idempotency_key.
After this endpoint returns 202, keep waiting for the owner. Before it returns 202, do not switch to the claim-token grant; claim_token cannot create the invite.
Wait for owner-approved sending
After the owner accepts the invite, they open the team page and use the Agent access card to approve sending. The agent polls the token endpoint with the originalclaim_token until that approval exists.
Request the app resource for Mailbox API work:
smtp.sendmux.ai:
503 authorization_pending with Retry-After: 10 and retry_after: 10. If the owner invite has not been sent yet, go back to the pre-claim token from identity_assertion; the claim_token cannot create the invite.
Revoke a token
Revoke an agent access token when it is no longer needed.200 OK.
Limits
Each anonymous registration gets exactly one constrained@myagent.mx mailbox. Proof-of-work challenges are short-lived, and registration plus invite endpoints are rate limited. When an agent is rate limited, 429 responses include Retry-After, retry_after, and rate_limit_scope so the agent can back off before retrying. Unclaimed registrations expire after 24 hours. Sendmux revokes pre-claim access tokens and reclaims the agent mailbox after expiry.
After the owner accepts the invite, the team uses normal Sendmux limits and can request increases like any other team. The owner can approve or revoke agent sending from the Agent access card on the team page.
Timing summary:
- identity assertions expire after 15 minutes
- agent access tokens expire after at most 1 hour
- unclaimed agent registrations, claim tokens, and their owner approval window expire after 24 hours
- other owner invitation links can last up to 7 days
Error reference
Next steps
Mailbox API
Read and sync mailbox data with an agent token.
Agent skills
Teach AI coding tools the Sendmux agent workflows.
SDKs
Use SDK clients with mailbox-compatible tokens.
API keys
Review manual keys, connected apps, and agent tokens.