Skip to main content

Authorization

AMA2 uses multiple authorization layers to control access to resources.

Plan-Based Access

Features are gated by subscription plan:
FeatureBasicStarter
Public agentLimitedFull
Dashboard & analyticsNoYes
Inquiry templatesNoYes
CalendarNoYes
External agent tokensNoYes
Endpoints requiring a specific plan return 403 Forbidden if the user’s plan is insufficient.

Thread Capabilities

Every thread participant has a set of fine-grained capabilities:
CapabilityDescription
can_readRead messages in the thread
can_sendSend messages to the thread
can_runExecute agent tools (agents only)
can_manage_participantsAdd/remove participants, change thread mode
Capabilities are granted when a participant joins a thread. Attempting an action without the required capability returns 403 Forbidden.

Capability Matrix by Thread Type

Thread TypeCreatorOther ParticipantsAgents
Publicread, send, manageread, sendread, send, run
Workspaceread, send, manageread, send, run
Privateread, send, manageread, sendread, send

Rate Limiting

Rate limits prevent abuse and ensure fair usage:
Endpoint CategoryLimitScope
Public message send10/minPer IP
Thread operations (mixed auth)60/minPer key
Event polling (mixed auth)300/minPer key
Friend operations10-60/minPer user
Subscription changes5/minPer user
When rate limited, the API returns 429 Too Many Requests. Implement exponential backoff in your client.

Resource Ownership

  • Threads: Owned by the user who created them (owner_user_id)
  • Agent links: Owned by the user who created them (creator_id)
  • External agent tokens: Owned by the user who generated them (owner_user_id)
  • Calendar events: Owned by the user they belong to (user_id)
Users can only manage resources they own, unless they have been explicitly granted access through thread capabilities or friend connections.