> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendrealm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automations publish prepare

> Feature-gated personal-key operation. Scope, saved grants, current role and resource ownership all apply. Billing is excluded.

Requires the messaging rollout flag and explicit personal-key permissions. Live publishing and lifecycle changes require an expiring preparation and idempotent execution.


## OpenAPI

````yaml api-reference/openapi.json POST /automations/{id}/actions/publish/prepare
openapi: 3.0.1
info:
  title: Sendrealm API
  description: >-
    API for email, push, audience resources, domains, campaign drafts,
    templates, events, topics, and automations
  license:
    name: MIT
  version: 0.3.0
servers:
  - url: https://api.sendrealm.com
security:
  - bearerAuth: []
paths:
  /automations/{id}/actions/publish/prepare:
    post:
      tags:
        - Agent messaging
      summary: Automations publish prepare
      description: >-
        Feature-gated personal-key operation. Scope, saved grants, current role
        and resource ownership all apply. Billing is excluded.
      operationId: automations_publish_prepare
      parameters:
        - name: X-Sendrealm-Project-Id
          in: header
          required: true
          schema:
            type: string
            format: uuid
          description: Explicit authorized project. Its team is derived server-side.
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
              additionalProperties: false
              x-sendrealm-mcp-contract: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  data:
                    $ref: '#/components/schemas/McpMessagingPreparation'
                required:
                  - status
                  - data
                additionalProperties: false
                x-sendrealm-mcp-contract: true
components:
  schemas:
    McpMessagingPreparation:
      type: object
      properties:
        prepared_action_id:
          type: string
          format: uuid
        operation:
          type: string
        expires_at:
          type: string
          format: date-time
        effects:
          type: object
          properties:
            resource_type:
              type: string
              enum:
                - templates
                - automations
            resource_id:
              type: string
              format: uuid
            action:
              type: string
              enum:
                - publish
                - pause
                - resume
                - delete
            current_status:
              type: string
            proposed_status:
              type: string
            live_automation_effects:
              type: boolean
            immediately_sends_messages:
              type: boolean
              enum:
                - false
          required:
            - resource_type
            - resource_id
            - action
            - current_status
            - proposed_status
            - live_automation_effects
            - immediately_sends_messages
          additionalProperties: false
          x-sendrealm-mcp-contract: true
      required:
        - prepared_action_id
        - operation
        - expires_at
        - effects
      additionalProperties: false
      x-sendrealm-mcp-contract: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Integration key for backend workloads, or a scoped personal key
        (sr_user_) for account discovery and supported project operations. MCP
        accepts only personal keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.