Skip to content

Commit d771cd3

Browse files
author
Muhammad Murtaza
committed
Add docs related to reporting data export
1 parent f6aa883 commit d771cd3

File tree

1 file changed

+284
-2
lines changed

1 file changed

+284
-2
lines changed

descriptions/0/api.intercom.io.yaml

Lines changed: 284 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,288 @@ paths:
14921492
$ref: "#/components/schemas/away_status_reason"
14931493
'401':
14941494
"$ref": "#/components/responses/Unauthorized"
1495+
"/export/reporting_data/enqueue":
1496+
post:
1497+
summary: Enqueue a new reporting data export job
1498+
tags: [Export]
1499+
parameters:
1500+
- name: Intercom-Version
1501+
in: header
1502+
schema:
1503+
"$ref": "#/components/schemas/intercom_version"
1504+
requestBody:
1505+
required: true
1506+
content:
1507+
application/json:
1508+
schema:
1509+
type: object
1510+
required: [dataset_id, attribute_ids, start_time, end_time]
1511+
properties:
1512+
dataset_id:
1513+
type: string
1514+
example: conversation
1515+
attribute_ids:
1516+
type: array
1517+
items:
1518+
type: string
1519+
example: [conversation.id, conversation.first_user_conversation_part_created_at]
1520+
start_time:
1521+
type: integer
1522+
format: int64
1523+
example: 1717490000
1524+
end_time:
1525+
type: integer
1526+
format: int64
1527+
example: 1717510000
1528+
responses:
1529+
'200':
1530+
description: Job enqueued successfully
1531+
content:
1532+
application/json:
1533+
schema:
1534+
type: object
1535+
properties:
1536+
job_identifier:
1537+
type: string
1538+
example: job1
1539+
status:
1540+
type: string
1541+
example: pending
1542+
download_url:
1543+
type: string
1544+
download_expires_at:
1545+
type: string
1546+
'400':
1547+
description: Bad request (e.g. validation errors)
1548+
content:
1549+
application/json:
1550+
examples:
1551+
No dataset_id:
1552+
value:
1553+
type: error.list
1554+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1555+
errors:
1556+
- code: bad_request
1557+
message: "'dataset_id' is a required parameter"
1558+
Invalid dataset_id:
1559+
value:
1560+
type: error.list
1561+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1562+
errors:
1563+
- code: bad_request
1564+
message: imaginary is not a valid dataset_id
1565+
No attribute_ids:
1566+
value:
1567+
type: error.list
1568+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1569+
errors:
1570+
- code: bad_request
1571+
message: "'attribute_ids' is a required parameter"
1572+
Empty attribute_ids:
1573+
value:
1574+
type: error.list
1575+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1576+
errors:
1577+
- code: bad_request
1578+
message: attribute_ids must contain at least one attribute_id
1579+
Non array attribute_ids:
1580+
value:
1581+
type: error.list
1582+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1583+
errors:
1584+
- code: bad_request
1585+
message: "'attribute_ids' not an array must be of type Array"
1586+
Invalid attribute_ids:
1587+
value:
1588+
type: error.list
1589+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1590+
errors:
1591+
- code: bad_request
1592+
message: "attribute_ids invalid for conversation dataset: non_existent"
1593+
schema:
1594+
"$ref": "#/components/schemas/error"
1595+
'401':
1596+
description: Unauthorized
1597+
content:
1598+
application/json:
1599+
examples:
1600+
Unauthorized:
1601+
value:
1602+
type: error.list
1603+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1604+
errors:
1605+
- code: unauthorized
1606+
message: Access Token Invalid
1607+
schema:
1608+
"$ref": "#/components/schemas/error"
1609+
'429':
1610+
description: Too many jobs in progress
1611+
content:
1612+
application/json:
1613+
examples:
1614+
Unauthorized:
1615+
value:
1616+
type: error.list
1617+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1618+
errors:
1619+
- code: rate_limit_exceeded
1620+
message: Exceeded rate limit of 5 pending reporting dataset export jobs
1621+
schema:
1622+
"$ref": "#/components/schemas/error"
1623+
"/export/reporting_data/{job_identifier}":
1624+
get:
1625+
summary: Get export job status
1626+
tags: [Export]
1627+
parameters:
1628+
- name: Intercom-Version
1629+
in: header
1630+
schema:
1631+
"$ref": "#/components/schemas/intercom_version"
1632+
- name: app_id
1633+
in: query
1634+
description: The Intercom defined code of the workspace the company is associated
1635+
to.
1636+
required: true
1637+
schema:
1638+
type: string
1639+
- name: client_id
1640+
in: query
1641+
required: true
1642+
schema:
1643+
type: string
1644+
- name: job_identifier
1645+
description: Unique identifier of the job.
1646+
in: query
1647+
required: true
1648+
schema:
1649+
type: string
1650+
responses:
1651+
'200':
1652+
description: Job status returned successfully
1653+
content:
1654+
application/json:
1655+
examples:
1656+
With complete status:
1657+
value:
1658+
job_identifier: job1
1659+
status: complete
1660+
download_url: ''
1661+
download_expires_at: ''
1662+
With failed status:
1663+
value:
1664+
job_identifier: job1
1665+
status: failed
1666+
download_url: ''
1667+
download_expires_at: ''
1668+
schema:
1669+
type: object
1670+
properties:
1671+
job_identifier:
1672+
type: string
1673+
status:
1674+
type: string
1675+
download_url:
1676+
type: string
1677+
download_expires_at:
1678+
type: string
1679+
'404':
1680+
description: When job not found
1681+
content:
1682+
application/json:
1683+
examples:
1684+
Not found:
1685+
value:
1686+
type: error.list
1687+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1688+
errors:
1689+
- code: not_found
1690+
message: "Export job not found for identifier: job1"
1691+
schema:
1692+
"$ref": "#/components/schemas/error"
1693+
"/export/reporting_data/get_datasets":
1694+
get:
1695+
summary: List available datasets and attributes
1696+
parameters:
1697+
- name: Intercom-Version
1698+
in: header
1699+
schema:
1700+
"$ref": "#/components/schemas/intercom_version"
1701+
tags: [Export]
1702+
responses:
1703+
'200':
1704+
description: List of datasets
1705+
content:
1706+
application/json:
1707+
schema:
1708+
type: object
1709+
properties:
1710+
type:
1711+
type: string
1712+
example: list
1713+
data:
1714+
type: array
1715+
items:
1716+
type: object
1717+
properties:
1718+
id:
1719+
type: string
1720+
example: conversation
1721+
name:
1722+
type: string
1723+
example: Conversation
1724+
description:
1725+
type: string
1726+
example: "Conversation-level details: status, channel, assignee."
1727+
default_time_attribute_id:
1728+
type: string
1729+
example: conversation.first_user_conversation_part_created_at
1730+
attributes:
1731+
type: array
1732+
items:
1733+
type: object
1734+
properties:
1735+
id:
1736+
type: string
1737+
example: conversation.id
1738+
name:
1739+
type: string
1740+
example: Conversation ID
1741+
"/download/reporting_data/{job_identifier}":
1742+
get:
1743+
summary: Download completed export job data
1744+
tags: [Export]
1745+
parameters:
1746+
- name: Intercom-Version
1747+
in: header
1748+
schema:
1749+
"$ref": "#/components/schemas/intercom_version"
1750+
- name: app_id
1751+
in: query
1752+
required: true
1753+
schema:
1754+
type: string
1755+
- name: job_identifier
1756+
in: query
1757+
required: true
1758+
schema:
1759+
type: string
1760+
responses:
1761+
'200':
1762+
description: Export file downloaded
1763+
'404':
1764+
description: When job not found
1765+
content:
1766+
application/json:
1767+
examples:
1768+
Not found:
1769+
value:
1770+
type: error.list
1771+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1772+
errors:
1773+
- code: not_found
1774+
message: "Export job not found for identifier: job1"
1775+
schema:
1776+
"$ref": "#/components/schemas/error"
14951777
"/help_center/collections":
14961778
get:
14971779
summary: List all collections
@@ -9194,8 +9476,8 @@ paths:
91949476
operationId: getWhatsAppMessageStatus
91959477
description: |
91969478
Retrieves statuses of messages sent from the Outbound module. Currently, this API only supports WhatsApp messages.
9197-
9198-
9479+
9480+
91999481
This endpoint returns paginated status events for WhatsApp messages sent via the Outbound module, providing
92009482
information about delivery state and related message details.
92019483
responses:

0 commit comments

Comments
 (0)