Skip to main content

Overview

Organizations represent your customers’ businesses in Answering Agent. They can be provisioned by your partner account or independently owned and linked to it. Linked organizations remain customer-owned and default-deny for partner writes.
Use the organization-first flow to onboard customers: Create the organization and owner user in a single API call, then add locations and additional users as needed.

Data Hierarchy

Understanding how organizations fit into the Answering Agent structure:
Key Points:
  • Organizations must have at least one owner user
  • Owners are created automatically when you create an organization
  • Users are identified by your system’s external_id for easy mapping
  • Locations (phone numbers) belong to organizations
  • All data is scoped to your partner account - you only see provisioned organizations and organizations visible through an accepted partner link
  • partner_type identifies provisioned vs linked organizations
  • permissions.can_manage_dashboard_viewers tells you whether a linked organization’s owner/admin approved viewer management

Base URL

Playground: https://playground.answeringagent.com/api/v1 Production: https://answeringagent.com/api/v1 All requests must include the X-API-KEY header containing a valid API key.

Endpoints


1. List Organizations

List all organizations for the authenticated reseller.

Example

Success Response


2. Create Organization

Create a new organization with an owner. This is the recommended way to onboard new customers as it creates both the organization and owner user in a single operation.

Request Fields

Example

Success Response

The owner user is automatically created and assigned full access to manage the organization. They can add team members, configure locations, and manage all settings.

3. Get Organization

Example

Success Response


4. Update Organization

Request Fields

Example

Success Response


5. Delete Organization

Organizations can only be deleted if they have no users. Remove all users from the organization before attempting to delete it.

Example

Success Response


Organization-First Workflow

The recommended workflow for onboarding new customers:
  1. Create Organization: Use POST /organizations with owner details
  2. Add Additional Users: Use POST /users?organization_id={id} for additional team members
  3. Create Locations: Use POST /locations?organization_id={id} for phone numbers
  4. Generate Embed Token: Use GET /users/{external_id}/embed-token for dashboard access

Complete Example


Owner-Linked Organization Workflow

Use this flow when the customer already owns their Answering Agent organization and your account managers need approved, read-only embedded dashboard access.

1. Confirm visibility and permission

After the customer owner accepts the partner link, list or fetch the organization:
If can_manage_dashboard_viewers is false, the organization owner or an admin must enable it in Answering Agent before your API can attach viewers. The partner API cannot self-approve this grant.

2. Attach an existing partner identity

The external_id must identify a user provisioned by your partner account. A successful response shows organization 456 in that user’s organizations array with role user. The same identity can be attached independently to other approved linked organizations.

3. Request an organization-scoped token

Pass the returned compact token to a /dashboard/embed iframe. It authorizes read-only access to all current and future locations in organization 456, never to another organization.

4. Detach without deleting the identity

This returns 204 No Content, invalidates stale scoped authority for organization 456, and preserves the identity and its other organization relationships.
Disabling or revoking the grant, revoking the partner link, removing the team membership, or deleting the user also revokes scoped authority. Re-enabling a grant does not silently restore viewers; attach each viewer again and issue a fresh token.

Error Codes


Benefits of Organization-First Flow

  • Single API Call: Create both organization and owner in one request
  • Atomic Operations: Either both are created successfully or neither
  • Simplified Onboarding: Fewer API calls needed for customer setup
  • Automatic Relationships: Owner is automatically linked to organization
  • Better Data Consistency: Reduces chance of orphaned records