openapi: 3.2.0
info:
title: Reporting Interactions API
description: "Reporting APIs are a collection of RESTful APIs that provide a convenient and secure way for integrating reporting data from Observe.AI into external system of your choice. These APIs are asynchronous and render data in a JSON format. Observe.AI uses OAuth 2.0 protocol for authentication of APIs. Please refer to Authentication section to obtain credentials to access Reporting APIs. Below are the 3 APIs that we support -\n
\n \n | Param Name | \n Type | \n Description | \n
\n \n | page | \n integer | \n The current page number of the response from the total response present between the given date range | \n
\n \n | size | \n integer | \n Number of interactions present in the current page | \n
\n \n | total_pages | \n integer | \n Total number of pages present for the given date range. | \n
\n \n | total_size | \n integer | \n Total number of interactions present for the given date range. | \n
\n \n | interactions | \n List | \n This is the list of interactions (call, chat, external) included in the report. Each interaction in this list is associated with an interaction ID. Inside of each interactions following fields can be found. | \n
\n \n | id | \n String | \n This id represents the id of that particular interaction | \n
\n \n | account_id | \n String | \n This id represents the id of that particular account. | \n
\n \n | agent_id | \n String | \n This id represents the id of the agent who has participated in that particular interaction. | \n
\n \n | partner_agent_id | \n String | \n This id represents the id of the agent who has participated in that particular interaction in the client system. | \n
\n \n | agent_name | \n String | \n The name of the agent who has participated in that particular interaction. | \n
\n \n | agent_email | \n String | \n The email of the agent who has participated in that particular interaction. | \n
\n \n | agent_status | \n String | \n This is a String field which depicts if the agent is active or not. (ACTIVE or IN_ACTIVE). | \n
\n \n | interaction_url | \n String | \n This field represents the url for the particular interaction. | \n
\n \n | duration | \n integer | \n This is an integer field which represents how much time (seconds) did the interaction happen. | \n
\n \n | source_partner_meeting_id | \n String | \n Incase of split interactions, source_partner_meeting_id is the unique identifier for the interaction before split. source_partner_meeting_id is same as unique identifier in the client system. | \n
\n \n | sequence | \n Integer | \n Incase of split interactions, the value of sequence signifies the position of this interaction post split. (Zero based index) | \n
\n \n | language | \n String | \n This is a field which represents in which language did the communication happen during the interaction. | \n
\n \n | channel | \n String | \n This field represents the type of interaction. (CALL, CHAT, EXTERNAL etc). | \n
\n \n | provider_id | \n String | \n The id which originates from the source recording platform. | \n
\n \n | transcripts | \n List | \n The list of transcripts of an interaction divided by speaker. The fields under the transcripts are: | \n
\n \n | transcripts.phrase | \n String | \n A snippet from the transcript corresponding to one of the two speakers. | \n
\n \n | transcripts.speaker | \n String | \n This is the speaker of the phrase - Agent or customer. | \n
\n \n | transcripts.start_time | \n integer | \n The phrase start time in milliseconds. | \n
\n \n | transcripts.end_time | \n integer | \n The phrase end time in milliseconds. | \n
\n \n | transcripts.order | \n integer | \n The position of each phrase in a transcript. | \n
\n \n | moment_categories | \n List | \n The list of moment categories contains all the moment categories found in the interactions. The fields under the moment categories are: | \n
\n \n | moment_categories.moment_category_id | \n String | \n This id represents that particular moment_category. | \n
\n \n | moment_categories.moment_category_name | \n String | \n The name of the particular moment_category. | \n
\n \n | moment_categories.moments | \n List | \n The list of moments present under a particular moment category. The fields under the moment are: | \n
\n \n | moments.moment_id | \n String | \n The id which represents that particular moment. | \n
\n \n | moments.moment_name | \n String | \n The moment name as configured in the Observe.AI userinterface in the 'Moments' tab. | \n
\n \n | moments.snippets | \n List | \n The list of phrases from a transcript in which momentswere found. Inside This snippets there are four more fields: | \n
\n \n | moments.moment_theme | \n String | \n The moment theme - Positive/Negative/Neutral as configured in the Observe.AI userinterface in the ‘Moments’ tab. | \n
\n \n | snippets.evidence | \n String | \n The actual phrase or keyword that matches amoment's criteria. | \n
\n \n | snippets.start_time | \n integer | \n The phrase start time in milliseconds. | \n
\n \n | snippets.end_time | \n integer | \n The phrase end time in milliseconds. | \n
\n \n | snippets.order | \n integer | \n The position of each phrase in a transcript. | \n
\n \n | moments.found | \n boolean | \n It determines whether the moment is found in the call or not. | \n
\n \n | created_at | \n Date | \n The time at which the interaction was created in the DB. | \n
\n \n | updated_at | \n Date | \n The time at which the interaction was last updated. | \n
\n \n | interaction_start_time | \n Date | \n The start timestamp of the interaction in ISO time format. | \n
\n \n | interaction_meta_data | \n (Key, Value) pair | \n This contains all the interaction metadata which is used to create filters and present in interaction info. | \n
\n
\n"
content:
'*/*':
schema:
$ref: '#/components/schemas/GetJobResponse'
examples:
'0':
value: '{"start_date":"2022-03-03T00:00:12.000+00:00","end_date":"2022-04-04T00:14:00.000+00:00","status":"COMPLETED","url":"https://e2e-data-out.s3.amazonaws.com/reports/interactions/3058bc09-6d4d-4f22-9f69-6992f3520e56.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220510T045319Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Credential=YOUR_AWS_ACCESS_KEY_ID%2FYYYYMMDD%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=YOUR_AWS_SIGNATURE_PLACEHOLDER"}'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
'0':
value: '{"error_code": "auth_token_error", "error_description": "invalid auth token"}'
'403':
description: Access Denied
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
'0':
value: '{"error_code":"access_denied","error_description":"unauthorized_user"}'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
'0':
value: '{"error_code":"resource_not_found","error_description":"jobId 3058bc09-da96-490c-824f-f42646160f0a of type INTERACTION not found or does not belong to the account"}'
'1':
value: '{"timestamp": "2022-05-17T04:23:16.247+00:00", "status": 404, "error": "Not Found", "message": "No message available", "path": "/v1/data/reports/interaction/489690ba-1a58-44f3-9674-b5be9768d313"}'
'405':
description: Method Not Allowed
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
'0':
value: '{"timestamp": "2022-05-17T04:21:37.669+00:00", "status": 405, "error": "Method Not Allowed", "message": "Request method ''POST'' not supported", "path": "/v1/data/reports/interactioms/3058bc09-da96-490c-824f-f42646160f0a"}'
'429':
description: Rate Limit Exceeded
content:
'*/*':
schema:
$ref: '#/components/schemas/RateLimitMessage'
examples:
'0':
value: '{"message": "API rate limit exceeded"}'
'500':
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
/v1/data/reports/interactions/ids:
post:
tags:
- Interactions
operationId: Get Interactions By Ids
parameters:
- $ref: '#/components/parameters/IncludeTranscript'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InteractionsRequest'
responses:
'200':
description: "List of Interactions, each with following fields:\n\n \n | Field Name | \n Type | \n Description | \n
\n \n | id | \n String | \n This id represents the id of that particular interaction | \n
\n \n | account_id | \n String | \n This id represents the id of that particular account. | \n
\n \n | agent_id | \n String | \n This id represents the id of the agent who has participated in that particular interaction. | \n
\n \n | partner_agent_id | \n String | \n This id represents the id of the agent who has participated in that particular interaction in the client system. | \n
\n \n | agent_name | \n String | \n The name of the agent who has participated in that particular interaction. | \n
\n \n | agent_email | \n String | \n The email of the agent who has participated in that particular interaction. | \n
\n \n | agent_status | \n String | \n This is a String field which depicts if the agent is active or not. (ACTIVE or IN_ACTIVE). | \n
\n \n | interaction_url | \n String | \n This field represents the url for the particular interaction. | \n
\n \n | duration | \n integer | \n This is an integer field which represents how much time (seconds) did the interaction happen. | \n
\n \n | source_partner_meeting_id | \n String | \n Incase of split interactions, source_partner_meeting_id is the unique identifier for the interaction before split. source_partner_meeting_id is same as unique identifier in the client system. | \n
\n \n | sequence | \n Integer | \n Incase of split interactions, the value of sequence signifies the position of this interaction post split. (Zero based index) | \n
\n \n | language | \n String | \n This is a field which represents in which language did the communication happen during the interaction. | \n
\n \n | channel | \n String | \n This field represents the type of interaction. (CALL, CHAT, EXTERNAL etc). | \n
\n \n | provider_id | \n String | \n The id which originates from the source recording platform. | \n
\n \n | transcripts | \n List | \n The list of transcripts of an interaction divided by speaker. The fields under the transcripts are: | \n
\n \n | transcripts.phrase | \n String | \n A snippet from the transcript corresponding to one of the two speakers. | \n
\n \n | transcripts.speaker | \n String | \n This is the speaker of the phrase - Agent or customer. | \n
\n \n | transcripts.start_time | \n integer | \n The phrase start time in milliseconds. | \n
\n \n | transcripts.end_time | \n integer | \n The phrase end time in milliseconds. | \n
\n \n | transcripts.order | \n integer | \n The position of each phrase in a transcript. | \n
\n \n | moment_categories | \n List | \n The list of moment categories contains all the moment categories found in the interactions. The fields under the moment categories are: | \n
\n \n | moment_categories.moment_category_id | \n String | \n This id represents that particular moment_category. | \n
\n \n | moment_categories.moment_category_name | \n String | \n The name of the particular moment_category. | \n
\n \n | moment_categories.moments | \n List | \n The list of moments present under a particular moment category. The fields under the moment are: | \n
\n \n | moments.moment_id | \n String | \n The id which represents that particular moment. | \n
\n \n | moments.moment_name | \n String | \n The moment name as configured in the Observe.AI userinterface in the 'Moments' tab. | \n
\n \n | moments.snippets | \n List | \n The list of phrases from a transcript in which momentswere found. Inside This snippets there are four more fields: | \n
\n \n | moments.moment_theme | \n String | \n The moment theme - Positive/Negative/Neutral as configured in the Observe.AI userinterface in the ‘Moments’ tab. | \n
\n \n | snippets.evidence | \n String | \n The actual phrase or keyword that matches amoment's criteria. | \n
\n \n | snippets.start_time | \n integer | \n The phrase start time in milliseconds. | \n
\n \n | snippets.end_time | \n integer | \n The phrase end time in milliseconds. | \n
\n \n | snippets.order | \n integer | \n The position of each phrase in a transcript. | \n
\n \n | moments.found | \n boolean | \n It determines whether the moment is found in the call or not. | \n
\n \n | created_at | \n Date | \n The time at which the interaction was created in the DB. | \n
\n \n | updated_at | \n Date | \n The time at which the interaction was last updated. | \n
\n \n | interaction_start_time | \n Date | \n The start timestamp of the interaction in ISO time format. | \n
\n \n | interaction_meta_data | \n (Key, Value) pair | \n This contains all the interaction metadata which is used to create filters and present in interaction info. | \n
\n
\n"
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
'0':
value: '{"error_code":"bad_request","error_description":"Maximum observe interaction ids that can be specified is 100"}'
'1':
value: '{"error_code":"bad_request","error_description":"Specify atleast one observe interaction id"}'
'2':
value: '{"error_code":"bad_request","error_description":"Maximum partner interaction ids that can be specified is 100"}'
'3':
value: '{"error_code":"bad_request","error_description":"Specify atleast one partner interaction id"}'
'4':
value: '{"error_code":"bad_request","error_description":"Either observe interaction ids or partner interaction ids can be present in a request, but not both"}'
'5':
value: '{"error_code":"bad_request","error_description":"Either observe interaction ids or partner interaction ids should be present in the request"}'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
'0':
value: '{"error_code": "auth_token_error", "error_description": "invalid auth token"}'
'403':
description: Access Denied
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
'0':
value: '{"error_code":"access_denied","error_description":"unauthorized_user"}'
'1':
value: '{"error_code":"access_denied","error_description":"No authentication header found"}'
'2':
value: '{"error_code":"access_denied","error_description":"ticket/userId is missing in authorization"}'
'404':
description: Request Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
'0':
value: '{"timestamp":"2022-07-19T07:47:19.178+00:00","status":404,"error":"Not Found","message":"No message available","path":"/v1/data/reports/interactions/ids"}'
'405':
description: Method Not Allowed
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
examples:
'0':
value: '{"timestamp": "2022-05-17T04:21:37.669+00:00", "status": 405, "error": "Method Not Allowed", "message": "Request method ''POST'' not supported", "path": "/v1/data/reports/interactions/ids"}'
'429':
description: Rate Limit Exceeded
content:
'*/*':
schema:
$ref: '#/components/schemas/RateLimitMessage'
examples:
'0':
value: '{"message": "API rate limit exceeded"}'
'500':
description: Internal Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorMessage'
components:
parameters:
InteractionsSize:
in: query
name: size
schema:
type: integer
minimum: 10
maximum: 100
example: 100
default: 100
description: Number of interactions required in a page. Note that for requests without transcripts maximum size can be 1000.
Page:
in: query
name: page
schema:
type: integer
minimum: 1
example: 1
default: 1
description: The page number of the paginated response.
IncludeTranscript:
in: query
name: includeTranscript
schema:
type: boolean
example: true
default: false
description: Whether to include the transcript or not.
schemas:
InteractionsRequest:
properties:
observe_interaction_ids:
type: List