Patricia Message Action Policy API

The message-action-policy API from Patricia — 2 operation(s) for message-action-policy.

GitHub OpenAPI

Operations 3

GET /v1/message-action-policy/tenant Get the workspace message-action policy #
PUT /v1/message-action-policy/tenant Set the workspace message-action policy #
GET /v1/message-action-policy/tenant/frequent-emoji Get the workspace's frequently used custom emoji #

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/patricia-app:patricia-app-message-action-policy-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

patricia-app-message-action-policy-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Patricia Message Action Policy API
  version: 0.1.0
tags:
- name: message-action-policy
paths:
  /v1/message-action-policy/tenant:
    get:
      tags:
      - message-action-policy
      summary: Get the workspace message-action policy
      description: Read the emoji allowlist, proactive toggles, and per-channel/hour caps that govern Patricia's reactions and targeted replies (admin). A workspace that has configured nothing reads back the shipped defaults, which allow her to react on her own and to answer in an existing message's thread on her own, but not to start a new top-level message.
      operationId: get_message_action_policy_v1_message_action_policy_tenant_get
      security:
      - HTTPBearer: []
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageActionPolicyResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: 'Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
      - message-action-policy
      summary: Set the workspace message-action policy
      description: 'Replace the emoji allowlist, proactive toggles, and per-channel/hour caps. Admin only. Patricia may react ONLY with an allowlisted emoji. She adds one on her own, and answers in an existing message''s thread on her own, unless this workspace turns those toggles off; she only starts a NEW top-level message on her own if this workspace turns that one on. Every cap is the most a channel may receive in an hour, counting both the ones she is asked for and the ones she does on her own. For REACTIONS and REPLIES the unprompted ones stop short of the cap, keeping a slice back so a directed request still has room, and at a cap of 1 the unprompted lane gets none. New top-level messages have no such split: unprompted ones can use the whole cap, so at a cap of 1 an unprompted post can take the only slot. This REPLACES the whole policy, so EVERY POLICY FIELD IS REQUIRED: an omitted field is a 422 naming it, never a silent write of some default. Read the current policy with GET, change what you want, and send the whole thing back — the GET response is accepted as-is, so there is no need to strip the read-only fields it carries. One exception: an echoed stored_policy_unreadable=true is refused. That flag means the stored policy could not be read and the GET showed the fail-closed fallback, so saving it back would record the fallback as a deliberate choice and erase the only signal that anything was wrong — decide what the policy should be and send that.'
      operationId: set_message_action_policy_v1_message_action_policy_tenant_put
      security:
      - HTTPBearer: []
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageActionPolicyBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageActionPolicyResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: 'Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/message-action-policy/tenant/frequent-emoji:
    get:
      tags:
      - message-action-policy
      summary: Get the workspace's frequently used custom emoji
      description: Read the custom emoji the team uses most, counted once a month from reactions on public-channel messages Patricia saved in the last 30 days. The list holds only the custom emoji a model screened as positive. It is empty before the first count.
      operationId: get_frequent_custom_emoji_v1_message_action_policy_tenant_frequent_emoji_get
      security:
      - HTTPBearer: []
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrequentCustomEmojiResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: 'Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    FrequentCustomEmojiResponse:
      properties:
        names:
          items:
            type: string
          type: array
          title: Names
          description: The custom emoji names, most used first.
      type: object
      required:
      - names
      title: FrequentCustomEmojiResponse
      description: 'What the dashboard shows under "Allow all emojis": the positive custom emoji the team uses most.'
    ErrorResponse:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        errors:
          anyOf:
          - items:
              additionalProperties: true
              type: object
            type: array
          - type: 'null'
          title: Errors
      type: object
      required:
      - code
      - message
      title: ErrorResponse
      description: Standard error envelope, matching exception handler output.
    MessageActionPolicyBody:
      properties:
        stored_policy_unreadable:
          anyOf:
          - type: boolean
            const: false
          - type: 'null'
          title: Stored Policy Unreadable
        dropped_allowlist_entries:
          anyOf:
          - type: integer
            minimum: 0.0
          - type: 'null'
          title: Dropped Allowlist Entries
        enabled:
          type: boolean
          title: Enabled
          description: Allow message actions in the workspace.
        reaction_mode:
          type: string
          enum:
          - all
          - custom
          title: Reaction Mode
          description: Choose all to allow any reaction supported by Patricia's chat connection, or custom to allow only the names in reaction_allowlist.
        reaction_allowlist:
          items:
            type: string
          type: array
          title: Reaction Allowlist
          description: The emoji names Patricia may use for reactions when reaction_mode is custom. The list stays saved when reaction_mode is all.
        proactive_reactions_enabled:
          type: boolean
          title: Proactive Reactions Enabled
          description: Allow unprompted message reactions.
        proactive_replies_enabled:
          type: boolean
          title: Proactive Replies Enabled
          description: Allow unprompted replies in message threads.
        proactive_top_level_posts_enabled:
          type: boolean
          title: Proactive Top Level Posts Enabled
          description: Allow unprompted top-level channel messages.
        max_reactions_per_channel_per_hour:
          type: integer
          maximum: 1000.0
          minimum: 0.0
          title: Max Reactions Per Channel Per Hour
          description: The hourly reaction limit in each channel.
        max_replies_per_channel_per_hour:
          type: integer
          maximum: 1000.0
          minimum: 0.0
          title: Max Replies Per Channel Per Hour
          description: The hourly reply limit in each channel.
        max_top_level_posts_per_channel_per_hour:
          type: integer
          maximum: 1000.0
          minimum: 0.0
          title: Max Top Level Posts Per Channel Per Hour
          description: The hourly limit on top-level messages in each channel.
      additionalProperties: false
      type: object
      required:
      - enabled
      - reaction_mode
      - reaction_allowlist
      - proactive_reactions_enabled
      - proactive_replies_enabled
      - proactive_top_level_posts_enabled
      - max_reactions_per_channel_per_hour
      - max_replies_per_channel_per_hour
      - max_top_level_posts_per_channel_per_hour
      title: MessageActionPolicyBody
      description: 'Request body for setting a workspace''s message-action policy (admin only, full replace).


        **EVERY POLICY FIELD IS REQUIRED, AND THAT IS THE WHOLE DESIGN OF THIS CLASS.** It carries no

        defaults for any field it can STORE, which is what makes it impossible for this body and

        :class:`MessageActionPolicy` to declare two different defaults for the same field. (The two

        GET echoes below do default to ``None`` — they are accepted so a GET response round-trips,

        excluded from every dump, and never stored, so neither is a second declaration of a policy

        value that could drift.) There is exactly one set of field defaults for the policy in this

        module — the policy''s own — and it answers exactly one question: what a workspace that has

        NEVER been configured gets. The read path''s :data:`_ABSENT_KEY_FALLBACKS` is not a second set:

        it narrows a STORED block that omits a key, where absence is missing information with nobody

        left to ask. Absence in a REQUEST is different — the caller is present to be told — so "what

        if they left it out" is not a defaults question at all; it is a malformed request.


        It was not always so, and the failure that changed it is worth keeping. Every field used to

        carry its own default, which meant the same field was declared twice with two independent

        values, and they drifted: ``proactive_reactions_enabled`` was ``True`` on the policy (shipped

        2026-08-03) and ``False`` here, so a ``PUT`` that omitted it silently disabled the capability

        that had just shipped, answered 200, and published ``default: false`` in the OpenAPI contract as

        if that were correct. The console had already diagnosed this from the outside and worked around

        it client-side (``useMessageActionPolicy.ts``''s ``Required<…>`` guard, whose comment called a

        partial body "silent data loss" until the hole closed); the hole itself was server-side and

        stayed open.


        Syncing the two sets of defaults was the obvious repair and is the wrong one: it only changes

        WHICH silent thing an omission does. With them synced, omitting ``proactive_replies_enabled``

        would GRANT unprompted replies — text that cannot be taken back — to a workspace that had turned

        them off. The same argument, about the allowlist, was already written in this file before this

        change: defaulting it to empty "would make the same partial body silently disable every reaction

        instead, trading one surprise for a worse one."


        So the second set of defaults is deleted rather than corrected. An omitted field is now a 422

        naming it, which is what the endpoint description and the owner checklist have always told

        callers to expect ("send every field"), and what the console already enforces at compile time.

        Loud beats either flavour of silent.'
    MessageActionPolicyResponse:
      properties:
        enabled:
          type: boolean
          title: Enabled
        reaction_mode:
          type: string
          enum:
          - all
          - custom
          title: Reaction Mode
        reaction_allowlist:
          items:
            type: string
          type: array
          title: Reaction Allowlist
        proactive_reactions_enabled:
          type: boolean
          title: Proactive Reactions Enabled
        proactive_replies_enabled:
          type: boolean
          title: Proactive Replies Enabled
        proactive_top_level_posts_enabled:
          type: boolean
          title: Proactive Top Level Posts Enabled
        max_reactions_per_channel_per_hour:
          type: integer
          title: Max Reactions Per Channel Per Hour
        max_replies_per_channel_per_hour:
          type: integer
          title: Max Replies Per Channel Per Hour
        max_top_level_posts_per_channel_per_hour:
          type: integer
          title: Max Top Level Posts Per Channel Per Hour
        stored_policy_unreadable:
          type: boolean
          title: Stored Policy Unreadable
          default: false
        dropped_allowlist_entries:
          type: integer
          title: Dropped Allowlist Entries
          default: 0
      additionalProperties: false
      type: object
      required:
      - enabled
      - reaction_mode
      - reaction_allowlist
      - proactive_reactions_enabled
      - proactive_replies_enabled
      - proactive_top_level_posts_enabled
      - max_reactions_per_channel_per_hour
      - max_replies_per_channel_per_hour
      - max_top_level_posts_per_channel_per_hour
      title: MessageActionPolicyResponse
      description: The effective message-action policy for a workspace.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer