Zoca Entities API

The Entities API from Zoca — 66 operation(s) for entities.

Operations 78

POST /entities/{entityId}/backfill-timezone Backfill timezone for a single location from its address #
POST /entities/backfill-timezone/batch Backfill timezone for all null-timezone locations (paged) #
GET /entities/links Get booking links for an entity #
PUT /entities/links Update booking links for an entity #
GET /entities/{entityId}/website-theme Get the scraped website theme (colors + fonts) for an entity #
GET /entities/currency Get currency for given entity id #
GET /entities/locations Get all locations for a user #
POST /entities/trigger-event Trigger a custom event for an entity #
POST /entities/onboarding-state Update onboarding state for an entity #
GET /entities/location/{entityId} Get GBP location data by entity ID #
PUT /entities/location/{entityId} Update location data #
GET /entities/location/{entityId}/details Get essential location details #
GET /entities/location/{entityId}/rwg-status Get Reserve with Google status #
GET /entities/location/{entityId}/users Get users associated with a location #
POST /entities/location/{entityId}/offboard Offboard a location and optionally cancel subscriptions #
POST /entities/location/{entityId}/resurrect Resurrect a previously offboarded location #
PUT /entities/location/{entityId}/test Mark an entity as a test entity #
GET /entities/{entityId}/is-test Check if an entity is marked as a test entity #
GET /entities/{entityId}/more-tab-cards Get visibility markers for More tab cards #
GET /entities/products/{entityId} Get products for an entity #
PUT /entities/products/{entityId} Create or update a product entity relationship #
GET /entities/{entityId}/scheduling-active Check whether the scheduling product is active for an entity #
GET /entities/products/{entityId}/features Get features available for entity products #
PUT /entities/products/{entityId}/{productId}/deactivate Mark a product entity relationship as inactive #
PUT /entities/location/{entityId}/lead-masking Update lead masking settings for a location #
POST /entities/{entityId}/preferences Create or update an entity preference #
GET /entities/{entityId}/preferences Get preferences for an entity #
DELETE /entities/{entityId}/preferences Soft-delete entity preferences #
POST /entities/{entityId}/preferences/bulk Bulk upsert multiple preferences for a single entity #
POST /entities/account Create a new entity account with user, location, and business #
POST /entities/location/manual Create a business + location without GBP (standalone bookings) #
GET /entities/{entityId}/preferences/paginated List entity preferences with pagination, search, and attribute-prefix filtering #
POST /entities/{entityId}/preferences/bulk/fetch Get preferences for an entity filtered to a list of attributes #
GET /entities/{entityId}/effective-preferences Get effective preferences with hierarchy resolution #
GET /entities/users/{entityId}/locations Get locations associated with a user #
POST /entities/{entityId}/virtual-number Create a virtual phone number for an entity #
POST /entities/{entityId}/additional-phone Add additional phone number for a user/SP #
GET /entities/{entityId}/phones Get phone numbers for an entity with optional filters #
GET /entities/location/{entityId}/booking-link Get booking link for a location #
PUT /entities/location/{entityId}/booking-link Update booking link for a location #
PUT /entities/phones Upsert a phone record #
GET /entities/offboarding-reason-templates Get active offboarding reason templates #
POST /entities/offboarding-reason-templates Add a new offboarding reason template #
PUT /entities/offboarding-reason-templates/{id} Update an existing offboarding reason template #
POST /entities/offboarding-reason-template-mappings Create a mapping between an entity and a reason template #
PUT /entities/offboarding-reason-template-mappings/{entityId}/{reasonId} Update a reason template mapping #
GET /entities/offboarding/active-subscriptions/{entityId} Get active subscriptions and offboarding information for an entity #
GET /entities/offboarding/active-subscriptions/v2/{entityId} Get active subscriptions and offboarding information for an entity (with HubSpot meeting) #
POST /entities/defaults Create or update a global default preference #
GET /entities/defaults Get global default preferences #
PUT /entities/defaults/{id} Update a global default preference #
DELETE /entities/defaults/{id} Delete a global default preference #
PUT /entities/links/credentials/{linkId} Create or update credentials for a link #
POST /entities/links/{linkId}/scrape Start scraping task for booking platform data #
POST /entities/optexity/callback Receive callback from Optexity when scraping task completes #
POST /entities/location/{entityId}/social-media-churn Mark location as churned for social media #
POST /entities/agent-activation-logs Create agent activation log entry #
POST /entities/{entityId}/trigger-payment-link-comms Trigger payment link communications for an entity #
GET /entities/{entityId}/meetings Get latest meetings for an entity #
POST /entities/{entityId}/review-insights Get review insights for an entity #
GET /entities/website/{entityId}/faqs Get FAQs for an entity #
POST /entities/website/faqs/bulk-upsert Bulk upsert FAQs for entities #
GET /entities/{entityId}/status Get entity status information #
PUT /entities/{entityId}/users/{userId}/service-provider Toggle service provider status for user #
GET /entities/{entityId}/service-providers Get service providers for a location #
GET /entities/{entityId}/hubspot/meetings Get upcoming HubSpot meetings for an entity #
GET /entities/{entityId}/call-now-settings Get Call Now button settings #
PUT /entities/{entityId}/call-now-settings Update Call Now button settings #
GET /entities/{entityId}/cta-config Get CTA configuration #
PUT /entities/{entityId}/cta-config Update CTA configuration #
POST /tasks/api/v1/entities/leads/demo/report Trigger demo lead report notification #
POST /tasks/api/v1/entities/keywords Create or update keyword entities for a given entity #
GET /tasks/api/v1/entities/keywords Get keywords for an entity by type #
GET /tasks/api/v1/entities/businesses List or search businesses by title (internal drill-down typeahead) #
GET /tasks/api/v1/entities/businesses/{businessId}/locations List locations attached to a business (BUSINESS_LOCATION) #
GET /tasks/api/v1/entities/locations/{locationId}/users-with-phones List users at a location with their phone numbers bundled inline (VIRTUAL_NUMBER, WORK, PERSONAL) #
GET /tasks/api/v1/entities/phone/{entityId} Get phone numbers for an entity (optionally filter by type) #
POST /tasks/api/v1/entities/locations/backfill-coordinates Backfill location coordinates #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/zoca-entities-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

