openapi: 3.2.0 info: title: Bonjoro API V2 Invites API description: Bonjoro API definitions version: 1.0.0 servers: - url: https://www.bonjoro.com/ tags: - name: Invites paths: /api/v2/invites: get: tags: - Invites summary: Get paginated team invites operationId: getInvites parameters: - name: team_id in: query schema: type: string format: uuid responses: '200': description: ok content: application/json: schema: $ref: '#/components/schemas/invites' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/unauthorized' security: - OAuth: [] post: tags: - Invites summary: Add an invite operationId: postInvite requestBody: content: application/json: schema: $ref: '#/components/schemas/inviteAddPayload' responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Created data: $ref: '#/components/schemas/invite' 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/{invite_id}/resend: put: tags: - Invites summary: Resend an invite operationId: resendInvite parameters: - name: invite_id in: path required: true schema: type: string format: uuid responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Updated data: $ref: '#/components/schemas/invite' 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/{invite_id}: delete: tags: - Invites summary: Delete an invite operationId: deleteInvite parameters: - name: invite_id in: path required: true schema: type: string format: uuid responses: '200': description: ok content: application/json: schema: properties: message: type: string example: Deleted data: $ref: '#/components/schemas/invite' 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: [] components: schemas: inviteAddPayload: properties: team_id: type: string format: uuid email: type: string format: email role: type: - string - 'null' enum: - admin - filmer 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 invites: allOf: - properties: data: type: array items: allOf: - $ref: '#/components/schemas/invite' type: object - $ref: '#/components/schemas/pagination' idUUID: properties: id: type: string format: uuid example: a5e7c858-1f85-4fe2-8c1d-4c77cfc3204f type: object badRequest: properties: error: properties: message: type: string example: Error message status_code: type: integer example: 400 type: object type: object unauthorized: properties: message: type: string example: Unauthorized. type: object invite: allOf: - properties: team_id: type: string format: uuid email: type: string format: email first_name: type: string example: Tony last_name: type: string example: Stark role: type: string enum: - admin - filmer example: admin sent_at: type: - string - 'null' format: datetime example: '2021-01-11 01:51:26' creator_url: type: string format: uri example: http://path-to-creator-url creator: properties: id: type: string format: uuid image: type: string example: /path-to-image type: object self_url: type: string format: uri example: http://path-to-self-url team_url: type: string format: uri example: http://path-to-self-url type: object - $ref: '#/components/schemas/idUUID'