Skip to content
agentsub
Esc
↑↓navigate↵open⌘Jpreview

Configure the AgentMail connector

Owner only. Stores the API key encrypted (AES-GCM with SERVICE_CONNECTOR_ENCRYPTION_KEY); missing/invalid key yields 503 service_unavailable-style service_unconfigured. Verification is not performed at save time.

PUT/v1/services/connectors/agentmail
Authorization
AuthorizationBearer token (JWT) · headerrequired

Clerk human owner session JWT; iss must equal the configured Clerk issuer and the identity must be a human (not agent) owner with a verified email.

or
AuthorizationOAuth2 access token · headerrequired
Scopes:agentsub:owner
Request body
requiredapplication/json
apiKeystringrequired
min length 1 · max length 8192
allowedInboxIdsstring[]required
min items 1 · max items 100
Responses
200

Connector configured

configuredboolean
allowedInboxIdsstring[]
verificationstring
400

invalid_input problem

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
401

unauthorized problem; live 401s advertise WWW-Authenticate: Bearer resource_metadata=...

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
403

Identity, ownership, scope or policy denied (human_required, owner_claim_required, scope_required, FROZEN, CAP_EXCEEDED, SCOPE_FORBIDDEN)

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
503

Runtime or provider configuration unavailable (runtime_configuration_required, signing_configuration_required, runtime_unavailable, workspace_unavailable, provider_configuration_required)

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
Request
curl -X PUT 'https://api.agentsub.dev/v1/services/connectors/agentmail' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "apiKey": "string",
  "allowedInboxIds": [
    "string"
  ]
}'
Response
{
  "configured": true,
  "allowedInboxIds": [
    "string"
  ],
  "verification": "not_tested"
}