Terapi Actions API

Trigger actions on connected third-party services

OpenAPI Specification

terapi-actions-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Terapi Actions API
  description: Terapi is an open-source embedded integration platform for building native product integrations. The REST API provides endpoints for managing integration connections, synchronizing data between third-party services, triggering actions on external APIs, and managing authentication tokens. Terapi enables SaaS products to offer native integrations to their customers without building each connector from scratch.
  version: '1.0'
  contact:
    name: Terapi Team
    url: https://terapi.dev
servers:
- url: https://api.terapi.dev
  description: Terapi Cloud API
- url: http://localhost:3003
  description: Terapi Self-Hosted API
security:
- SecretKeyAuth: []
tags:
- name: Actions
  description: Trigger actions on connected third-party services
paths:
  /action/trigger:
    post:
      operationId: triggerAction
      summary: Trigger Action
      description: Triggers an action on a connected third-party service via the specified connection. Actions are write operations like creating a record, sending a message, or updating a resource.
      tags:
      - Actions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerActionRequest'
      responses:
        '200':
          description: Action triggered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Authentication failed - invalid or missing secret key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: Invalid request parameters or body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ActionResponse:
      type: object
      description: Result of a triggered action
      properties:
        success:
          type: boolean
        action_name:
          type: string
        output:
          type: object
          description: Output data returned by the action
          additionalProperties: true
        error:
          type: string
          description: Error message if action failed
    TriggerActionRequest:
      type: object
      required:
      - connection_id
      - provider_config_key
      - action_name
      properties:
        connection_id:
          type: string
          description: The connection to perform the action on
        provider_config_key:
          type: string
          description: The provider config key
        action_name:
          type: string
          description: The name of the action to trigger
        input:
          type: object
          description: Input parameters for the action
          additionalProperties: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error type
        message:
          type: string
          description: Human-readable error message
  securitySchemes:
    SecretKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Secret key from Terapi environment settings. Passed as 'Bearer {secret_key}'
externalDocs:
  description: Terapi Documentation
  url: https://docs.terapi.dev