Skip to content

Commit 2ddcc8e

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

File tree

1 file changed

+292
-2
lines changed

1 file changed

+292
-2
lines changed

descriptions/0/api.intercom.io.yaml

Lines changed: 292 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,296 @@ 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+
schema:
1656+
type: object
1657+
properties:
1658+
job_identifier:
1659+
type: string
1660+
example: 'job1'
1661+
status:
1662+
type: string
1663+
example: 'complete'
1664+
download_url:
1665+
type: string
1666+
download_expires_at:
1667+
type: string
1668+
'404':
1669+
description: When job not found
1670+
content:
1671+
application/json:
1672+
examples:
1673+
Not found:
1674+
value:
1675+
type: error.list
1676+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1677+
errors:
1678+
- code: not_found
1679+
message: "Export job not found for identifier: job1"
1680+
schema:
1681+
"$ref": "#/components/schemas/error"
1682+
'504':
1683+
description: When job has failed
1684+
content:
1685+
application/json:
1686+
schema:
1687+
type: object
1688+
properties:
1689+
job_identifier:
1690+
type: string
1691+
example: 'job1'
1692+
status:
1693+
type: string
1694+
example: 'failed'
1695+
download_url:
1696+
type: string
1697+
example: ''
1698+
download_expires_at:
1699+
type: string
1700+
example: ''
1701+
"/export/reporting_data/get_datasets":
1702+
get:
1703+
summary: List available datasets and attributes
1704+
parameters:
1705+
- name: Intercom-Version
1706+
in: header
1707+
schema:
1708+
"$ref": "#/components/schemas/intercom_version"
1709+
tags: [Export]
1710+
responses:
1711+
'200':
1712+
description: List of datasets
1713+
content:
1714+
application/json:
1715+
schema:
1716+
type: object
1717+
properties:
1718+
type:
1719+
type: string
1720+
example: list
1721+
data:
1722+
type: array
1723+
items:
1724+
type: object
1725+
properties:
1726+
id:
1727+
type: string
1728+
example: conversation
1729+
name:
1730+
type: string
1731+
example: Conversation
1732+
description:
1733+
type: string
1734+
example: "Conversation-level details: status, channel, assignee."
1735+
default_time_attribute_id:
1736+
type: string
1737+
example: conversation.first_user_conversation_part_created_at
1738+
attributes:
1739+
type: array
1740+
items:
1741+
type: object
1742+
properties:
1743+
id:
1744+
type: string
1745+
example: conversation.id
1746+
name:
1747+
type: string
1748+
example: Conversation ID
1749+
"/download/reporting_data/{job_identifier}":
1750+
get:
1751+
summary: Download completed export job data
1752+
tags: [Export]
1753+
parameters:
1754+
- name: Intercom-Version
1755+
in: header
1756+
schema:
1757+
"$ref": "#/components/schemas/intercom_version"
1758+
- name: app_id
1759+
in: query
1760+
required: true
1761+
schema:
1762+
type: string
1763+
- name: job_identifier
1764+
in: query
1765+
required: true
1766+
schema:
1767+
type: string
1768+
responses:
1769+
'200':
1770+
description: Export file downloaded
1771+
'404':
1772+
description: When job not found
1773+
content:
1774+
application/json:
1775+
examples:
1776+
Not found:
1777+
value:
1778+
type: error.list
1779+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
1780+
errors:
1781+
- code: not_found
1782+
message: "Export job not found for identifier: job1"
1783+
schema:
1784+
"$ref": "#/components/schemas/error"
14951785
"/help_center/collections":
14961786
get:
14971787
summary: List all collections
@@ -9194,8 +9484,8 @@ paths:
91949484
operationId: getWhatsAppMessageStatus
91959485
description: |
91969486
Retrieves statuses of messages sent from the Outbound module. Currently, this API only supports WhatsApp messages.
9197-
9198-
9487+
9488+
91999489
This endpoint returns paginated status events for WhatsApp messages sent via the Outbound module, providing
92009490
information about delivery state and related message details.
92019491
responses:

0 commit comments

Comments
 (0)