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

# Trigger automation

> Trigger automation.



## OpenAPI

````yaml /api-reference/openapi-v3.json post /automations/{automationId}/trigger
openapi: 3.1.0
info:
  title: Heyy API
  version: 3.0.0
servers:
  - url: https://api.heyy.io/v3
security:
  - bearerAuth: []
paths:
  /automations/{automationId}/trigger:
    post:
      summary: Trigger automation
      description: Trigger automation.
      parameters:
        - name: automationId
          in: path
          required: true
          schema:
            type: string
            description: Automation id.
          description: Automation id.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contactId:
                  type: string
                  format: uuid
                  description: contact id for this automation.
                variables:
                  type: object
                  additionalProperties:
                    type: string
                    description: >-
                      Variable values for the automation trigger payload. (keyed
                      by variable name).
                  description: Variable values for the automation trigger payload.
                scheduledAt:
                  type: string
                  format: date-time
                  description: ISO 8601 datetime for this automation.
              required:
                - contactId
              additionalProperties: false
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                required:
                  - success
                additionalProperties: false
          description: OK
        '400':
          $ref: '#/components/responses/ApiError400'
        '401':
          $ref: '#/components/responses/ApiError401'
        '402':
          $ref: '#/components/responses/ApiError402'
        '403':
          $ref: '#/components/responses/ApiError403'
        '404':
          $ref: '#/components/responses/ApiError404'
        '429':
          $ref: '#/components/responses/ApiError429'
        '500':
          $ref: '#/components/responses/ApiError500'
components:
  responses:
    ApiError400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: invalid_body_params
              message: Invalid body params
              invalidParams:
                email:
                  key: invalid_string
                  message: Invalid email
      description: Bad request.
    ApiError401:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: unauthorized
              message: Unauthorized
      description: Unauthorized.
    ApiError402:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: insufficient_billing_plan
              message: Insufficient billing plan
      description: Payment required.
    ApiError403:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: forbidden
              message: Forbidden
      description: Forbidden.
    ApiError404:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: contact_not_found
              message: Contact not found
      description: Not found.
    ApiError429:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: too_many_requests
              message: >-
                Too many requests. Limit is applied per minute per tenant.
                Please retry after the time indicated by the X-RateLimit-Reset
                header.
      description: Too many requests.
    ApiError500:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            success: false
            error:
              messageKey: internal_error
              message: Oops! Something went wrong
      description: Internal server error.
  schemas:
    ApiErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
          description: Request success.
        error:
          type: object
          properties:
            messageKey:
              type: string
              description: Request message key.
            message:
              type: string
              description: Request message.
            invalidParams:
              type: object
              additionalProperties:
                type: object
                properties:
                  key:
                    type: string
                    description: Request key.
                  message:
                    type: string
                    description: Request message.
                required:
                  - key
                  - message
              description: Request invalid params object.
          description: Request error object.
      required:
        - success
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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