openapi: 3.2.0 info: title: Bonjoro API V2 Automation Triggers API description: Bonjoro API definitions version: 1.0.0 servers: - url: https://www.bonjoro.com/ tags: - name: Automation Triggers paths: /api/v2/automation/triggers: get: tags: - Automation Triggers summary: Get all automation triggers operationId: getAutomationTriggers responses: '200': description: ok content: application/json: schema: $ref: '#/components/schemas/automationTriggers' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/unauthorized' security: - OAuth: [] post: tags: - Automation Triggers summary: Add a trigger to the specified service operationId: postAutomationTrigger requestBody: content: application/json: schema: properties: service: type: string enum: - active_campaign - bonjoro - convertkit - drip - hubspot_crm - infusionsoft - intercom - mailchimp - mailerlite - ontraport - patreon-v2 - shopify - slack trigger: type: string example: bonjoro_created type: object responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Ok data: $ref: '#/components/schemas/automationTrigger' type: object '400': description: 400 Bad Request content: application/json: schema: $ref: '#/components/schemas/badRequest' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/unauthorized' security: - OAuth: [] /api/v2/automation/triggers/{trigger_id}: put: tags: - Automation Triggers summary: Assign the specified account to the trigger operationId: putAutomationTrigger requestBody: content: application/json: schema: properties: account_id: type: string format: uuid type: object responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Updated data: $ref: '#/components/schemas/automationTrigger' type: object '400': description: 400 Bad Request content: application/json: schema: $ref: '#/components/schemas/badRequest' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/unauthorized' '404': description: 404 Not Found content: application/json: schema: $ref: '#/components/schemas/notFound' security: - OAuth: [] components: schemas: automationTrigger: properties: uuid: type: string format: uuid type: type: string example: subscribe service: type: string example: active_campaign account_id: type: - string - 'null' format: uuid type: object automationTriggers: allOf: - properties: data: type: array items: allOf: - $ref: '#/components/schemas/automationTrigger' type: object - $ref: '#/components/schemas/pagination' pagination: properties: current_page: type: integer example: 1 first_page_url: type: string last_page_url: type: string path: type: string from: type: integer example: 1 last_page: type: integer example: 2 next_page_url: type: string per_page: type: integer example: 15 prev_page_url: type: integer type: object notFound: properties: error: properties: message: type: string example: Not Found status_code: type: integer example: 404 type: object type: object unauthorized: properties: message: type: string example: Unauthorized. type: object badRequest: properties: error: properties: message: type: string example: Error message status_code: type: integer example: 400 type: object type: object