Skip to content

Credentials

A vault on the inbox.

Store a TOTP seed, a secret, or a password with the inbox that signed up. Retrieve returns the current authenticator code. Markdown: /docs/credentials.md · Let your agent pass 2FA sign-ups.

What the vault stores

A credential belongs to one inbox. type is totp, secret, or password. totp takes an otpauth://totp/ URI or a base32 seed. digits, period, and algorithm come from the URI when it includes them. secret stores one string. password stores origin, username, and password. label (or name) and metadata are optional.

POST /api/v1/inboxes/{id}/credentials writes the row. The response is the public credential. It does not include the seed, the secret, or the password. GET list and GET one return the same public fields: type, label, origin, username for a password, digits, period, algorithm for a TOTP seed, metadata, created_at, updated_at, and last_retrieved_at.

Docs: https://cooperemail.com/docs/credentials. Guide: https://cooperemail.com/guides/let-your-agent-pass-2fa-sign-ups.

Read a code

POST /api/v1/inboxes/{id}/credentials/{cid}/retrieve returns the current TOTP code and expires_in (seconds until that code changes), or the secret value, or the password. Query totp=1 returns HTTP 400 invalid_credential_type when the row is not a TOTP seed. The call sets last_retrieved_at and writes credential.retrieved. That event stores credential_id, inbox_id, type, and label. It does not store the secret, the password, the seed, or the code. Webhooks whose events list includes credential.retrieved receive that same object.

MCP tools are cooper_create_credential, cooper_list_credentials, cooper_get_totp_code, cooper_retrieve_credential, and cooper_delete_credential. Omit inbox_id when the key is limited to one inbox.

AUTH=(-H "Authorization: Bearer ${COOPER_API_KEY}")
curl -s -X POST https://cooperemail.com/api/v1/inboxes/$INBOX/credentials \
  "${AUTH[@]}" -H 'content-type: application/json' \
  -d '{"type":"totp","label":"Example","secret":"JBSWY3DPEHPK3PXP"}'

curl -s -X POST https://cooperemail.com/api/v1/inboxes/$INBOX/credentials/$CRED/retrieve \
  "${AUTH[@]}"

Keys, lock, and the cap

credentials:read covers list, get, and retrieve. credentials:write covers create, PATCH, PUT, and DELETE. A full-access key (permissions null) and an OAuth token can call them. A key that lacks the permission gets HTTP 403 permission_denied. An inbox-scoped key for another inbox gets HTTP 404 inbox_not_found.

PATCH or PUT replaces the value. type cannot change. DELETE removes the row. An inbox can store 100 credentials. The next create is HTTP 409 credential_limit.

Sensitive fields are encrypted with AES-256-GCM before they are stored. The key is COOPER_VAULT_KEY, 32 bytes of base64. When that variable is unset or not 32 bytes, these routes return HTTP 503 vault_unavailable. Other routes keep working. When the owner has locked the account, these routes return HTTP 403 account_locked.

Operator: Avatar 8 LLC (ops@avatar33.com).