> ## 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

> 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/execute
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/execute:
    post:
      tags:
        - Agent messaging
      summary: Automations publish
      description: >-
        Feature-gated personal-key operation. Scope, saved grants, current role
        and resource ownership all apply. Billing is excluded.
      operationId: automations_publish
      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:
              $ref: '#/components/schemas/McpPreparedExecution'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  data:
                    $ref: '#/components/schemas/Automation'
                required:
                  - status
                  - data
                additionalProperties: false
                x-sendrealm-mcp-contract: true
components:
  schemas:
    McpPreparedExecution:
      type: object
      properties:
        prepared_action_id:
          type: string
          format: uuid
        idempotency_key:
          type: string
          minLength: 1
          maxLength: 160
      additionalProperties: false
      x-sendrealm-mcp-contract: true
      required:
        - prepared_action_id
        - idempotency_key
    Automation:
      type: object
      required:
        - id
        - name
        - description
        - status
        - current_draft_version_id
        - current_published_version_id
        - created_at
        - updated_at
        - deleted_at
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
          nullable: true
        status:
          type: string
        current_draft_version_id:
          type: string
          format: uuid
          nullable: true
        current_published_version_id:
          type: string
          format: uuid
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: 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.