chore: Add Swagger Doc for Team Members (#4390)

Add swagger documentation for Team Members APIs
This commit is contained in:
Sojan Jose 2022-04-05 16:05:49 +05:30 committed by GitHub
parent 2595e774e5
commit 7a8aa4ca2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 440 additions and 94 deletions

View file

@ -1,7 +1,3 @@
if @team_member json.array! @team_members do |team_member|
json.partial! 'api/v1/models/agent.json.jbuilder', resource: @team_member json.partial! 'api/v1/models/agent.json.jbuilder', resource: team_member
elsif @team_members.present?
json.array! @team_members do |team_member|
json.partial! 'api/v1/models/agent.json.jbuilder', resource: team_member
end
end end

View file

@ -53,18 +53,18 @@ x-tagGroups:
- name: Application - name: Application
tags: tags:
- Account AgentBots - Account AgentBots
- Agent - Agents
- Canned Response - Canned Responses
- Contact - Contacts
- Conversation - Conversations
- Conversation Assignment - Conversation Assignment
- Conversation Labels - Conversation Labels
- Inbox - Inboxes
- Messages - Messages
- Integrations - Integrations
- Profile - Profile
- Teams - Teams
- Custom Filter - Custom Filters
- Reports - Reports
- name: Client - name: Client
tags: tags:

View file

@ -1,5 +1,5 @@
in: path in: path
name: id name: team_id
type: integer type: integer
required: true required: true
description: The ID of the team to be updated description: The ID of the team to be updated

View file

@ -1,5 +1,5 @@
tags: tags:
- Agent - Agents
operationId: add-new-agent-to-account operationId: add-new-agent-to-account
summary: Add a New Agent summary: Add a New Agent
description: Add a new Agent to Account description: Add a new Agent to Account

View file

@ -1,5 +1,5 @@
tags: tags:
- Agent - Agents
operationId: delete-agent-from-account operationId: delete-agent-from-account
summary: Remove an Agent from Account summary: Remove an Agent from Account
description: Remove an Agent from Account description: Remove an Agent from Account

View file

@ -1,5 +1,5 @@
tags: tags:
- Agent - Agents
operationId: get-account-agents operationId: get-account-agents
summary: List Agents in Account summary: List Agents in Account
description: Get Details of Agents in an Account description: Get Details of Agents in an Account

View file

@ -1,5 +1,5 @@
tags: tags:
- Agent - Agents
operationId: update-agent-in-account operationId: update-agent-in-account
summary: Update Agent in Account summary: Update Agent in Account
description: Update an Agent in Account description: Update an Agent in Account

View file

@ -1,5 +1,5 @@
tags: tags:
- Canned Response - Canned Responses
operationId: add-new-canned-response-to-account operationId: add-new-canned-response-to-account
summary: Add a New Canned Response summary: Add a New Canned Response
description: Add a new Canned Response to Account description: Add a new Canned Response to Account

View file

@ -1,5 +1,5 @@
tags: tags:
- Canned Response - Canned Responses
operationId: delete-canned-response-from-account operationId: delete-canned-response-from-account
summary: Remove a Canned Response from Account summary: Remove a Canned Response from Account
description: Remove a Canned Response from Account description: Remove a Canned Response from Account

View file

@ -1,5 +1,5 @@
tags: tags:
- Canned Response - Canned Responses
operationId: get-account-canned-response operationId: get-account-canned-response
summary: List all Canned Responses in an Account summary: List all Canned Responses in an Account
description: Get Details of Canned Responses in an Account description: Get Details of Canned Responses in an Account

View file

@ -1,6 +1,6 @@
get: get:
tags: tags:
- Contact - Contacts
operationId: contactConversations operationId: contactConversations
summary: Contact Conversations summary: Contact Conversations
description: Get conversations associated to that contact description: Get conversations associated to that contact

View file

@ -8,7 +8,7 @@ parameters:
get: get:
tags: tags:
- Contact - Contacts
operationId: contactDetails operationId: contactDetails
summary: Show Contact summary: Show Contact
description: Get a contact belonging to the account using ID description: Get a contact belonging to the account using ID
@ -24,7 +24,7 @@ get:
put: put:
tags: tags:
- Contact - Contacts
operationId: contactUpdate operationId: contactUpdate
summary: Update Contact summary: Update Contact
description: Update a contact belonging to the account using ID description: Update a contact belonging to the account using ID
@ -46,7 +46,7 @@ put:
delete: delete:
tags: tags:
- Contact - Contacts
operationId: contactDelete operationId: contactDelete
summary: Delete Contact summary: Delete Contact
responses: responses:

View file

@ -1,5 +1,5 @@
tags: tags:
- Contact - Contacts
operationId: contactFilter operationId: contactFilter
description: Filter contacts with custom filter options and pagination description: Filter contacts with custom filter options and pagination
summary: Contact Filter summary: Contact Filter

View file

@ -1,6 +1,6 @@
get: get:
tags: tags:
- Contact - Contacts
operationId: contactList operationId: contactList
description: Listing all the resolved contacts with pagination (Page size = 15) . Resolved contacts are the ones with a value for identifier, email or phone number description: Listing all the resolved contacts with pagination (Page size = 15) . Resolved contacts are the ones with a value for identifier, email or phone number
summary: List Contacts summary: List Contacts
@ -20,7 +20,7 @@ get:
post: post:
tags: tags:
- Contact - Contacts
operationId: contactCreate operationId: contactCreate
description: Create a new Contact description: Create a new Contact
summary: Create Contact summary: Create Contact

View file

@ -1,6 +1,6 @@
get: get:
tags: tags:
- Contact - Contacts
operationId: contactSearch operationId: contactSearch
description: Search the resolved contacts using a search key, currently supports email search (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number description: Search the resolved contacts using a search key, currently supports email search (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number
summary: Search Contacts summary: Search Contacts

View file

@ -1,5 +1,5 @@
tags: tags:
- Conversation - Conversations
operationId: conversationFilter operationId: conversationFilter
description: Filter conversations with custom filter options and pagination description: Filter conversations with custom filter options and pagination
summary: Conversations Filter summary: Conversations Filter

View file

@ -3,7 +3,7 @@ parameters:
get: get:
tags: tags:
- Conversation - Conversations
operationId: conversationList operationId: conversationList
description: List all the conversations with pagination description: List all the conversations with pagination
summary: Conversations List summary: Conversations List
@ -43,7 +43,7 @@ get:
post: post:
tags: tags:
- Conversation - Conversations
operationId: newConversation operationId: newConversation
summary: Create New Conversation summary: Create New Conversation
description: "Creating a conversation in chatwoot requires a source id. \n\n Learn more about source_id: https://github.com/chatwoot/chatwoot/wiki/Building-on-Top-of-Chatwoot:-Importing-Existing-Contacts-and-Creating-Conversations" description: "Creating a conversation in chatwoot requires a source id. \n\n Learn more about source_id: https://github.com/chatwoot/chatwoot/wiki/Building-on-Top-of-Chatwoot:-Importing-Existing-Contacts-and-Creating-Conversations"

View file

@ -1,5 +1,5 @@
tags: tags:
- Conversation - Conversations
operationId: get-details-of-a-conversation operationId: get-details-of-a-conversation
summary: Conversation Details summary: Conversation Details
description: Get all details regarding a conversation with all messages in the conversation description: Get all details regarding a conversation with all messages in the conversation

View file

@ -1,5 +1,5 @@
tags: tags:
- Conversation - Conversations
operationId: toggle-status-of-a-conversation operationId: toggle-status-of-a-conversation
summary: Toggle Status summary: Toggle Status
description: Toggles the status of the conversation between open and resolved description: Toggles the status of the conversation between open and resolved

View file

@ -1,6 +1,6 @@
post: post:
tags: tags:
- Conversation - Conversations
operationId: conversationUpdateLastSeen operationId: conversationUpdateLastSeen
summary: Update Last Seen summary: Update Last Seen
description: Updates the last seen of the conversation so that conversations will have the bubbles in the agents screen description: Updates the last seen of the conversation so that conversations will have the bubbles in the agents screen

View file

@ -1,5 +1,5 @@
tags: tags:
- Custom Filter - Custom Filters
operationId: create-a-custom-filter operationId: create-a-custom-filter
summary: Create a custom filter summary: Create a custom filter
description: Create a custom filter in the account description: Create a custom filter in the account

View file

@ -1,5 +1,5 @@
tags: tags:
- Custom Filter - Custom Filters
operationId: delete-a-custom-filter operationId: delete-a-custom-filter
summary: Delete a custom filter summary: Delete a custom filter
description: Delete a custom filter from the account description: Delete a custom filter from the account

View file

@ -1,5 +1,5 @@
tags: tags:
- Custom Filter - Custom Filters
operationId: list-all-filters operationId: list-all-filters
summary: List all custom filters summary: List all custom filters
description: List all custom filters in a category of a user description: List all custom filters in a category of a user

View file

@ -1,5 +1,5 @@
tags: tags:
- Custom Filter - Custom Filters
operationId: get-details-of-a-single-custom-filter operationId: get-details-of-a-single-custom-filter
summary: Get a custom filter details summary: Get a custom filter details
description: Get the details of a custom filter in the account description: Get the details of a custom filter in the account

View file

@ -1,5 +1,5 @@
tags: tags:
- Custom Filter - Custom Filters
operationId: update-a-custom-filter operationId: update-a-custom-filter
summary: Update a custom filter summary: Update a custom filter
description: Update a custom filter's attributes description: Update a custom filter's attributes

View file

@ -1,6 +1,6 @@
post: post:
tags: tags:
- Inbox - Inboxes
operationId: inboxCreation operationId: inboxCreation
summary: Create an inbox summary: Create an inbox
description: You can create more than one website inbox in each account description: You can create more than one website inbox in each account

View file

@ -1,6 +1,6 @@
get: get:
tags: tags:
- Inbox - Inboxes
operationId: getInboxAgentBot operationId: getInboxAgentBot
summary: Show Inbox Agent Bot summary: Show Inbox Agent Bot
description: See if an agent bot is associated to the Inbox description: See if an agent bot is associated to the Inbox

View file

@ -1,5 +1,5 @@
tags: tags:
- Inbox - Inboxes
operationId: add-new-agent-to-inbox operationId: add-new-agent-to-inbox
summary: Add a New Agent summary: Add a New Agent
description: Add a new Agent to Inbox description: Add a new Agent to Inbox

View file

@ -1,5 +1,5 @@
tags: tags:
- Inbox - Inboxes
operationId: delete-agent-in-inbox operationId: delete-agent-in-inbox
summary: Remove an Agent from Inbox summary: Remove an Agent from Inbox
description: Remove an Agent from Inbox description: Remove an Agent from Inbox

View file

@ -1,5 +1,5 @@
tags: tags:
- Inbox - Inboxes
operationId: get-inbox-members operationId: get-inbox-members
summary: List Agents in Inbox summary: List Agents in Inbox
description: Get Details of Agents in an Inbox description: Get Details of Agents in an Inbox

View file

@ -1,5 +1,5 @@
tags: tags:
- Inbox - Inboxes
operationId: update-agents-in-inbox operationId: update-agents-in-inbox
summary: Update Agents in Inbox summary: Update Agents in Inbox
description: All agents except the one passed in params will be removed description: All agents except the one passed in params will be removed

View file

@ -1,6 +1,6 @@
get: get:
tags: tags:
- Inbox - Inboxes
operationId: listAllInboxes operationId: listAllInboxes
summary: List all inboxes summary: List all inboxes
description: List all inboxes available in the current account description: List all inboxes available in the current account

View file

@ -1,6 +1,6 @@
post: post:
tags: tags:
- Inbox - Inboxes
operationId: updateAgentBot operationId: updateAgentBot
summary: Add or remove agent bot summary: Add or remove agent bot
description: To add an agent bot pass agent_bot id, to remove agent bot from an inbox pass null description: To add an agent bot pass agent_bot id, to remove agent bot from an inbox pass null

View file

@ -1,6 +1,6 @@
get: get:
tags: tags:
- Inbox - Inboxes
operationId: GetInbox operationId: GetInbox
summary: Get an inbox summary: Get an inbox
description: Get an inbox available in the current account description: Get an inbox available in the current account

View file

@ -1,6 +1,6 @@
patch: patch:
tags: tags:
- Inbox - Inboxes
operationId: updateInbox operationId: updateInbox
summary: Update Inbox summary: Update Inbox
description: Add avatar and disable auto assignment for an inbox description: Add avatar and disable auto assignment for an inbox

View file

@ -0,0 +1,35 @@
tags:
- Teams
operationId: add-new-agent-to-team
summary: Add a New Agent
description: Add a new Agent to Team
security:
- userApiKey: []
parameters:
- name: data
in: body
required: true
schema:
type: object
required:
- user_ids
properties:
user_ids:
type: array
items:
type: integer
description: IDs of users to be added to the team
responses:
200:
description: Success
schema:
type: array
description: 'Array of all active agents'
items:
$ref: '#/definitions/agent'
404:
description: Team not found
403:
description: Access denied
422:
description: User must exist

View file

@ -0,0 +1,31 @@
tags:
- Teams
operationId: delete-agent-in-team
summary: Remove an Agent from Team
description: Remove an Agent from Team
security:
- userApiKey: []
parameters:
- name: data
in: body
required: true
schema:
type: object
required:
- team_id
- user_ids
properties:
user_ids:
type: array
items:
type: integer
description: IDs of users to be deleted from the team
responses:
200:
description: Success
404:
description: Team not found
403:
description: Access denied
422:
description: User must exist

View file

@ -0,0 +1,21 @@
tags:
- Teams
operationId: get-team-members
summary: List Agents in Team
description: Get Details of Agents in an Team
security:
- userApiKey: []
parameters:
- $ref: '#/parameters/team_id'
responses:
200:
description: Success
schema:
type: array
description: 'Array of all agents in the team'
items:
$ref: '#/definitions/agent'
404:
description: Inbox not found
403:
description: Access denied

View file

@ -0,0 +1,35 @@
tags:
- Teams
operationId: update-agents-in-team
summary: Update Agents in Team
description: All agents except the one passed in params will be removed
security:
- userApiKey: []
parameters:
- name: data
in: body
required: true
schema:
type: object
required:
- user_ids
properties:
user_ids:
type: array
items:
type: integer
description: IDs of users to be added to the team
responses:
200:
description: Success
schema:
type: array
description: 'Array of all agents in the team'
items:
$ref: '#/definitions/agent'
404:
description: Team not found
403:
description: Access denied
422:
description: User must exist

View file

@ -154,7 +154,7 @@
delete: delete:
$ref: ./application/agents/delete.yml $ref: ./application/agents/delete.yml
# Agents # Canned Responses
/api/v1/accounts/{account_id}/canned_responses: /api/v1/accounts/{account_id}/canned_responses:
parameters: parameters:
- $ref: '#/parameters/account_id' - $ref: '#/parameters/account_id'
@ -315,7 +315,7 @@
$ref: ./application/teams/index.yml $ref: ./application/teams/index.yml
post: post:
$ref: ./application/teams/create.yml $ref: ./application/teams/create.yml
/api/v1/accounts/{account_id}/teams/{id}: /api/v1/accounts/{account_id}/teams/{team_id}:
parameters: parameters:
- $ref: '#/parameters/account_id' - $ref: '#/parameters/account_id'
- $ref: '#/parameters/team_id' - $ref: '#/parameters/team_id'
@ -325,6 +325,18 @@
$ref: ./application/teams/update.yml $ref: ./application/teams/update.yml
delete: delete:
$ref: ./application/teams/delete.yml $ref: ./application/teams/delete.yml
/accounts/{account-id}/teams/{team_id}/team_members:
parameters:
- $ref: '#/parameters/account_id'
- $ref: '#/parameters/team_id'
get:
$ref: ./application/team_members/index.yml
post:
$ref: ./application/team_members/create.yml
patch:
$ref: ./application/team_members/update.yml
delete:
$ref: ./application/team_members/delete.yml
### Custom Filters goes here ### Custom Filters goes here

View file

@ -1118,7 +1118,7 @@
], ],
"get": { "get": {
"tags": [ "tags": [
"Agent" "Agents"
], ],
"operationId": "get-account-agents", "operationId": "get-account-agents",
"summary": "List Agents in Account", "summary": "List Agents in Account",
@ -1148,7 +1148,7 @@
}, },
"post": { "post": {
"tags": [ "tags": [
"Agent" "Agents"
], ],
"operationId": "add-new-agent-to-account", "operationId": "add-new-agent-to-account",
"summary": "Add a New Agent", "summary": "Add a New Agent",
@ -1227,7 +1227,7 @@
], ],
"patch": { "patch": {
"tags": [ "tags": [
"Agent" "Agents"
], ],
"operationId": "update-agent-in-account", "operationId": "update-agent-in-account",
"summary": "Update Agent in Account", "summary": "Update Agent in Account",
@ -1299,7 +1299,7 @@
}, },
"delete": { "delete": {
"tags": [ "tags": [
"Agent" "Agents"
], ],
"operationId": "delete-agent-from-account", "operationId": "delete-agent-from-account",
"summary": "Remove an Agent from Account", "summary": "Remove an Agent from Account",
@ -1341,7 +1341,7 @@
], ],
"get": { "get": {
"tags": [ "tags": [
"Canned Response" "Canned Responses"
], ],
"operationId": "get-account-canned-response", "operationId": "get-account-canned-response",
"summary": "List all Canned Responses in an Account", "summary": "List all Canned Responses in an Account",
@ -1371,7 +1371,7 @@
}, },
"post": { "post": {
"tags": [ "tags": [
"Canned Response" "Canned Responses"
], ],
"operationId": "add-new-canned-response-to-account", "operationId": "add-new-canned-response-to-account",
"summary": "Add a New Canned Response", "summary": "Add a New Canned Response",
@ -1460,7 +1460,7 @@
}, },
"delete": { "delete": {
"tags": [ "tags": [
"Canned Response" "Canned Responses"
], ],
"operationId": "delete-canned-response-from-account", "operationId": "delete-canned-response-from-account",
"summary": "Remove a Canned Response from Account", "summary": "Remove a Canned Response from Account",
@ -1497,7 +1497,7 @@
"/api/v1/accounts/{account_id}/contacts": { "/api/v1/accounts/{account_id}/contacts": {
"get": { "get": {
"tags": [ "tags": [
"Contact" "Contacts"
], ],
"operationId": "contactList", "operationId": "contactList",
"description": "Listing all the resolved contacts with pagination (Page size = 15) . Resolved contacts are the ones with a value for identifier, email or phone number", "description": "Listing all the resolved contacts with pagination (Page size = 15) . Resolved contacts are the ones with a value for identifier, email or phone number",
@ -1530,7 +1530,7 @@
}, },
"post": { "post": {
"tags": [ "tags": [
"Contact" "Contacts"
], ],
"operationId": "contactCreate", "operationId": "contactCreate",
"description": "Create a new Contact", "description": "Create a new Contact",
@ -1579,7 +1579,7 @@
], ],
"get": { "get": {
"tags": [ "tags": [
"Contact" "Contacts"
], ],
"operationId": "contactDetails", "operationId": "contactDetails",
"summary": "Show Contact", "summary": "Show Contact",
@ -1601,7 +1601,7 @@
}, },
"put": { "put": {
"tags": [ "tags": [
"Contact" "Contacts"
], ],
"operationId": "contactUpdate", "operationId": "contactUpdate",
"summary": "Update Contact", "summary": "Update Contact",
@ -1633,7 +1633,7 @@
}, },
"delete": { "delete": {
"tags": [ "tags": [
"Contact" "Contacts"
], ],
"operationId": "contactDelete", "operationId": "contactDelete",
"summary": "Delete Contact", "summary": "Delete Contact",
@ -1653,7 +1653,7 @@
"/api/v1/accounts/{account_id}/contacts/{id}/conversations": { "/api/v1/accounts/{account_id}/contacts/{id}/conversations": {
"get": { "get": {
"tags": [ "tags": [
"Contact" "Contacts"
], ],
"operationId": "contactConversations", "operationId": "contactConversations",
"summary": "Contact Conversations", "summary": "Contact Conversations",
@ -1689,7 +1689,7 @@
"/api/v1/accounts/{account_id}/contacts/search": { "/api/v1/accounts/{account_id}/contacts/search": {
"get": { "get": {
"tags": [ "tags": [
"Contact" "Contacts"
], ],
"operationId": "contactSearch", "operationId": "contactSearch",
"description": "Search the resolved contacts using a search key, currently supports email search (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number", "description": "Search the resolved contacts using a search key, currently supports email search (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number",
@ -1740,7 +1740,7 @@
], ],
"post": { "post": {
"tags": [ "tags": [
"Contact" "Contacts"
], ],
"operationId": "contactFilter", "operationId": "contactFilter",
"description": "Filter contacts with custom filter options and pagination", "description": "Filter contacts with custom filter options and pagination",
@ -1947,7 +1947,7 @@
], ],
"get": { "get": {
"tags": [ "tags": [
"Conversation" "Conversations"
], ],
"operationId": "conversationList", "operationId": "conversationList",
"description": "List all the conversations with pagination", "description": "List all the conversations with pagination",
@ -2013,7 +2013,7 @@
}, },
"post": { "post": {
"tags": [ "tags": [
"Conversation" "Conversations"
], ],
"operationId": "newConversation", "operationId": "newConversation",
"summary": "Create New Conversation", "summary": "Create New Conversation",
@ -2110,7 +2110,7 @@
], ],
"post": { "post": {
"tags": [ "tags": [
"Conversation" "Conversations"
], ],
"operationId": "conversationFilter", "operationId": "conversationFilter",
"description": "Filter conversations with custom filter options and pagination", "description": "Filter conversations with custom filter options and pagination",
@ -2221,7 +2221,7 @@
], ],
"get": { "get": {
"tags": [ "tags": [
"Conversation" "Conversations"
], ],
"operationId": "get-details-of-a-conversation", "operationId": "get-details-of-a-conversation",
"summary": "Conversation Details", "summary": "Conversation Details",
@ -2253,7 +2253,7 @@
], ],
"post": { "post": {
"tags": [ "tags": [
"Conversation" "Conversations"
], ],
"operationId": "toggle-status-of-a-conversation", "operationId": "toggle-status-of-a-conversation",
"summary": "Toggle Status", "summary": "Toggle Status",
@ -2438,7 +2438,7 @@
"/api/v1/accounts/{account_id}/inboxes": { "/api/v1/accounts/{account_id}/inboxes": {
"get": { "get": {
"tags": [ "tags": [
"Inbox" "Inboxes"
], ],
"operationId": "listAllInboxes", "operationId": "listAllInboxes",
"summary": "List all inboxes", "summary": "List all inboxes",
@ -2471,7 +2471,7 @@
"/api/v1/accounts/{account_id}/inboxes/{id}/": { "/api/v1/accounts/{account_id}/inboxes/{id}/": {
"get": { "get": {
"tags": [ "tags": [
"Inbox" "Inboxes"
], ],
"operationId": "GetInbox", "operationId": "GetInbox",
"summary": "Get an inbox", "summary": "Get an inbox",
@ -2507,7 +2507,7 @@
"/api/v1/accounts/{account_id}/inboxes/": { "/api/v1/accounts/{account_id}/inboxes/": {
"post": { "post": {
"tags": [ "tags": [
"Inbox" "Inboxes"
], ],
"operationId": "inboxCreation", "operationId": "inboxCreation",
"summary": "Create an inbox", "summary": "Create an inbox",
@ -2586,7 +2586,7 @@
"/api/v1/accounts/{account_id}/inboxes/{id}": { "/api/v1/accounts/{account_id}/inboxes/{id}": {
"patch": { "patch": {
"tags": [ "tags": [
"Inbox" "Inboxes"
], ],
"operationId": "updateInbox", "operationId": "updateInbox",
"summary": "Update Inbox", "summary": "Update Inbox",
@ -2673,7 +2673,7 @@
"/api/v1/accounts/{account_id}/inboxes/{id}/agent_bot": { "/api/v1/accounts/{account_id}/inboxes/{id}/agent_bot": {
"get": { "get": {
"tags": [ "tags": [
"Inbox" "Inboxes"
], ],
"operationId": "getInboxAgentBot", "operationId": "getInboxAgentBot",
"summary": "Show Inbox Agent Bot", "summary": "Show Inbox Agent Bot",
@ -2709,7 +2709,7 @@
"/api/v1/accounts/{account_id}/inboxes/{id}/set_agent_bot": { "/api/v1/accounts/{account_id}/inboxes/{id}/set_agent_bot": {
"post": { "post": {
"tags": [ "tags": [
"Inbox" "Inboxes"
], ],
"operationId": "updateAgentBot", "operationId": "updateAgentBot",
"summary": "Add or remove agent bot", "summary": "Add or remove agent bot",
@ -2767,7 +2767,7 @@
], ],
"get": { "get": {
"tags": [ "tags": [
"Inbox" "Inboxes"
], ],
"operationId": "get-inbox-members", "operationId": "get-inbox-members",
"summary": "List Agents in Inbox", "summary": "List Agents in Inbox",
@ -2805,7 +2805,7 @@
}, },
"patch": { "patch": {
"tags": [ "tags": [
"Inbox" "Inboxes"
], ],
"operationId": "update-agents-in-inbox", "operationId": "update-agents-in-inbox",
"summary": "Update Agents in Inbox", "summary": "Update Agents in Inbox",
@ -2868,7 +2868,7 @@
}, },
"delete": { "delete": {
"tags": [ "tags": [
"Inbox" "Inboxes"
], ],
"operationId": "delete-agent-in-inbox", "operationId": "delete-agent-in-inbox",
"summary": "Remove an Agent from Inbox", "summary": "Remove an Agent from Inbox",
@ -2931,7 +2931,7 @@
], ],
"post": { "post": {
"tags": [ "tags": [
"Inbox" "Inboxes"
], ],
"operationId": "add-new-agent-to-inbox", "operationId": "add-new-agent-to-inbox",
"summary": "Add a New Agent", "summary": "Add a New Agent",
@ -3333,7 +3333,7 @@
} }
} }
}, },
"/api/v1/accounts/{account_id}/teams/{id}": { "/api/v1/accounts/{account_id}/teams/{team_id}": {
"parameters": [ "parameters": [
{ {
"$ref": "#/parameters/account_id" "$ref": "#/parameters/account_id"
@ -3413,6 +3413,222 @@
} }
} }
}, },
"/accounts/{account-id}/teams/{team_id}/team_members": {
"parameters": [
{
"$ref": "#/parameters/account_id"
},
{
"$ref": "#/parameters/team_id"
}
],
"get": {
"tags": [
"Teams"
],
"operationId": "get-team-members",
"summary": "List Agents in Team",
"description": "Get Details of Agents in an Team",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"$ref": "#/parameters/team_id"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"type": "array",
"description": "Array of all agents in the team",
"items": {
"$ref": "#/definitions/agent"
}
}
},
"404": {
"description": "Inbox not found"
},
"403": {
"description": "Access denied"
}
}
},
"post": {
"tags": [
"Teams"
],
"operationId": "add-new-agent-to-team",
"summary": "Add a New Agent",
"description": "Add a new Agent to Team",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": [
"user_ids"
],
"properties": {
"user_ids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "IDs of users to be added to the team"
}
}
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"type": "array",
"description": "Array of all active agents",
"items": {
"$ref": "#/definitions/agent"
}
}
},
"404": {
"description": "Team not found"
},
"403": {
"description": "Access denied"
},
"422": {
"description": "User must exist"
}
}
},
"patch": {
"tags": [
"Teams"
],
"operationId": "update-agents-in-team",
"summary": "Update Agents in Team",
"description": "All agents except the one passed in params will be removed",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": [
"user_ids"
],
"properties": {
"user_ids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "IDs of users to be added to the team"
}
}
}
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"type": "array",
"description": "Array of all agents in the team",
"items": {
"$ref": "#/definitions/agent"
}
}
},
"404": {
"description": "Team not found"
},
"403": {
"description": "Access denied"
},
"422": {
"description": "User must exist"
}
}
},
"delete": {
"tags": [
"Teams"
],
"operationId": "delete-agent-in-team",
"summary": "Remove an Agent from Team",
"description": "Remove an Agent from Team",
"security": [
{
"userApiKey": [
]
}
],
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "object",
"required": [
"team_id",
"user_ids"
],
"properties": {
"user_ids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "IDs of users to be deleted from the team"
}
}
}
}
],
"responses": {
"200": {
"description": "Success"
},
"404": {
"description": "Team not found"
},
"403": {
"description": "Access denied"
},
"422": {
"description": "User must exist"
}
}
}
},
"/api/v1/accounts/{account_id}/custom_filters": { "/api/v1/accounts/{account_id}/custom_filters": {
"parameters": [ "parameters": [
{ {
@ -3433,7 +3649,7 @@
], ],
"get": { "get": {
"tags": [ "tags": [
"Custom Filter" "Custom Filters"
], ],
"operationId": "list-all-filters", "operationId": "list-all-filters",
"summary": "List all custom filters", "summary": "List all custom filters",
@ -3456,7 +3672,7 @@
}, },
"post": { "post": {
"tags": [ "tags": [
"Custom Filter" "Custom Filters"
], ],
"operationId": "create-a-custom-filter", "operationId": "create-a-custom-filter",
"summary": "Create a custom filter", "summary": "Create a custom filter",
@ -3498,7 +3714,7 @@
], ],
"get": { "get": {
"tags": [ "tags": [
"Custom Filter" "Custom Filters"
], ],
"operationId": "get-details-of-a-single-custom-filter", "operationId": "get-details-of-a-single-custom-filter",
"summary": "Get a custom filter details", "summary": "Get a custom filter details",
@ -3520,7 +3736,7 @@
}, },
"patch": { "patch": {
"tags": [ "tags": [
"Custom Filter" "Custom Filters"
], ],
"operationId": "update-a-custom-filter", "operationId": "update-a-custom-filter",
"summary": "Update a custom filter", "summary": "Update a custom filter",
@ -3549,7 +3765,7 @@
}, },
"delete": { "delete": {
"tags": [ "tags": [
"Custom Filter" "Custom Filters"
], ],
"operationId": "delete-a-custom-filter", "operationId": "delete-a-custom-filter",
"summary": "Delete a custom filter", "summary": "Delete a custom filter",
@ -5084,7 +5300,7 @@
}, },
"team_id": { "team_id": {
"in": "path", "in": "path",
"name": "id", "name": "team_id",
"type": "integer", "type": "integer",
"required": true, "required": true,
"description": "The ID of the team to be updated" "description": "The ID of the team to be updated"
@ -5221,18 +5437,18 @@
"name": "Application", "name": "Application",
"tags": [ "tags": [
"Account AgentBots", "Account AgentBots",
"Agent", "Agents",
"Canned Response", "Canned Responses",
"Contact", "Contacts",
"Conversation", "Conversations",
"Conversation Assignment", "Conversation Assignment",
"Conversation Labels", "Conversation Labels",
"Inbox", "Inboxes",
"Messages", "Messages",
"Integrations", "Integrations",
"Profile", "Profile",
"Teams", "Teams",
"Custom Filter", "Custom Filters",
"Reports" "Reports"
] ]
}, },