{
  "info": {
    "_postman_id": "d511a287-1e44-407a-bbc1-5f9d36da1691",
    "name": "Dstny Call Recording API",
    "description": "Dstny Call Recording API. Fill in the collection variables email and token. The token comes from recording.dstny.se under Configuration, Tokens. Full documentation: https://dstny.se/hubfs/dstny-call-recording-api.html",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "basic",
    "basic": [
      {
        "key": "username",
        "value": "{{email}}",
        "type": "string"
      },
      {
        "key": "password",
        "value": "{{token}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Recordings",
      "item": [
        {
          "name": "List recordings by date",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/GetRecordingsByDate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "GetRecordingsByDate"
              ]
            },
            "description": "Returns recordings made between a start and end date. At most 1000 records per call.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"StartDate\": \"2026-10-01 00:00:00\",\n  \"EndDate\": \"2026-10-31 23:59:59\",\n  \"Directions\": \"O,I\",\n  \"MinDuration\": 5,\n  \"Flags\": \"Red,Green,NoFlag\",\n  \"Evaluation\": \"0\",\n  \"MinRecordId\": 34450\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List recordings by caller ID",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/GetRecordingsByCLI",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "GetRecordingsByCLI"
              ]
            },
            "description": "Returns recordings for one CLI (caller ID) between a start and end date. At most 1000 records per call.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"CLI\": \"0701234567\",\n  \"StartDate\": \"2026-10-01 00:00:00\",\n  \"EndDate\": \"2026-10-31 23:59:59\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List recordings by record ID range",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/GetRecordingsByRecordID",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "GetRecordingsByRecordID"
              ]
            },
            "description": "Returns recordings with a record ID between a start and end ID. If exactly 1000 records come back, call again with the last returned `RecordId` as `StartRecordID`. This operation also accepts the internal directions `Y` and `Z`.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"StartRecordID\": 34445,\n  \"EndRecordID\": 54445,\n  \"Directions\": \"O,I,Y,Z\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Download a recording",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "audio/wav"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/GetRecordingFile",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "GetRecordingFile"
              ]
            },
            "description": "Returns the audio file of one recording as a byte stream. Save the response body as a `.wav` file.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"RecordID\": 2013\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delete a recording",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/DeleteCallRecording",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "DeleteCallRecording"
              ]
            },
            "description": "Deletes one recording, for example to answer a GDPR erasure request. **Deletion cannot be undone.** Check the record ID before you send the call. The deleted recording shows as a masked record under Configuration, Compliance, Delete Recordings in the portal, and the deletion is written to the audit log.\n",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"RecordID\": 50100\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Token",
      "item": [
        {
          "name": "Get details of the current token",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/token",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "token"
              ]
            },
            "description": "Returns the details of the token used to authenticate this request, including its expiry date and permissions. Use it to check when a token expires."
          }
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://recording.dstny.se/api/v4",
      "type": "string"
    },
    {
      "key": "email",
      "value": "",
      "type": "string"
    },
    {
      "key": "token",
      "value": "",
      "type": "string"
    }
  ]
}