openapi: 3.2.0 info: title: Bonjoro API V2 Greets API description: Bonjoro API definitions version: 1.0.0 servers: - url: https://www.bonjoro.com/ tags: - name: Greets paths: /api/v2/greets: get: tags: - Greets summary: Get paginated greets operationId: getGreets parameters: - name: profile_id in: query schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 - name: assignee_id in: query schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 - name: status in: query schema: type: string enum: - open - closed - sent example: open - name: simple in: query schema: type: boolean example: true - name: search in: query description: Search for profiles where email, firstname and lastname matches the search term schema: type: string - name: sort in: query schema: type: string enum: - created_at - updated_at - uploaded_at - awaiting_reply - last_modified - last_replied_at example: created_at responses: '200': description: ok content: application/json: schema: $ref: '#/components/schemas/greets' '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: [] post: tags: - Greets summary: Add a greet operationId: postGreet requestBody: content: application/json: schema: properties: profiles: description: An array of profiles type: array items: type: string format: email | uuid maxItems: 200 assignee_id: description: The assignee of the created task type: - string - 'null' format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 note: description: A note to add to the task type: - string - 'null' example: New signup campaign_id: description: The workspace in which to create the task type: - string - 'null' format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 template_id: description: A message template to set for the task type: - string - 'null' format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 custom_attributes: description: Key/value pairs describing custom attributes for the task type: - object - 'null' type: object responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Created data: $ref: '#/components/schemas/greetFull' 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: [] delete: tags: - Greets summary: Delete multiple greets operationId: delete multipleGreets parameters: - name: greets[] in: query schema: type: array items: type: string format: uuid responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Deleted data: $ref: '#/components/schemas/greetFull' 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: [] patch: tags: - Greets summary: Updates assignee_id and/or campaign_id of the specified greets operationId: updateManyGreets requestBody: content: application/json: schema: properties: assignee_id: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 campaign_id: type: integer example: 5 greets: description: An array of greet uuids type: array items: type: string type: object responses: '200': description: ok content: application/json: schema: $ref: '#/components/schemas/greets' '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: [] /api/v2/greets/{greet_id}: put: tags: - Greets summary: Update the assignee for a greet operationId: putGreet parameters: - name: greet_id in: path schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 requestBody: content: application/json: schema: properties: assignee_id: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 type: object responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Updated data: $ref: '#/components/schemas/greetFull' 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: [] delete: tags: - Greets summary: Delete a greet operationId: deleteGreet parameters: - name: greet_id in: path schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Deleted data: $ref: '#/components/schemas/greetFull' 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: [] /api/v2/greets/create: post: tags: - Greets summary: Create greets in bulk operationId: bulkCreateGreets requestBody: content: application/json: schema: properties: assignee_id: type: string format: uuid example: a9c34499-8573-4ae5-b596-56aaf4d83b29 campaign_id: type: - string - 'null' format: uuid example: a9c34499-8573-4ae5-b596-56aaf4d83b29 sync: type: - integer - 'null' enum: - 1 - 0 example: 0 reason: type: - string - 'null' format: string example: New Sign Up lines: type: array items: properties: email: type: string format: email example: mail@gmail.com first_name: type: - string - 'null' format: string example: Joe last_name: type: - string - 'null' format: string example: Bloggs reason: type: - string - 'null' format: string example: New Sign Up type: object type: object responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Created type: object '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/unauthorized' security: - OAuth: [] /api/v2/greets/{greet_id}/notifications: post: tags: - Greets summary: Mark greet as complete operationId: sendNotification parameters: - name: greet_id in: path schema: type: string format: uuid example: e885c1ff-0d2e-4b45-a4bb-ea8b09a30a19 requestBody: content: application/json: schema: properties: via: type: array items: type: string enum: - email type: object responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Sent data: $ref: '#/components/schemas/greetFull' 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: [] /api/v2/greets/rollup: post: tags: - Greets summary: Rollup and delete greets operationId: rollupGreets requestBody: content: application/json: schema: properties: type: type: string example: no_name campaign_id: type: integer example: 5 type: object responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Complete data: properties: count: type: integer example: 1 type: object type: object '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/unauthorized' security: - OAuth: [] /api/v2/greets/{greet_id}/{profile_id}/update: post: tags: - Greets summary: Update a greet profile and event message operationId: updateGreetsProfile parameters: - name: greet_id in: path schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 - name: profile_id in: path schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 requestBody: content: application/json: schema: $ref: '#/components/schemas/greetProfileUpdatePayload' responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Updated data: $ref: '#/components/schemas/updateGreetProfileResult' 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: [] /api/v2/greets/{greet_id}/{profile_id}: delete: tags: - Greets summary: Delete a greet profile operationId: deleteGreetProfile parameters: - name: greet_id in: path schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 - name: profile_id in: path schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Deleted data: $ref: '#/components/schemas/greetFull' 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: [] /api/v2/greets/{greet_id}/events: get: tags: - Greets summary: Get paginated greet events operationId: getGreetEvents parameters: - name: greet_id in: path schema: type: string format: uuid example: e885c1ff-0d2e-4b45-a4bb-ea8b09a30a19 responses: '200': description: ok content: application/json: schema: $ref: '#/components/schemas/greets' '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: [] /api/v2/greets/{greet_id}/profiles: get: tags: - Greets summary: Get paginated greet profiles operationId: getGreetProfiles parameters: - name: greet_id in: path schema: type: string format: uuid example: e885c1ff-0d2e-4b45-a4bb-ea8b09a30a19 responses: '200': description: ok content: application/json: schema: $ref: '#/components/schemas/greetProfiles' '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: [] /api/v2/greets/results: get: tags: - Greets summary: Get paginated greet results operationId: getGreetResults parameters: - name: sort in: query schema: type: string enum: - created_at - updated_at - uploaded_at - awaiting_reply - last_modified - last_replied_at example: created_at - name: assignee_id in: query schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 - name: profile_id in: query schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 - name: limit in: query schema: type: integer example: '10' - name: simple in: query schema: type: boolean example: true responses: '200': description: ok content: application/json: schema: $ref: '#/components/schemas/greetResults' '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: [] /api/v2/greets/results/stats: get: tags: - Greets summary: Get paginated lightweight greet results stats operationId: getGreetResultsStats parameters: - name: sort in: query schema: type: string enum: - created_at - updated_at - uploaded_at - awaiting_reply - last_modified - last_replied_at example: created_at - name: assignee_id in: query schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 - name: profile_id in: query schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 - name: limit in: query schema: type: integer example: '10' - name: simple in: query schema: type: boolean example: true responses: '200': description: ok content: application/json: schema: $ref: '#/components/schemas/greetResultsStats' '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: [] /api/v2/greets/todo: get: tags: - Greets summary: Get paginated greet todos operationId: getGreetTodos parameters: - name: profile_id in: query schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 - name: assignee_id in: query schema: type: string format: uuid example: 7b9d182a-a687-472b-8212-2c817a7ae088 - name: search in: query description: Search for profiles where email, firstname and lastname matches the search term schema: type: string responses: '200': description: ok content: application/json: schema: $ref: '#/components/schemas/greets' '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: [] /api/v2/greets/{greet_id}/upload-url: get: tags: - Greets summary: Get S3 upload url for a greet operationId: getGreetUploadUrl parameters: - name: greet_id in: path schema: type: string format: uuid example: e885c1ff-0d2e-4b45-a4bb-ea8b09a30a19 responses: '200': description: ok content: application/json: schema: properties: method: type: string example: PUT url: type: string format: ui example: http://example-path-to-url expires: type: integer format: unix-timestamp example: 1610510383 type: object '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: [] /api/v2/greets/{greet_id}/uploads: post: tags: - Greets summary: Update greet metadata operationId: postGreetProfiles parameters: - name: greet_id in: path schema: type: string format: uuid requestBody: content: multipart/form-data: schema: properties: thumbnail: type: string format: binary video: description: DEPRECATED type: string format: binary message_template_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/greetFull' 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: greetProfileStats: properties: stats: properties: opened: type: boolean example: true watched: type: boolean example: true clicked: type: boolean example: false reacted: type: boolean example: false viewed: type: boolean example: true shared: type: boolean example: false recipient_replied: type: boolean example: false date_opened: type: - string - 'null' format: datetime example: '2021-01-10T12:22:41.000000Z' date_replied: type: - string - 'null' format: datetime example: '2021-01-10T12:22:41.000000Z' opens: type: integer example: 0 clicks: type: integer example: 0 views: type: integer example: 0 shares: type: integer example: 0 reactions: type: integer example: 0 type: object type: object 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 mtEmailTemplate: properties: layout: type: string enum: - html - plain example: html subject_line: type: string example: Here's a personal video I recorded for you. message_template: type: string example: Hi {first_name|there}, I recorded a message for you, check it out! type: object greetFull: allOf: - properties: profiles: type: array items: allOf: - $ref: '#/components/schemas/profile' - $ref: '#/components/schemas/profileDemographic' type: object - properties: message_template: $ref: '#/components/schemas/messageTemplate' type: object - $ref: '#/components/schemas/greet' updateGreetProfileResult: properties: greets: $ref: '#/components/schemas/greetFull' profile: $ref: '#/components/schemas/profile' type: object unauthorized: properties: message: type: string example: Unauthorized. type: object mtMedia: allOf: - properties: type: type: string enum: - Media - StockMedia example: Media name: type: string example: like.png tags: type: string example: background image url: type: string format: uri example: http://example-path-to-url type: object - $ref: '#/components/schemas/idUUID' - $ref: '#/components/schemas/timestamps' greetResult: allOf: - properties: profile: $ref: '#/components/schemas/profile' last_replied_at: type: - string - 'null' format: datetime awaiting_reply: type: - integer - 'null' example: 1 results_modal_url: type: string format: uri example: http://domain/path-to-modal results_url: type: string format: uri example: http://domain/path-to-modal replies: type: array items: {} greet: type: object allOf: - properties: is_multigreet: type: boolean example: false last_modified_at: type: datetime example: '2021-01-10T12:22:41.000000Z' preview: properties: image: type: - string - 'null' example: http://path-to-s3-asset/ gif: type: - string - 'null' example: http://path-to-s3-asset/ video: type: - string - 'null' example: http://path-to-s3-asset/ type: object type: object - $ref: '#/components/schemas/greet' type: object - $ref: '#/components/schemas/idUUID' - $ref: '#/components/schemas/greetProfileStats' greetProfiles: allOf: - properties: data: type: array items: allOf: - properties: attributes: type: array items: {} type: object - $ref: '#/components/schemas/profile' - $ref: '#/components/schemas/profileDemographic' - $ref: '#/components/schemas/greetProfileStats' type: object - $ref: '#/components/schemas/pagination' user: properties: id: type: string format: uuid example: bbf3195e-21a3-4e6a-9698-9b8c09ec0b5b bio: type: string example: Example bio first_name: type: string example: John image: type: string format: uri example: https://example-path-to-image.jpg last_name: type: string example: Jones name: type: string example: John Jones self_url: type: string format: uri example: https://example-path-to-self-url team_url: type: string format: uri example: https://example-path-to-team-url type: object mtLandingPage: properties: background: $ref: '#/components/schemas/mtMedia' background_type: type: string enum: - Media - StockMedia example: Media logo: $ref: '#/components/schemas/mtMedia' cta: $ref: '#/components/schemas/mtCallToAction' type: object badRequest: properties: error: properties: message: type: string example: Error message status_code: type: integer example: 400 type: object type: object resultStats: properties: greet: $ref: '#/components/schemas/greetFull' profile: $ref: '#/components/schemas/user' stats: $ref: '#/components/schemas/greetProfileStats' replies: type: array items: $ref: '#/components/schemas/reply' sent_at: type: - string - 'null' format: datetime awaiting_reply: type: - string - 'null' format: boolean enum: - true - false last_replied_at: type: - string - 'null' format: datetime example: '2021-01-18 05:21:04' type: object timestamps: properties: created_at: type: string format: datetime example: '2021-01-11 01:51:26' updated_at: type: - string - 'null' format: datetime example: '2021-01-11 01:51:26' type: object mtCallToAction: allOf: - properties: text: type: string example: Send your own videos url: type: string format: uri example: http://example-path-to-url is_displayed: type: boolean example: false type: object - $ref: '#/components/schemas/idUUID' - $ref: '#/components/schemas/timestamps' messageTemplate: allOf: - properties: name: type: string example: Magic is_greet_shareable: type: boolean example: true theme: $ref: '#/components/schemas/mtTheme' landing_page: $ref: '#/components/schemas/mtLandingPage' state: type: string enum: - open - demo - locked example: open email_template: $ref: '#/components/schemas/mtEmailTemplate' creator: $ref: '#/components/schemas/user' stats: $ref: '#/components/schemas/mtStats' type: object - $ref: '#/components/schemas/idUUID' - $ref: '#/components/schemas/timestamps' reply: allOf: - properties: content: type: string example: This is en example response author: type: object allOf: - properties: name: type: string example: Takeshi Kovaks is_recepient: type: boolean enum: - true - false is_current_user: type: boolean enum: - true - false created_at: type: string format: datetime example: 2021-01-18T06:26:56+0000 type: object - $ref: '#/components/schemas/idUUID' type: object - $ref: '#/components/schemas/idUUID' mtTheme: allOf: - properties: primary_color: type: string example: '#fc5a00' secondary_color: type: string example: '#ffffff' type: object - $ref: '#/components/schemas/idUUID' - $ref: '#/components/schemas/timestamps' mtStats: properties: total: type: integer example: 0 percentage_replies: type: integer example: 0 percentage_views: type: integer example: 0 percentage_reactions: type: integer example: 0 percentage_clicks: type: integer example: 0 percentage_opens: type: integer example: 0 type: object greetProfileUpdatePayload: properties: email: type: string format: email example: email@mail.com first_name: type: string example: Jane last_name: type: string example: Foster message: description: The event message type: string example: This is an event message type: object profile: allOf: - properties: email: type: string format: email example: mail@mail.com name: type: string example: Michael Burnham first_name: type: - string - 'null' example: Michael last_name: type: - string - 'null' example: Burnham image: type: string format: uri example: http://example-path-to-image.jpg work: properties: current: type: - string - 'null' title: type: - string - 'null' type: object self_url: type: string format: uri example: http://example-path-to-self-url attributes_url: type: string format: uri example: http://example-path-to-attributes-url events_url: type: string format: uri example: http://example-path-to-events-url unsubscribed: type: boolean type: object - $ref: '#/components/schemas/idUUID' greetResultsStats: allOf: - properties: data: type: array items: allOf: - $ref: '#/components/schemas/resultStats' type: object - $ref: '#/components/schemas/pagination' greetResults: allOf: - properties: data: type: array items: allOf: - $ref: '#/components/schemas/greetResult' type: object - $ref: '#/components/schemas/pagination' idUUID: properties: id: type: string format: uuid example: a5e7c858-1f85-4fe2-8c1d-4c77cfc3204f type: object greet: allOf: - properties: assignee: $ref: '#/components/schemas/user' link_id: type: string format: uuid example: 1b8c061b-058c-4636-a34d-95bc0ac6acbb event: $ref: '#/components/schemas/event' status: type: string example: open draft: type: boolean example: false thumb_url: type: string format: uri example: http://example-path-to-thumb-url.png record_url: type: string format: uri example: http://example-path-to-record-url uploads_url: type: string format: uri example: http://example-path-to-uploads-url self_url: type: string format: uri example: http://example-path-to-self-url attributes_url: type: string format: uri example: http://example-path-to-attributes-url events_url: type: string format: uri example: http://example-path-to-events-url type: object - $ref: '#/components/schemas/idUUID' - $ref: '#/components/schemas/timestamps' notFound: properties: error: properties: message: type: string example: Not Found status_code: type: integer example: 404 type: object type: object greets: allOf: - properties: data: type: array items: allOf: - $ref: '#/components/schemas/greetFull' type: object - $ref: '#/components/schemas/pagination' event: properties: message: type: string example: Send a practice message to yourself occured_at: type: string example: '2021-01-11 01:21:28' id: type: string example: 89ca52c2-a846-49e1-8019-6783802e363d type: type: string example: DemoEvent source: type: string example: User type: object profileDemographic: properties: demographic: properties: location: type: - string - 'null' country: type: - string - 'null' age: type: - string - 'null' sex: type: - string - 'null' type: object type: object