{"info":{"_postman_id":"6ac27f15-a68a-48df-82b2-d1f917f5cc14","name":"Cradle Customer API","description":"<html><head></head><body><p>The Cradle customer api can be used for retrieving conversations (call records) from Cradle's database. You can also sign up to receive webhooks of each conversation at the end of every conversation.</p>\n<p>To receive API credentials, please chat with us whilst logged into the <a href=\"https://admin.cradle.io/\">Cradle admin platform</a>, and we will provide an API ID and Key via a secure channel. <strong>You will need to be signed into Cradle to authenticate your user. Requests by email and phone will not be accepted.</strong></p>\n<p>Please supply a webhook URL when requesting API access.</p>\n<p>Generally, you will want to use the conversations endpoint to access call and user history data. If you are wanting to archive call recordings in your own system, please use the recordings endpoints.</p>\n<h4 id=\"rate-limiting\">Rate Limiting</h4>\n<p>Please respect the api and make no more than 10 requests every second, never have more than 10 concurrent requests in flight at one time, and never make a request until the response from the previous request has been received. Exceeding this limit will result in rate limiting (you may receive 429 responses to your requests).</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"11360917","collectionId":"6ac27f15-a68a-48df-82b2-d1f917f5cc14","publishedId":"Tz5p6xqX","public":true,"customColor":{"top-bar":"240D50","right-sidebar":"240D50","highlight":"FF7057"},"publishDate":"2022-07-11T00:13:49.000Z"},"item":[{"name":"conversations","item":[{"name":"Get Conversation List","id":"a0d404ca-2332-4e84-81c4-fa0ce85d95c4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"CRADLE_API_KEY"},{"key":"value","value":"your_api_key"}]},"isInherited":false},"method":"GET","header":[{"key":"CRADLE_ID","value":"your_id","type":"text"}],"url":"https://api.cradle.io/api/v1/public/conversations?from=2022-06-01T00:00:00.000Z&until=2022-06-01T12:00:00.000Z","description":"<p>Returns the list of conversations for the selected dates. Each conversation can have the following fields.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>uuid</code></td>\n<td>UUID for the  <br />conversation.  <br />Unique within  <br />Cradle.</td>\n</tr>\n<tr>\n<td><code>startedAt</code></td>\n<td>The <code>datetime</code> at  <br />which the  <br />conversation  <br />began.</td>\n</tr>\n<tr>\n<td><code>nature</code></td>\n<td>Whether a  <br />conversation  <br />was inbound (<code>in</code>), outbound  <br />(<code>out</code>) or solely  <br />between team  <br />members  <br />(<code>team</code>)</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>The status or  <br />outcome of a  <br />conversation.  <br />Varies based on  <br />nature. Outbound conversations will show <code>completed</code> and inbound and team conversations will show <code>successful</code>, <code>missed</code> or <code>voicemail</code></td>\n</tr>\n<tr>\n<td><code>durationSeconds</code></td>\n<td>The total duration of the conversation</td>\n</tr>\n<tr>\n<td><code>cradleNumber</code></td>\n<td>The number that was used if the conversation was connected via the PTSN. For <code>in</code> conversations, this is the number that the third party dialled, and for <code>out</code> conversations, this is the caller ID that was presented to the third party.</td>\n</tr>\n<tr>\n<td><code>thirdPartyNumbers</code></td>\n<td>An array of third parties that took part in the conversation. See details below.</td>\n</tr>\n<tr>\n<td><code>users</code></td>\n<td>An array of Cradle users who took part in the conversation. See details below.</td>\n</tr>\n<tr>\n<td><code>recordings</code></td>\n<td>An array of recordings associated with the conversation. Note: if you are archiving recordings we recommend using <code>GET recordings</code> endpoint.</td>\n</tr>\n</tbody>\n</table>\n</div><p>Details of <code>thirdPartyNumbers</code></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>number</code></td>\n<td>The E.164 format phone number for the third party that took part in the conversation</td>\n</tr>\n<tr>\n<td><code>durationSeconds</code></td>\n<td>The duration of that party's interaction with the conversation, in seconds</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>The status of this leg of the conversation (<code>completed</code>, <code>noanswer</code>)</td>\n</tr>\n<tr>\n<td><code>direction</code></td>\n<td>The direction of that party's interaction, either <code>in</code> or <code>out</code>. In means they dialled a Cradle number and out means they were dialled by a Cradle user.</td>\n</tr>\n</tbody>\n</table>\n</div><p>Details of <code>users</code></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>The email address of the Cradle user</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>The status of the user's interaction with the conversation. Can be the following for inbound calls to that user:  <br />* <code>answered</code>  <br />* <code>noanswer</code>  <br />* <code>declined</code>  <br />  <br />For calls made by that user  <br />* <code>dialled</code>  <br />  <br /></td>\n</tr>\n<tr>\n<td><code>durationSeconds</code></td>\n<td>The length that the user was part of the conversation (0 seconds where there was no participation)</td>\n</tr>\n<tr>\n<td><code>rangForSeconds</code></td>\n<td>The length of time an incoming call rang for that user.</td>\n</tr>\n<tr>\n<td><code>presence</code></td>\n<td>For incoming calls, the presence of that user at the time the phone rang.</td>\n</tr>\n<tr>\n<td><code>startedAt</code></td>\n<td>The time that the interaction with that user first happened (can be used for sequencing).</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["api","v1","public","conversations"],"host":["https://api.cradle.io"],"query":[{"key":"from","value":"2022-06-01T00:00:00.000Z"},{"key":"until","value":"2022-06-01T12:00:00.000Z"}],"variable":[]}},"response":[{"id":"94ba5202-7ed9-492d-a093-54070fc33706","name":"Get Conversation List","originalRequest":{"method":"GET","header":[{"key":"CRADLE_ID","value":"your_id","type":"text"},{"key":"CRADLE_API_KEY","value":"your_api_key","type":"text"}],"url":{"raw":"https://api.cradle.io/api/v1/public/conversations?from=2022-05-14T02:08:00.000Z&until=2022-05-15T02:28:00.000Z","protocol":"https","host":["api","cradle","io"],"path":["api","v1","public","conversations"],"query":[{"key":"from","value":"2022-05-14T02:08:00.000Z"},{"key":"until","value":"2022-05-15T02:28:00.000Z"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Thu, 11 Mar 2021 23:22:26 GMT"},{"key":"Content-Length","value":"551"}],"cookie":[],"responseTime":null,"body":"{\n    \"conversations\": [\n        {\n            \"uuid\": \"31e66015-9edd-47bc-b505-7ea306436744\",\n            \"startedAt\": \"2022-05-14T18:05:12Z\",\n            \"nature\": \"out\",\n            \"status\": \"completed\",\n            \"durationSeconds\": 13,\n            \"cradleNumber\": \"+6425999111\",\n            \"thirdPartyNumbers\": [\n                {\n                    \"number\": \"+6498879333\",\n                    \"durationSeconds\": 75,\n                    \"status\": \"completed\",\n                    \"direction\": \"out\"\n                },\n                {\n                    \"number\": \"+6425123456\",\n                    \"durationSeconds\": 0,\n                    \"status\": \"noanswer\",\n                    \"direction\": \"out\"\n                }\n            ],\n            \"users\": [\n                {\n                    \"email\": \"user1@cradle.io\",\n                    \"status\": \"noanswer\",\n                    \"durationSeconds\": 0,\n                    \"rangForSeconds\": 23,\n                    \"presence\": \"idle\",\n                    \"startedAt\": \"2022-05-14T18:05:12Z\"\n                },\n                {\n                    \"email\": \"user2@cradle.io\",\n                    \"status\": \"noanswer\",\n                    \"durationSeconds\": 0,\n                    \"rangForSeconds\": 0,\n                    \"presence\": \"available\",\n                    \"startedAt\": \"2022-05-14T18:06:12Z\"\n                }\n            ],\n            \"recordings\": [\n                {\n                    \"url\": \"https://api.cradle.io/api/v1/public/recordings/21f448c3-fda6-51b7-931c-559c3b2fd723.mp3?source=api\"\n                },\n                {\n                    \"url\": \"https://api.cradle.io/api/v1/public/recordings/24d5ebdc-cfe1-555b-985b-f4e037b90fdd.mp3?source=api\"\n                }\n            ]\n        }\n    ]\n}"}],"_postman_id":"a0d404ca-2332-4e84-81c4-fa0ce85d95c4"}],"id":"13841652-9d15-4166-a389-1b8b47c7af30","description":"<p>Use this endpoint to pull full lists of all conversations your team have had, and their participation in those conversations. Recommended for:</p>\n<ul>\n<li>Understanding user performance</li>\n<li>Understanding phone performance for the whole company</li>\n<li>Archiving call times and lengths for audit or CRM purposes</li>\n</ul>\n<p>If subscribed to a webhook, you will receive the same information within each conversation at the end of the conversation. Webhooks will be retried up to three times over a 24 hour period, if unsuccessful, and thereafter will be dropped.</p>\n","_postman_id":"13841652-9d15-4166-a389-1b8b47c7af30"},{"name":"recording","item":[{"name":"Get Recording List","id":"b113e4be-018b-4499-a13d-e2639e6258df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"CRADLE_API_KEY"},{"key":"value","value":"your_api_key"}]},"isInherited":false},"method":"GET","header":[{"key":"CRADLE_ID","value":"your_id","type":"text"}],"url":"https://api.cradle.io/api/v1/public/recordings?from=2022-06-01T00:00:00.000Z&until=2022-06-01T12:00:00.000Z","description":"<p>Returrns the list of recording for the selected dates</p>\n","urlObject":{"path":["api","v1","public","recordings"],"host":["https://api.cradle.io"],"query":[{"key":"from","value":"2022-06-01T00:00:00.000Z"},{"key":"until","value":"2022-06-01T12:00:00.000Z"}],"variable":[]}},"response":[{"id":"bea695cd-62ab-4f78-8e80-b71180cf1c8f","name":"Get Recording List","originalRequest":{"method":"GET","header":[{"key":"CRADLE_ID","value":"your_id","type":"text"},{"key":"CRADLE_API_KEY","value":"your_api_key","type":"text"}],"url":{"raw":"https://api.cradle.io/api/v1/public/recordings?from=2019-03-10T02:08:00.000Z&until=2019-10-13T02:28:00.000Z","protocol":"https","host":["api","cradle","io"],"path":["api","v1","public","recordings"],"query":[{"key":"from","value":"2019-03-10T02:08:00.000Z"},{"key":"until","value":"2019-10-13T02:28:00.000Z"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Date","value":"Thu, 11 Mar 2021 23:22:26 GMT"},{"key":"Content-Length","value":"551"}],"cookie":[],"responseTime":null,"body":"{\n    \"recordings\": [\n        {\n            \"url\": \"https://api.cradle.io/api/v1/public/recordings/935f1dc8-b56a-535c-b678-95edf74c593c.mp3?source=api\",\n            \"startedAt\": \"2021-03-11T00:18:39Z\",\n            \"durationSeconds\": 189,\n            \"cradleNumber\": \"+14152125161\",\n            \"thirdPartyNumber\": \"+14155555161\",\n            \"agent1\": \"user1@cradle.io\",\n            \"nature\": \"in\"\n        },\n        {\n            \"url\": \"https://api.cradle.io/api/v1/public/recordings/936f1dc8-b56a-535c-b678-95edf74c593c.mp3?source=api\",\n            \"startedAt\": \"2021-03-11T00:18:59Z\",\n            \"durationSeconds\": 154,\n            \"cradleNumber\": \"+14152125161\",\n            \"thirdPartyNumber\": \"+14155555161\",\n            \"agent1\": \"user1@cradle.io\",\n            \"nature\": \"out\"\n        },\n        {\n            \"url\": \"https://api.cradle.io/api/v1/public/recordings/937f1dc8-b56a-535c-b678-95edf74c593c.mp3?source=api\",\n            \"startedAt\": \"2021-03-11T00:19:59Z\",\n            \"durationSeconds\": 417,\n            \"agent1\": \"user1@cradle.io\",\n            \"agent2\": \"user2@cradle.io\",\n            \"nature\": \"team\"\n        }\n    ],\n    \"size\": 3\n}"}],"_postman_id":"b113e4be-018b-4499-a13d-e2639e6258df"},{"name":"Get Recording","id":"95a0f2e2-ed9f-499f-9b17-67cef3689967","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"CRADLE_API_KEY"},{"key":"value","value":"your_api_key"}]},"isInherited":false},"method":"GET","header":[{"key":"CRADLE_ID","value":"your_id","type":"text"}],"url":"https://api.cradle.io/api/v1/public/recordings/recording_id.mp3?source=api","description":"<p>Return a recording URL by uuid.</p>\n<p>Note that this API returns files of sizes up to 100 MB, which may take many seconds to respond to.</p>\n","urlObject":{"path":["api","v1","public","recordings","recording_id.mp3"],"host":["https://api.cradle.io"],"query":[{"key":"source","value":"api"}],"variable":[]}},"response":[{"id":"fc3d15da-bce0-45dd-a94f-a3a8ed5e6323","name":"Get Recording","originalRequest":{"method":"GET","header":[{"key":"CRADLE_ID","value":"your_id","type":"text"},{"key":"CRADLE_API_KEY","value":"your_api_key","type":"text"}],"url":{"raw":"https://api.cradle.io/api/v1/public/recordings/11bd5c0c-1fe9-593e-b0df-cc91a3ed5f29.mp3?source=api","host":["https://api.cradle.io"],"path":["api","v1","public","recordings","11bd5c0c-1fe9-593e-b0df-cc91a3ed5f29.mp3"],"query":[{"key":"source","value":"api"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"95a0f2e2-ed9f-499f-9b17-67cef3689967"}],"id":"ab570372-195e-4e52-99a4-09f70e4ebe2f","description":"<p>These two endpoints are specific to those wishing to archive all recordings. The list of conversations may not be complete as any that don't have a recording are not returned.</p>\n<p>Each recording will be returned with information specific to the recording. Some conversations will have multiple recordings, for example those that are transferred between users.</p>\n","_postman_id":"ab570372-195e-4e52-99a4-09f70e4ebe2f"}],"event":[{"listen":"prerequest","script":{"id":"8500464b-8de4-47f3-8218-944443eda5ee","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"cb36409c-888f-4829-a4bd-620953fb5005","type":"text/javascript","exec":[""]}}],"variable":[{"key":"host","value":"https://api.cradle.io","type":"string"},{"key":"cradle_id","value":"your_id","type":"string"},{"key":"cradle_api_key","value":"your_api_key","type":"string"},{"key":"from","value":"2022-06-01T00:00:00.000Z","type":"string"},{"key":"to","value":"2022-06-01T12:00:00.000Z","type":"string"},{"key":"recording_id","value":"recording_id"}]}