zoca-entities-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Zoca Entities API
  contact: {}
  x-refined-note:
  - x-apievangelist-note differs across the merged source definitions and was not carried
  version: '1.0'
  description: 'Operations tagged Entities across 2 of this provider''s published API definitions: zoca-platform-openapi.yml, zoca-tasks-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.zoca.ai
  description: Production
- url: https://tasks.zoca.ai
  description: Production
tags:
- name: Entities
paths:
  /entities/{entityId}/backfill-timezone:
    post:
      operationId: t_value
      parameters:
      - name: entityId
        required: true
        in: path
        description: Location entity ID
        schema: {}
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e'
      summary: Backfill timezone for a single location from its address
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/backfill-timezone/batch:
    post:
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e'
      summary: Backfill timezone for all null-timezone locations (paged)
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/links:
    get:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
      summary: Get booking links for an entity
      tags:
      - Entities
    put:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
      summary: Update booking links for an entity
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/website-theme:
    get:
      operationId: t_value
      parameters:
      - name: entityId
        required: true
        in: path
        description: Entity (location) ID
        schema: {}
      responses:
        '200':
          description: ''
      summary: Get the scraped website theme (colors + fonts) for an entity
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/currency:
    get:
      operationId: t_value
      parameters:
      - name: type
        required: true
        in: query
        description: Entity type | Pass LOCATION to get currency for location
        schema: {}
      - name: entityId
        required: true
        in: query
        description: Use location entity id to get currency for location
        schema: {}
      responses:
        '200':
          description: Successfully fetched the currency for given entity id
          content:
            application/json:
              schema:
                example:
                  status: true
                  message: Success
                  data:
                    currency: USD
      summary: Get currency for given entity id
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/locations:
    get:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
      summary: Get all locations for a user
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/trigger-event:
    post:
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: ''
      summary: Trigger a custom event for an entity
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/onboarding-state:
    post:
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: ''
      summary: Update onboarding state for an entity
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/location/{entityId}:
    get:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
      summary: Get GBP location data by entity ID
      tags:
      - Entities
    put:
      description: Updates any columns in the entities.locations table. All fields are optional. Attributes are merged with existing values (preserves old keys, updates matching keys).
      operationId: t_value
      parameters:
      - name: entityId
        required: true
        in: path
        description: UUID of the location entity to update
        schema:
          example: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: Successfully updated location
          content:
            application/json:
              schema:
                example:
                  entityId: 123e4567-e89b-12d3-a456-426614174000
                  name: Updated Business Name
                  address:
                    locality: New York
                    postalCode: '10001'
                    regionCode: US
                    addressLines:
                    - 123 Main Street
                  category: Restaurant
                  businessCategory: Beauty
                  timezone: America/New_York
                  attributes:
                    customerSource:
                    - Groupon
                    - Yelp
                    clientContactsNumber: 10
        '400':
          description: Invalid entity ID format
          content:
            application/json:
              schema:
                example:
                  message: Invalid UUID format
                  error: Bad Request
                  statusCode: 400
        '404':
          description: Location entity not found
          content:
            application/json:
              schema:
                example:
                  message: Location with entityId 123e4567-e89b-12d3-a456-426614174000 not found
                  error: Not Found
                  statusCode: 404
      summary: Update location data
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/location/{entityId}/details:
    get:
      description: Retrieves core location information including name, address, category, timezone, lead masking status, and business hours for a specific location entity.
      operationId: t_value
      parameters:
      - name: entityId
        required: true
        in: path
        description: UUID of the location entity to retrieve details for
        schema:
          example: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: Successfully retrieved location details
          content:
            application/json:
              schema:
                example:
                  entityId: 123e4567-e89b-12d3-a456-426614174000
                  name: Sample Business
                  address:
                    locality: New York
                    postalCode: '10001'
                    regionCode: US
                    addressLines:
                    - 123 Main Street
                    languageCode: en
                    administrativeArea: NY
                  category: Restaurant
                  timezone: America/New_York
                  leadMasking:
                    status: true
                    metadata: {}
                  openInfo:
                    status: OPEN
                    canReopen: true
        '400':
          description: Invalid entity ID format
          content:
            application/json:
              schema:
                example:
                  message: Invalid UUID format
                  error: Bad Request
                  statusCode: 400
        '404':
          description: Location entity not found
          content:
            application/json:
              schema:
                example:
                  message: Location not found
                  error: Not Found
                  statusCode: 404
      summary: Get essential location details
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/location/{entityId}/rwg-status:
    get:
      description: Retrieves whether the 'Book online' button on the Google Business Profile is enabled for a location (entities.locations.rwg_enabled).
      operationId: t_value
      parameters:
      - name: entityId
        required: true
        in: path
        description: UUID of the location entity
        schema:
          example: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: Successfully retrieved RWG status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e'
      summary: Get Reserve with Google status
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/location/{entityId}/users:
    get:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
      summary: Get users associated with a location
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/location/{entityId}/offboard:
    post:
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: ''
      summary: Offboard a location and optionally cancel subscriptions
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/location/{entityId}/resurrect:
    post:
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: ''
      summary: Resurrect a previously offboarded location
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/location/{entityId}/test:
    put:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
      summary: Mark an entity as a test entity
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/is-test:
    get:
      description: Returns whether the specified entity is marked as a test entity in the system
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully retrieved test status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e'
        '400':
          description: Invalid entity ID format
          content:
            application/json:
              schema:
                example:
                  message: Invalid UUID format
                  error: Bad Request
                  statusCode: 400
      summary: Check if an entity is marked as a test entity
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/more-tab-cards:
    get:
      description: Returns boolean flags indicating which cards should be displayed in the More tab. Currently includes Instagram leads card visibility based on recent activity.
      operationId: t_value
      parameters:
      - name: entityId
        required: true
        in: path
        description: UUID of the entity to check card visibility for
        schema:
          example: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: Successfully retrieved More tab card visibility markers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e'
        '400':
          description: Invalid entity ID format
          content:
            application/json:
              schema:
                example:
                  message: Invalid UUID format
                  error: Bad Request
                  statusCode: 400
      summary: Get visibility markers for More tab cards
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/products/{entityId}:
    get:
      operationId: t_value
      parameters:
      - name: includeInactive
        required: false
        in: query
        description: Include inactive products in the response
        schema:
          type: boolean
      responses:
        '200':
          description: ''
      summary: Get products for an entity
      tags:
      - Entities
    put:
      description: Associates a product with an entity or updates an existing product entity relationship
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully created or updated the product entity relationship
          content:
            application/json:
              schema:
                example:
                  id: f47ac10b-58cc-4372-a567-0e02b2c3d479
                  entityId: abc123-456-789
                  productId: 1
                  isActive: true
                  attributes:
                    feature: enabled
                  createdAt: '2023-01-01T00:00:00.000Z'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                example:
                  message: Validation failed
                  error: Bad Request
                  statusCode: 400
      summary: Create or update a product entity relationship
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/scheduling-active:
    get:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                example:
                  active: true
      summary: Check whether the scheduling product is active for an entity
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/products/{entityId}/features:
    get:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
      summary: Get features available for entity products
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/products/{entityId}/{productId}/deactivate:
    put:
      description: Deactivates an active product entity relationship by setting isActive to false. The relationship record is not deleted, only marked as inactive.
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully marked the product entity relationship as inactive
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e'
        '400':
          description: Invalid request parameters (invalid UUID format or productId)
          content:
            application/json:
              schema:
                example:
                  message: entityId must be a valid UUID
                  error: Bad Request
                  statusCode: 400
        '404':
          description: No active product entity relationship found for the specified entityId and productId
          content:
            application/json:
              schema:
                example:
                  message: No active product entity relationship found for entityId abc123 and productId 1
                  error: Not Found
                  statusCode: 404
      summary: Mark a product entity relationship as inactive
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/location/{entityId}/lead-masking:
    put:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
      summary: Update lead masking settings for a location
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/preferences:
    post:
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: ''
      summary: Create or update an entity preference
      tags:
      - Entities
    get:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
      summary: Get preferences for an entity
      tags:
      - Entities
    delete:
      description: Marks preferences as deleted by setting is_deleted=true. Supports single delete via query parameter or bulk delete via request body.
      operationId: t_value
      parameters:
      - name: attribute
        required: false
        in: query
        description: Single attribute to soft-delete (alternative to body)
        schema:
          example: content.active
      responses:
        '204':
          description: Successfully soft-deleted preferences (no content)
        '400':
          description: Invalid request - must provide either attribute query param or attributes in body
          content:
            application/json:
              schema:
                example:
                  message: Must provide either attribute query param or attributes array in body
                  error: Bad Request
                  statusCode: 400
      summary: Soft-delete entity preferences
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/preferences/bulk:
    post:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Preferences upserted successfully
      summary: Bulk upsert multiple preferences for a single entity
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/account:
    post:
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: ''
      summary: Create a new entity account with user, location, and business
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/location/manual:
    post:
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: ''
      summary: Create a business + location without GBP (standalone bookings)
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/preferences/paginated:
    get:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
      summary: List entity preferences with pagination, search, and attribute-prefix filtering
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/preferences/bulk/fetch:
    post:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Preferences fetched successfully
      summary: Get preferences for an entity filtered to a list of attributes
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/effective-preferences:
    get:
      description: 'Fetches preferences following hierarchy: entity -> cohort -> default'
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully fetched effective preference
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e'
      summary: Get effective preferences with hierarchy resolution
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/users/{entityId}/locations:
    get:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: ''
      summary: Get locations associated with a user
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/virtual-number:
    post:
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: ''
      summary: Create a virtual phone number for an entity
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/additional-phone:
    post:
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: Successfully added additional phone number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e'
        '400':
          description: Invalid phone data provided
      summary: Add additional phone number for a user/SP
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/{entityId}/phones:
    get:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully fetched phone numbers
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/e'
      summary: Get phone numbers for an entity with optional filters
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/location/{entityId}/booking-link:
    get:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully fetched the booking link
      summary: Get booking link for a location
      tags:
      - Entities
    put:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully updated the booking link
      summary: Update booking link for a location
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/phones:
    put:
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully upserted the phone record
      summary: Upsert a phone record
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/offboarding-reason-templates:
    get:
      description: Retrieves a list of active offboarding reason templates. Either agentId OR isDeleteAccount must be provided, but not both.
      operationId: t_value
      parameters:
      - name: isDeleteAccount
        required: false
        in: query
        description: Set to true to get account-level deletion reasons
        schema:
          example: true
          type: boolean
      - name: agentId
        required: false
        in: query
        description: Agent entity ID to get agent-specific offboarding reasons
        schema:
          example: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: Successfully retrieved offboarding reason templates
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/e'
        '400':
          description: Invalid request - exactly one parameter is required
          content:
            application/json:
              schema:
                example:
                  message: 'At least one parameter is required: agentId or isDeleteAccount'
                  error: Bad Request
                  statusCode: 400
      summary: Get active offboarding reason templates
      tags:
      - Entities
    post:
      description: Creates a new offboarding reason template that can be used when offboarding entities. This endpoint is used by internal teams to manage available offboarding reasons.
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: Successfully created offboarding reason template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e'
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                example:
                  message: Validation failed
                  error: Bad Request
                  statusCode: 400
      summary: Add a new offboarding reason template
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/offboarding-reason-templates/{id}:
    put:
      description: Updates an offboarding reason template. At least one field must be provided for update.
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully updated offboarding reason template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e'
        '400':
          description: Invalid request - no fields to update
          content:
            application/json:
              schema:
                example:
                  message: At least one field must be provided for update
                  error: Bad Request
                  statusCode: 400
        '404':
          description: Reason template not found
          content:
            application/json:
              schema:
                example:
                  message: Offboarding reason template with ID 123 not found
                  error: Not Found
                  statusCode: 404
      summary: Update an existing offboarding reason template
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/offboarding-reason-template-mappings:
    post:
      description: Maps an entity to a specific offboarding reason template. If mapping already exists, it will be reactivated.
      operationId: t_value
      parameters: []
      responses:
        '201':
          description: Successfully created reason template mapping
          content:
            application/json:
              schema:
                example:
                  success: true
                  message: Reason template mapping created successfully
        '404':
          description: Reason template not found
          content:
            application/json:
              schema:
                example:
                  message: Offboarding reason template with ID 123 not found or is inactive
                  error: Not Found
                  statusCode: 404
      summary: Create a mapping between an entity and a reason template
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/offboarding-reason-template-mappings/{entityId}/{reasonId}:
    put:
      description: Updates the active status of a reason template mapping.
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully updated reason template mapping
          content:
            application/json:
              schema:
                example:
                  success: true
                  message: Reason template mapping updated successfully
        '404':
          description: Mapping not found
          content:
            application/json:
              schema:
                example:
                  message: Reason template mapping not found for entity abc-123 and reason 1
                  error: Not Found
                  statusCode: 404
      summary: Update a reason template mapping
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/offboarding/active-subscriptions/{entityId}:
    get:
      description: Retrieves active agent subscriptions, billing information, and delete account status for offboarding workflows. Returns agent details with meeting links if offboarding calls are scheduled.
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully retrieved active subscriptions and offboarding information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/e'
              examples:
                no-delete-account:
                  summary: Active subscriptions without delete account scheduled
                  value:
                    agents:
                    - agentId: agent-123
                      title: Zoca Discovery
                      icon: discovery-icon.svg
                      iconBgColor: '#4F46E5'
                      description: Next bill - 24 Sep, 2025
                      isDisabled: false
                      isCallScheduled: false
                      meetingLink: null
                    deleteAccount: null
                delete-account-scheduled:
                  summary: Delete account call scheduled
                  value:
                    agents:
                    - agentId: agent-123
                      title: Zoca Discovery
                      icon: discovery-icon.svg
                      iconBgColor: '#4F46E5'
                      description: Off-boarding call on 24 Aug, 12:30 PM
                      isDisabled: true
                      isCallScheduled: false
                      meetingLink: null
                    - agentId: agent-456
                      title: Zoca Reviews
                      icon: reviews-icon.svg
                      iconBgColor: '#10B981'
                      description: Off-boarding call on 24 Aug, 12:30 PM
                      isDisabled: true
                      isCallScheduled: true
                      meetingLink: https://meet.google.com/abc-def-ghi
                    deleteAccount:
                      description: Off-boarding call on 24 Aug, 12:30 PM
                      meetingLink: https://meet.google.com/abc-def-ghi
                      isCallScheduled: true
        '400':
          description: Invalid entity ID format
          content:
            application/json:
              schema:
                example:
                  message: Invalid UUID format
                  error: Bad Request
                  statusCode: 400
        '401':
          description: Missing or invalid JWT authentication
          content:
            application/json:
              schema:
                example:
                  message: Unauthorized
                  error: Unauthorized
                  statusCode: 401
        '403':
          description: User not authorized for this entity
          content:
            application/json:
              schema:
                example:
                  message: Forbidden
                  error: Forbidden
                  statusCode: 403
        '404':
          description: Entity not found
          content:
            application/json:
              schema:
                example:
                  message: Entity not found
                  error: Not Found
                  statusCode: 404
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                example:
                  message: Failed to retrieve active subscriptions
                  error: Internal Server Error
                  statusCode: 500
      summary: Get active subscriptions and offboarding information for an entity
      tags:
      - Entities
    servers:
    - url: https://api.zoca.ai
      description: Production
  /entities/offboarding/active-subscriptions/v2/{entityId}:
    get:
      description: Retrieves active agent subscriptions, billing information, and delete account status for offboarding workflows. Includes HubSpot meeting data by default.
      operationId: t_value
      parameters: []
      responses:
        '200':
          description: Successfully retrieved active subscriptions and offboarding information
          content:
            application/json:
              schema:
         

# --- truncated at 32 KB (68 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/zoca/refs/heads/main/openapi/zoca-entities-api-openapi.yml