openapi: 3.2.0 info: title: Contact Center Chat Gateway Cards API version: 1.0.0 contact: email: cc-cluj-iris@8x8.com description: Integration with the 8x8 Contact Center (CC) Chat API servers: - url: https://api.8x8.com tags: - name: Cards paths: /chat-gateway/v1/conversations/{conversationId}/messages/{messageId}/cards: get: tags: - Cards summary: Retrieves the list of conversation message cards. description: Retrieves list of conversation message cards. Either Adaptive Cards or Quick Replies. operationId: getcardsforcctransaction security: - 8x8ApiKey: - Contact Center Chat Gateway parameters: - $ref: '#/components/parameters/ChatAPIConversationUrlID' - $ref: '#/components/parameters/MessageID' - $ref: '#/components/parameters/PageSizeFilterOptional' - $ref: '#/components/parameters/PageIndexFilterOptional' - $ref: '#/components/parameters/SortByDateOptional' - $ref: '#/components/parameters/TenantIdFilterOptional' responses: '200': description: Cards list content: application/hal+json: schema: $ref: '#/components/schemas/CardsListResult' '400': $ref: '#/components/responses/GeneralErrorResponse' '401': $ref: '#/components/responses/UnauthorizedResponse' '403': $ref: '#/components/responses/ForbiddenRequestResponse' '500': $ref: '#/components/responses/GeneralErrorResponse' default: $ref: '#/components/responses/GeneralErrorResponse' /api/v1/tenant/{tenantId}/conversations/{conversationId}/cards/{cardId}/action-submit: put: tags: - Cards summary: Sends the adaptive card action submit. description: Updates the adaptive card action submit flag and sends the activity notification. operationId: updatecardactionsubmit security: - 8x8ApiKey: - Contact Center Chat Gateway parameters: - $ref: '#/components/parameters/TenantId' - $ref: '#/components/parameters/ChatAPIConversationUrlID' - $ref: '#/components/parameters/CardId' requestBody: $ref: '#/components/requestBodies/AdaptiveCardActionSubmitRequest' responses: '204': description: Adaptive card action.submit was updated successfully and the notification was sent. '400': $ref: '#/components/responses/GeneralErrorResponse' '401': $ref: '#/components/responses/UnauthorizedResponse' '403': $ref: '#/components/responses/ForbiddenRequestResponse' '404': $ref: '#/components/responses/ResourceNotFoundExceptionResponse' '500': $ref: '#/components/responses/GeneralErrorResponse' default: $ref: '#/components/responses/GeneralErrorResponse' /api/v1/tenant/{tenantId}/conversations/{conversationId}/cards/{cardId}/action-execute: put: tags: - Cards summary: Sends the adaptive card action execute. description: Updates the adaptive card action execute flag and sends the activity notification. operationId: updatecardactionexecute security: - 8x8ApiKey: - Contact Center Chat Gateway parameters: - $ref: '#/components/parameters/TenantId' - $ref: '#/components/parameters/ChatAPIConversationUrlID' - $ref: '#/components/parameters/CardId' requestBody: $ref: '#/components/requestBodies/AdaptiveCardActionExecuteRequest' responses: '204': description: Adaptive card action.execute was updated successfully and the notification was sent. '400': $ref: '#/components/responses/GeneralErrorResponse' '401': $ref: '#/components/responses/UnauthorizedResponse' '403': $ref: '#/components/responses/ForbiddenRequestResponse' '404': $ref: '#/components/responses/ResourceNotFoundExceptionResponse' '500': $ref: '#/components/responses/GeneralErrorResponse' default: $ref: '#/components/responses/GeneralErrorResponse' components: requestBodies: AdaptiveCardActionExecuteRequest: description: Defines the action execute request payload. required: true content: application/json: schema: $ref: '#/components/schemas/AdaptiveCardActionExecutePayload' AdaptiveCardActionSubmitRequest: description: Defines the action submit request payload. required: true content: application/json: schema: $ref: '#/components/schemas/AdaptiveCardActionSubmitPayload' parameters: TenantId: name: tenantId in: path required: true description: Tenant identifier. schema: type: string format: string example: tenant01 TenantIdFilterOptional: name: X-8x8-Tenant in: header required: false description: Tenant ID, it is going to be mandatory if customer has more than one CC tenant in his organisation. schema: type: string format: string example: TheTenant SortByDateOptional: name: sort in: query required: false description: Attribute on which sorting direction is applied available only for createdDate field. schema: type: string default: createdAt:desc example: createdAt:asc CardId: name: cardId in: path required: true description: Card identifier. schema: type: string format: string example: abc ChatAPIConversationUrlID: name: conversationId in: path required: true description: Conversation identifier. schema: type: string format: string example: '125' MessageID: name: messageId in: path required: true description: Message identifier. schema: type: string format: string example: msg01 PageSizeFilterOptional: name: size in: query required: false description: Response page size. schema: type: number format: int32 default: 20 example: 100 PageIndexFilterOptional: name: page in: query required: false description: Response page index. schema: type: number format: int32 default: 0 example: 1 schemas: AdaptiveCardActionExecutePayload: allOf: - type: object properties: name: type: string format: string example: 8x8-Int PageResult: type: object properties: page: type: object properties: size: type: number format: int32 description: Page size of the response. number: type: number format: int32 description: Page 0-based index of the response. totalElements: type: number format: int32 description: Total number of items. totalPages: type: number format: int32 description: Total number of pages. AdaptiveCards: type: object properties: id: type: string format: string description: Adaptive card identifier. contentType: $ref: '#/components/schemas/ContentType' content: type: object description: ' Any adaptive cards, up to version 1.6 https://adaptivecards.io/schemas/1.6.0/adaptive-card.json https://adaptivecards.io/explorer/
Any 8x8 Quick Replies card. Any interactive card. Any location card. Any template card. ' actionSubmitted: type: boolean description: Indicates if the card was submitted by the user. actionExecuted: type: boolean description: Indicates if the card was executed by the agent. ResourceNotFoundExceptionPayload: type: object properties: message: type: string description: Error message. example: Resource not found errors: type: array items: type: object properties: code: type: string description: Unique error code. example: resource_not_found message: type: string description: Free text error description. example: Entity of type Conversation with id aaa was not found. GenericExceptionPayload: type: object properties: message: type: string description: Error message. example: Internal error. errors: type: array items: type: object properties: code: type: string description: Unique error code. example: invalid_queue message: type: string description: Free text error description. example: Queue ID 112 is invalid. ForbiddenViolationProblem: type: object properties: message: type: string description: Error message. example: The tenant does not belong to customer. errors: type: array items: type: string example: Header X-8x8-Tenant doesn't match tenant information for customerId=aaaa AdaptiveCardActionSubmitPayload: allOf: - type: object properties: name: type: string format: string example: 8x8 ContentType: type: string enum: - application/vnd.microsoft.card.adaptive - application/8x8.quick.replies - Interactive - Location - Template - Suggestions - Buttons - Carousel default: application/vnd.microsoft.card.adaptive description: Card content type. UnauthorizedProblem: type: object properties: message: type: string example: Access Denied errors: type: array items: type: object properties: message: type: string example: Access Denied code: type: string example: access_denied referenceId: type: string example: dacd0dd252723a2 Links: type: object properties: _links: type: object properties: self: type: object properties: href: type: string CardsListResult: allOf: - type: object required: - cards properties: _embedded: type: object properties: cards: type: array items: $ref: '#/components/schemas/AdaptiveCards' - $ref: '#/components/schemas/Links' - $ref: '#/components/schemas/PageResult' responses: UnauthorizedResponse: description: Contains a description of the error. content: application/problem+json: schema: $ref: '#/components/schemas/UnauthorizedProblem' GeneralErrorResponse: description: Contains a description of the error. content: application/problem+json: schema: $ref: '#/components/schemas/GenericExceptionPayload' ForbiddenRequestResponse: description: Contains a descriptive response. content: application/problem+json: schema: $ref: '#/components/schemas/ForbiddenViolationProblem' ResourceNotFoundExceptionResponse: description: Contains a descriptive information. content: application/problem+json: schema: $ref: '#/components/schemas/ResourceNotFoundExceptionPayload' securitySchemes: 8x8ApiKey: type: apiKey name: x-api-key in: header x-readme: explorer-enabled: true proxy-enabled: false samples-enabled: true