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

# Update or End Live Activity Test

> Update or end the owned test using its pinned test handle.

This endpoint requires `push.test.send` and the test's explicitly selected project. Supply `event: "update"` or `"end"` and the permitted payload. The existing creator, app, and device remain pinned. End the authorized test when the workflow is complete.


## OpenAPI

````yaml api-reference/openapi.json POST /push/live-activity-tests/{test_id}/notifications
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.2.0
servers:
  - url: https://api.sendrealm.com
security:
  - bearerAuth: []
paths:
  /push/live-activity-tests/{test_id}/notifications:
    post:
      summary: Update or end an owned test; production activities cannot be selected.
      parameters:
        - name: X-Sendrealm-Project-Id
          in: header
          required: false
          schema:
            type: string
            format: uuid
          description: >-
            Explicit project context. Required for personal-key project resource
            calls; integration keys retain their configured default. MCP clients
            supply project_id in each tool call instead.
        - name: test_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event:
                  type: string
                  description: Test lifecycle event.
                  enum:
                    - update
                    - end
                activity_type:
                  type: string
                  description: Native activity type.
                attributes_type:
                  type: string
                  description: Native activity attributes type.
                title:
                  type: string
                  description: Activity title.
                subtitle:
                  type: string
                  description: Activity subtitle.
                body:
                  type: string
                  description: Activity message.
                status:
                  type: string
                  description: Application status.
                progress:
                  type: number
                  minimum: 0
                  maximum: 1
                eta:
                  type: string
                  description: Application ETA.
                image_url:
                  type: string
                  description: Image URL.
                  format: uri
                accent_color:
                  type: string
                  description: Accent color.
                launch_url:
                  type: string
                  description: Tap destination.
                content_state:
                  type: object
                  additionalProperties:
                    $ref: '#/components/schemas/McpJsonValue'
                attributes:
                  type: object
                  additionalProperties:
                    $ref: '#/components/schemas/McpJsonValue'
                priority:
                  type: integer
                  enum:
                    - 5
                    - 10
                stale_at:
                  type: string
                  description: ISO 8601 stale time.
                  format: date-time
                dismiss_at:
                  type: string
                  description: ISO 8601 dismiss time.
                  format: date-time
                relevance_score:
                  type: number
                  minimum: 0
                  maximum: 1
                sound:
                  type: string
                  description: Native sound.
                data:
                  type: object
                  additionalProperties:
                    $ref: '#/components/schemas/McpJsonValue'
                stale_date:
                  type: string
                  description: Legacy alias for stale_at.
                  format: date-time
                dismissal_date:
                  type: string
                  description: Legacy alias for dismiss_at.
                  format: date-time
                buttons:
                  type: array
                  maxItems: 3
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Button identifier.
                        minLength: 1
                        maxLength: 64
                      text:
                        type: string
                        description: Button label.
                        maxLength: 48
                      title:
                        type: string
                        description: Label alias.
                        maxLength: 48
                      icon:
                        type: string
                        description: Native icon.
                      launch_url:
                        type: string
                        description: Tap destination.
                    required:
                      - id
                    additionalProperties: false
                  description: Native activity buttons.
              required:
                - event
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  data:
                    $ref: '#/components/schemas/McpLiveActivityTest'
                  metadata:
                    $ref: '#/components/schemas/PaginationMetadata'
                required:
                  - data
                additionalProperties:
                  $ref: '#/components/schemas/JsonValue'
        '400':
          description: Invalid input with field-level issues.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid, expired or revoked credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Scope, grant or current role does not permit this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Owned test handle or resource is unavailable in this project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The test has ended or conflicts with its immutable device binding. A
            repeated end sends nothing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    McpJsonValue:
      oneOf:
        - type: string
          nullable: true
        - type: number
        - type: boolean
        - type: array
          items:
            $ref: '#/components/schemas/McpJsonValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/McpJsonValue'
      description: >-
        JSON application data. Do not include credentials or unnecessary
        personal data.
      x-sendrealm-mcp-contract: true
    McpLiveActivityTest:
      type: object
      properties:
        test_id:
          type: string
          format: uuid
        activity_id:
          type: string
          description: Server-generated activity ID. Use test_id for lifecycle calls.
        device_id:
          type: string
          nullable: true
        state:
          type: string
        recipients:
          type: object
          properties:
            total:
              type: integer
            sent:
              type: integer
            failed:
              type: integer
          required:
            - total
            - sent
            - failed
          additionalProperties: false
        events:
          type: array
          items:
            $ref: '#/components/schemas/McpJsonValue'
        events_has_more:
          type: boolean
        links:
          type: object
          additionalProperties:
            type: string
      required:
        - test_id
        - activity_id
        - device_id
        - state
      additionalProperties:
        $ref: '#/components/schemas/JsonValue'
    PaginationMetadata:
      type: object
      required:
        - total
        - items
        - limit
        - after
        - next
        - has_more
      properties:
        total:
          type: integer
        items:
          type: integer
        limit:
          type: integer
        after:
          type: string
          nullable: true
        next:
          type: string
          nullable: true
        has_more:
          type: boolean
    JsonValue:
      oneOf:
        - type: string
          nullable: true
        - type: number
        - type: boolean
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
    Error:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: integer
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            details:
              $ref: '#/components/schemas/JsonValue'
            issues:
              type: array
              items:
                $ref: '#/components/schemas/ValidationIssue'
    ValidationIssue:
      type: object
      required:
        - code
        - path
        - message
      properties:
        code:
          type: string
        path:
          type: string
          nullable: true
        message:
          type: string
  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.