Overview
Users are identities owned by your partner account. One user can belong to your provisioned organizations and can also be attached to independently owned, linked organizations as a read-only dashboard viewer.Base URL
Playground:https://playground.answeringagent.com/api/v1
Production: https://answeringagent.com/api/v1
All endpoints require the X-API-KEY header containing a valid partner API key.
Understanding External IDs
Theexternal_id is your unique identifier for a user from your system:
- Use your existing user IDs (e.g.,
"user_12345","customer_abc") - Makes API calls simple:
GET /users/user_12345/embed-token - Maintains clean mapping between your database and Answering Agent
- Must be unique across all users for your partner account
- User signs up in your system → assigned ID
"cust_789" - Create organization in Answering Agent → use
external_id: "cust_789" - Later: Get embed token →
GET /users/cust_789/embed-token
Key Concepts
Organization Owners vs Additional Users
Organization Owners vs Additional Users
- Owner: Created automatically when you create an organization. Has full permissions.
- Additional Users: Team members you add to the organization after creation.
/users endpoints.When to Use External ID
When to Use External ID
Always! The
external_id is how you reference users in the API:GET /users/{external_id}- Look up user detailsGET /users/{external_id}/embed-token- Get embed token- All other user operations
Can users belong to multiple organizations?
Can users belong to multiple organizations?
Yes. Create the identity once, then attach it to each approved organization. Provisioned organizations can assign normal roles. Owner-linked organizations always attach the identity as a read-only
user viewer and require a separate owner/admin grant for each organization.Provisioned organizations vs owner-linked organizations
Provisioned organizations vs owner-linked organizations
- Provisioned: Created and owned by your partner account. Existing user and organization write endpoints apply.
- Owner-linked: Owned by an existing Answering Agent customer and visible through an accepted partner link. The organization remains read-only except for the narrow dashboard-viewer attach/detach endpoint, and only after its owner or admin enables viewer management.
1. List Users
List all users for the authenticated reseller, with optional organization filtering.
Query Parameters
integer
Filter users by organization ID
Example
2. Create User
Create one identity, optionally assigning it to an organization. When
organization_id selects an owner-linked organization with an active viewer-management grant, this call creates the identity and attaches it as a read-only dashboard viewer. Do not send team_name, locations, phone_number_ids, or an elevated role for that flow.
Query Parameters
integer
Organization to assign the user to
Request Body
The
locations array is deprecated. Use the dedicated Locations API for better location management.Success Response
For a provisioned organization,
embed_token is returned as usual. For an owner-linked organization, it is null; request an organization-scoped token after the viewer relationship is attached.- The
external_idis the user’s ID in your system (not Answering Agent’s internal ID) - Must be unique across all of your users (your partner account)
- Use it for all API operations: looking up users, generating embed tokens, etc.
- Provides clean separation between your system and Answering Agent
Error Codes
3. Get User by External ID
Example
The embed token is not returned in user lookup responses for security reasons. Use the dedicated embed token endpoints to retrieve or manage tokens.
4. Get User by Email
Example
5. Update User
Request Body
Success Response
6. Delete User
Example
Account Linking
You can link existing Answering Agent accounts to your partner account, giving you embed-only access to their dashboard. The user receives an email invite and must accept before the link is active.Linked users give you embed-only access — you can generate embed tokens, but you cannot modify their account, organization, or locations.
external_id. It is separate from attaching one of your own provisioned identities as a multi-organization dashboard viewer.
Send Linking Invite
external_id you provided.
Check Invite Status
Returns all your pending and active linked accounts:
Working with Linked Users
Once a link is active, the user appears inGET /users with type: "linked" and you can use all embed token endpoints with their external_id. Write operations (PATCH, DELETE) return 403 for linked users.
Embed Token Management
For a multi-organization viewer, includeorganization_id on every token request. It is required when the user has more than one eligible organization context. A scoped response includes the selected organization_id:
Get Current Embed Token
Retrieve the current compact embed token for a user. If the user is a scoped viewer, select the organization with
organization_id.
Example
Generate New Embed Token
Generate a new embed token. For a scoped viewer, include
organization_id; rotation invalidates only that organization relationship and preserves the user’s other organization access. Partner-provisioned users retain one user-wide signing authority, including when organization_id selects the returned token’s team.
Example
Security Features
Compact & Secure: Embed tokens use URL-safe base64 encoding and HMAC-SHA256 for cryptographic integrity. User-Specific: Each token is tied to a specific user and cannot be transferred or reused for other users. Invalidation: Scoped tokens are bound to one organization relationship and generation. Detach, grant disable/revoke, partner-link revoke, membership removal, or user deletion invalidates that authority. Re-enabling a grant alone does not restore access; attach the viewer again and request a fresh token. Token Lifetime: The compact token has no built-in expiry, but it can be invalidated immediately. The iframe exchanges it for a bearer that expires after 15 minutes and is revalidated against the current viewer authority on each request.Using Embed Tokens
Once you have an embed token, use it with the embed system to integrate the Answering Agent dashboard into your application.Multi-Organization Dashboard Viewers
This workflow is for a partner account manager who should use one identity across multiple independently owned customer organizations.Prerequisites
- The organization owner accepts the partner link.
- The owner or an organization admin enables dashboard-viewer management for your partner account.
GET /organizations/{organization_id}showspartner_type: "linked"andpermissions.can_manage_dashboard_viewers: true.
Create or reuse the identity
For the first approved linked organization, you can create and attach in one request:external_id:
organizations array contains all currently visible memberships. Repeating the PUT is safe.
Remove one organization without deleting the identity
204 No Content, revokes stale compact and bearer authority for organization 123, and preserves organization 456 plus the user identity. Repeating the DELETE is safe.