Skip to main content

Uniphore Customer Portal

Create Policies

Add an Allowlist Policy

Allowlist policies are the reverse of a Blocklist, an Allowlist can be used to specify calls to be retained that would otherwise be discarded (all calls outside the scope of the Allowlist will be discarded).

Use the create policy request to create Allowlist policies as needed, this article describes the endpoint, request parameters, response parameters, and examples for creating Allowlist policies.

Endpoint

Method: POST

URL: policy/create

Request Parameter

Parameter Name

Data Type

Description

Policy

Array

The details of the Allowlist policy you want to create.

name

String

A useful name for the policy.

priority

Number

Set the priority of the policy, the priority determines the order in which the policies are ran, 0 being first priority, 1 being second priority and so on.

status

String

Determine if the priority should be active (ENABLED) or inactive (DISABLED) once it's created, this can always be changed using the enable and disable policy requests.

policyType

String

Determine the type of policy (what the policy does), for an Allowlist policy set to allowlist.

groupFilter

Array

Set the filter for the policy to determine the conversations to retain.

See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

200

OK

Response Parameter

Parameter Name

Data Type

Description

status

String

The status of the request, this should display as POLICY_CREATED_SUCCESSFULLY.

id

Integer

The automatically generated ID for the policy.

For an example response, see Sample Response.

Sample Request
{"policy":{
    "name":"AllowlistJohnDoe",
    "priority":9,
    "status":"DISABLED",
    "policyType":"allowlist",
    "groupFilter": {
        "left_filter": {
          "field_name": "agent.id",
          "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL",
          "string_value": "johndoe@uniphore.com"
       }
    }
  }
}
Sample Response
{
    "status": "POLICY_CREATED_SUCCESSFULLY",
    "id": "18293"
}
Add a Blocklist Policy

Use Blocklist policies to provide fine control of what recordings are discarded, all calls outside the scope of the Blocklist will be retained. Recording Control policies do not impact live calls so they can continue to be monitored, blocklisting a call will not disable the call for recording and instead simply discard the call after the call has ended.

Use the create policy request to create Blocklist policies as needed, this article describes the endpoint, request parameters, response parameters, and examples for creating Blocklist policies.

Endpoint

Method: POST

URL: policy/create

Request Parameter

Parameter Name

Data Type

Description

Policy

Array

The details of the Blocklist policy you want to create.

name

String

A useful name for the policy.

priority

Number

Set the priority of the policy, the priority determines the order in which the policies are ran, 0 being first priority, 1 being second priority and so on.

status

String

Determine if the priority should be active (ENABLED) or inactive (DISABLED) once it's created, this can always be changed using the enable and disable policy requests.

policyType

String

Determine the type of policy (what the policy does), for a Blocklist policy set to blocklist.

groupFilter

Array

Set the filter for the policy to determine the conversations to discard.

See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

201

Created

Response Parameter

Parameter Name

Data Type

Description

status

String

The status of the request, this should display as POLICY_CREATED_SUCCESSFULLY.

id

Integer

The automatically generated ID for the policy.

For an example response, see Sample Response.

Sample Request
{"policy":{
    "name":"BlocklistJohnDoe",
    "priority":9,
    "status":"DISABLED",
    "policyType":"blocklist",
    "groupFilter": {
        "left_filter": {
          "field_name": "agent.id",
          "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL",
          "string_value": "johndoe@uniphore.com"
       }
    }
  }
}
Sample Response
{
    "status": "POLICY_CREATED_SUCCESSFULLY",
    "id": "18292"
}
Add a Purge Policy

The Purge policy type can be used to delete recordings (media, metadata, and transcriptions) from U‑Capture accessible storage (Media Store, Metadata Store, and External Storage Locations). This policy type is usually used to provide a retention policy capability, removing data from the system after a specified time.

Use the create policy request to create Purge policies as needed, this article describes the endpoint, request parameters, response parameters, and examples for creating Purge policies. This article does not detail how to create storage endpoints or add them to your U-Capture system, use the Endpoint APIs for managing storage location endpoints in your U-Capture system.

Endpoint

Method: POST

URL: /policy/create

Request Parameter

Parameter Name

Data Type

Description

policy

Array

The details of the Purge policy you want to create.

name

String

A useful name for the policy.

priority

Number

Set the priority of the policy, the priority determines the order in which the policies are ran, 0 being first priority, 1 being second priority and so on.

status

String

Determine if the priority should be active (ENABLED) or inactive (DISABLED) once it's created, this can always be changed using the enable and disable policy requests.

policyType

String

Determine the type of policy (what the policy does), for a Purge policy set to purge.

groupFilter

Array

Set the filter for the policy to determine the conversations to delete the data for.

See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses.

policy_attribute

Array

A list of additional attributes that the policy uses to function, these include an id that indicates which attribute to use and then a qualifier. Not all policy types require policy attributes, see get policy attributes for more information on each attribute.

For a Purge policy you will likely want to use the following attributes:

  • 1 - Data to Purge, required, string, which data to delete for the applicable conversations, valid values are either media or mediaAndMetadata.

  • 2 - Call Age Filter, optional, number, how many units of time the applicable conversations should be to have the policy applied (how old the call should be).

  • 3 - Call Age Unit, optional, string, which unit of time to use to determine how old the call should be to have the policy applied, see 2 above for the count of this unit, valid values are days, weeks, and years.

  • 12 - Schedule, required, number, the ID of the Schedule used to determine when to apply the policy.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

201

Created

Response Parameter

Parameter Name

Data Type

Description

status

String

The status of the request, this should display as POLICY_CREATED_SUCCESSFULLY.

id

Integer

The automatically generated ID for the policy.

For an example response, see Sample Response.

Sample Request
{"policy":{
    "name":"PurgeJohnDoe",
    "priority":9,
    "status":"DISABLED",
    "policyType":"purge",
    "groupFilter": {
        "left_filter": {
          "field_name": "agent.id",
          "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL",
          "string_value": "johndoe@uniphore.com"
       }
    },
    "policy_attribute": [{
            "id": "1",
            "value": "media"
        },
        {
            "id": "2",
            "value": "1"
        }
        {,
            "id": "3",
            "value": "years"
        },
        {
            "id": "12:.
            "scheduleId": "94"
        }]
    }
}
Sample Response
{
    "status": "POLICY_CREATED_SUCCESSFULLY",
    "id": "18341"
}
Add a Move Media Policy

Archive/Storage policies can be created to move media/archive metadata to external storage locations (for example “hot, warm, cool, or cold storage” facilities). Media and metadata are separated to provide further flexibility – for example, you may want to retain metadata and transcriptions (generally smaller files sizes) for faster search, but move the media (generally larger file sizes) to external cold storage providing for more cost-efficient occasional access.

Also, data can be moved from any U‑Capture accessible storage (Media Store, Metadata Store, External Storage Location) to your defined External Storage Location. This means data can be moved multiple times using separate policies to allow for changing requirements – for example, you may want to move media to warm storage after a year, but then move it again to cold storage after two years to provide for more cost-effective long-term archive.

Use the create policy request to create Move Media policies as needed, this article describes the endpoint, request parameters, response parameters, and examples for creating Move Media policies. This article does not detail how to create storage endpoints or add them to your U-Capture system, use the Endpoint APIs for managing storage location endpoints in your U-Capture system.

Endpoint

Method: POST

URL: /policy/create

Request Parameter

Parameter Name

Data Type

Description

policy

Array

The details of the Move Media policy you want to create.

name

String

A useful name for the policy.

priority

Number

Set the priority of the policy, the priority determines the order in which the policies are ran, 0 being first priority, 1 being second priority and so on.

status

String

Determine if the priority should be active (ENABLED) or inactive (DISABLED) once it's created, this can always be changed using the enable and disable policy requests.

policyType

String

Determine the type of policy (what the policy does), for a Move Media policy set to move-media.

groupFilter

Array

Set the filter for the policy to determine the conversations to move the media for.

See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses.

policy_attribute

Array

A list of additional attributes that the policy uses to function, these include an id that indicates which attribute to use and then a qualifier. Not all policy types require policy attributes, see get policy attributes for more information on each attribute.

For a move media policy you will likely want to use the following attributes:

  • 2 - Call Age Filter, optional, number, how many units of time the applicable conversations should be to have the policy applied (how old the call should be).

  • 3 - Call Age Unit, optional, string, which unit of time to use to determine how old the call should be to have the policy applied, see 2 above for the count of this unit, valid values for 3 are days, weeks, and years.

  • 4 - Storage Location, required, number following "s3EndpointDetailsId": , the ID of the storage location to move the conversation media to.

  • 5 - Output Format, required, string, the format of that the conversation audio should be sent to the storage location as, valid values are WAV, OPUS, or MP3.

  • 12 - Schedule, required, number, the ID of the Schedule used to determine when to apply the policy.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

201

Created

Response Parameter

Parameter Name

Data Type

Description

status

String

The status of the request, this should display as POLICY_CREATED_SUCCESSFULLY.

id

Integer

The automatically generated ID for the policy.

For an example response, see Sample Response.

Sample Request
{"policy":{
    "name":"MovemediaJohnDoe",
    "priority":9,
    "status":"DISABLED",
    "policyType":"move-media",
    "groupFilter": {
        "left_filter": {
          "field_name": "agent.id",
          "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL",
          "string_value": "johndoe@uniphore.com"
       }
    },
    "policy_attribute": [
        {
            "id": "2",
            "value": "90"
        },
        {
            "id": "3",
            "value": "days"
        },
        {
            "id": "4",
            "s3EndpointDetailsId": "309"
        },
        {
            "id": "5",
            "value": "WAV"
        },
        {
            "id": "12:.
            "scheduleId": "94"
        }]
    }
}
Sample Response
{
    "status": "POLICY_CREATED_SUCCESSFULLY",
    "id": "18339"
}
Add an Archive Metadata Policy

Archive/Storage policies can be created to move media/archive metadata to External Storage Locations (for example “hot, warm, cool, or cold storage” facilities). Media and metadata are separated to provide further flexibility – for example, you may want to retain metadata and transcriptions (generally smaller files sizes) in the U‑Capture Metadata Store for faster search, but move the media (generally larger file sizes) to external cold storage providing for more cost-efficient occasional access.

Also, data can be moved from any U‑Capture accessible storage (Media Store, Metadata Store, External Storage Location) to your defined External Storage Location. This means data can be moved multiple times using separate policies to allow for changing requirements – for example, you may want to archive your metadata to warm storage after a year, but then move it again to cold storage after two years to provide for more cost-effective long-term archive.

Use the create policy request to create Archive Metadata policies as needed, this article describes the endpoint, request parameters, response parameters, and examples for creating Archive Metadata policies. This article does not detail how to create storage endpoints or add them to your U-Capture system, use the Endpoint APIs for managing storage location endpoints in your U-Capture system.

Endpoint

Method: POST

URL: /policy/create

Request Parameter

Parameter Name

Data Type

Description

policy

Array

The details of the Archive Metadata policy you want to create.

name

String

A useful name for the policy.

priority

Number

Set the priority of the policy, the priority determines the order in which the policies are ran, 0 being first priority, 1 being second priority and so on.

status

String

Determine if the priority should be active (ENABLED) or inactive (DISABLED) once it's created, this can always be changed using the enable and disable policy requests.

policyType

String

Determine the type of policy (what the policy does), for an archive metadata policy set to archive-metadata.

groupFilter

Array

Set the filter for the policy to determine the conversations to archive the metadata for.

See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses.

policy_attribute

Array

A list of additional attributes that the policy uses to function, these include an id that indicates which attribute to use and then a qualifier. Not all policy types require policy attributes, see get policy attributes for more information on each attribute.

For an archive metadata policy you will likely want to use the following attributes:

  • 2 - Call Age Filter, optional, number, how many units of time the applicable conversations should be to have the policy applied (how old the call should be).

  • 3 - Call Age Unit, optional, string, which unit of time to use to determine how old the call should be to have the policy applied, see 2 above for the count of this unit, valid values are days, weeks, and years.

  • 4 - Storage Location, required, number following "s3EndpointDetailsId": , the ID of the storage location to archive the conversation metadata to.

  • 5 - Output Format, required, string, the format of that the conversation metadata should be sent to the storage location as, valid values are JSON or CSV.

  • 12 - Schedule, required, number, the ID of the Schedule used to determine when to apply the policy.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

201

Created

Response Parameter

Parameter Name

Data Type

Description

status

String

The status of the request, this should display as POLICY_CREATED_SUCCESSFULLY.

id

Integer

The automatically generated ID for the policy.

For an example response, see Sample Response.

Sample Request
{"policy":{
    "name":"ArchiveMetadataJohnDoe",
    "priority":9,
    "status":"DISABLED",
    "policyType":"archive-metadata",
    "groupFilter": {
        "left_filter": {
          "field_name": "agent.id",
          "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL",
          "string_value": "johndoe@uniphore.com"
       }
    },
    "policy_attribute": [{
            "id": "2",
            "value": "180"
        },
        {
            "id": "3",
            "value": "days"
        },
        {
            "id": "4",
            "s3EndpointDetailsId": "82"
        },        {
            "id": "5",
            "value": "JSON"
        },
        {
            "id": "12:.
            "scheduleId": "94"
        }]
    }
}
Sample Response
{
    "status": "POLICY_CREATED_SUCCESSFULLY",
    "id": "18340"
}
Add a Transcription Policy

Use the create policy request to add a Transcription policy, in order to determine which calls to transcribe and which endpoint to send the transcription to, with U-Capture all calls are transcribed at no extra cost.

Endpoint

Method: POST

URL: /policy/create

Request Parameter

Parameter Name

Data Type

Description

policy

Array

The details of the Transcription policy you want to create.

name

String

A useful name for the policy.

priority

Number

Set the priority of the policy, the priority determines the order in which the policies are ran, 0 being first priority, 1 being second priority and so on.

status

String

Determine if the priority should be active (ENABLED) or inactive (DISABLED) once it's created, this can always be changed using the enable and disable policy requests.

policyType

String

Determine the type of policy (what the policy does), for a Transcription policy set to transcribe.

groupFilter

Array

Set the filter for the policy to determine the conversations to transcribe.

See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses.

policy_attribute

Array

A list of additional attributes that the policy uses to function, these include an id that indicates which attribute to use and then a qualifier. Not all policy types require policy attributes, see get policy attributes for more information on each attribute.

For a transcription policy you need to use the following attribute:

  • 6 - Call Push Endpoint, required, number following endpointDetailsId, the ID of the call push endpoint to export the transcription to.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

201

Created

Response Parameter

Parameter Name

Data Type

Description

status

String

The status of the request, this should display as POLICY_CREATED_SUCCESSFULLY.

id

Integer

The automatically generated ID for the policy.

For an example response, see Sample Response.

Sample Request
{"policy":{
    "name":"TranscribeJohnDoe",
    "priority":9,
    "status":"DISABLED",
    "policyType":"transcribe",
    "groupFilter": {
        "left_filter": {
          "field_name": "agent.id",
          "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL",
          "string_value": "johndoe@uniphore.com"
       }
    },
    "policy_attribute": [{
            "id": "6",
            "endpointDetailsId": "504"
        }]
    }
}
Sample Response
{
    "status": "POLICY_CREATED_SUCCESSFULLY",
    "id": "18342"
}
Add a Call Push Export Policy

Use the create policy request to add an Export policy, use Export policies to specify recordings to export to your defined endpoints and trigger the export automatically. Use Call Push Policies to export specified calls to defined endpoints post call. For realtime export policies see Add a Real-Time Audio Export Policy.

Note

One off/manual exports can be created using APIs as well, see Data Export APIs for more details.

Endpoint

Method: POST

URL: /policy/create

Request Parameter

Parameter Name

Data Type

Description

policy

Array

The details of the Call Push policy you want to create.

name

String

A useful name for the policy.

priority

Number

Set the priority of the policy, the priority determines the order in which the policies are ran, 0 being first priority, 1 being second priority and so on.

status

String

Determine if the priority should be active (ENABLED) or inactive (DISABLED) once it's created, this can always be changed using the enable and disable policy requests.

policyType

String

Determine the type of policy (what the policy does), for a Call Push (post-call) export policy set to callpush.

groupFilter

Array

Set the filter for the policy to determine the post call conversations to export.

See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses.

policy_attribute

Array

A list of additional attributes that the policy uses to function, these include an id that indicates which attribute to use and then a qualifier. Not all policy types require policy attributes, see get policy attributes for more information on each attribute.

For a Call Push export policy you will likely want to use some or all of the following attributes:

  • 6 - Call Push Endpoint, required, number following endpointDetailsId, the ID of the call push endpoint to export to.

  • 9 - Data to Callpush, optional, string, what kind of data to export, valid values are either media, metadata or media,metadata.

  • 10 - Callpush Metadata Format, optional (required if 9 is set to either metadata or media,metadata), string, what format to export the metadata in, valid values are either JSON or CSV.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

201

Created

Response Parameter

Parameter Name

Data Type

Description

status

String

The status of the request, this should display as POLICY_CREATED_SUCCESSFULLY.

id

Integer

The automatically generated ID for the policy.

For an example response, see Sample Response.

Sample Request
{"policy":{
    "name":"CallPushJohnDoe",
    "priority":9,
    "policyType":"callpush",
    "status":"DISABLED",
    "groupFilter":{
        "leftGroupFilter":{
            "leftFilter":{
                "fieldName":"agent.email",
                "operator":"CONVERSATION_FILTER_OPERATOR_EQUAL",
                "stringValue":"johndoe@uniphore.com"
            }
        }
    },
    "policyAttribute":[{
        "id":"6",
        "endpointDetailsId":"1251"
        },
        {
            "id":"9",
            "value":"metadata,media"
        },
        {
            "id":"10",
            "value":"JSON"
        }]
    }
}
Sample Response
{
    "status": "POLICY_CREATED_SUCCESSFULLY",
    "id": "18343"
}
Add a Real-Time Audio Export Policy

Use the create policy request to add an Export policy, use Export policies to specify recordings to export to your defined endpoints and trigger the export automatically. Use Real-time Audio Policies to export specified conversation audio to defined endpoints in real-time as the call is captured. For post call export policies see Add a Call Push Export Policy.

Note

One off/manual exports can be created using APIs as well, see Data Export APIs for more details.

Endpoint

Method: POST

URL: /policy/create

Request Parameter

Parameter Name

Data Type

Description

policy

Array

The details of the Real-Time Audio policy you want to create.

name

String

A useful name for the policy.

priority

Number

Set the priority of the policy, the priority determines the order in which the policies are ran, 0 being first priority, 1 being second priority and so on.

status

String

Determine if the priority should be active (ENABLED) or inactive (DISABLED) once it's created, this can always be changed using the enable and disable policy requests.

policyType

String

Determine the type of policy (what the policy does), for a Real-Time Audio export policy set to realtime-audio.

groupFilter

Array

Set the filter for the policy to determine the live conversations to export in real-time.

See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses.

policy_attribute

Array

A list of additional attributes that the policy uses to function, these include an id that indicates which attribute to use and then a qualifier. Not all policy types require policy attributes, see get policy attributes for more information on each attribute.

For a Real-Time Audio export policy you need to use following attribute:

  • 7 - Realtime Endpoint, required, number following endpointDetailsId, the ID of the realtime endpoint to export to.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

201

Created

Response Parameter

Parameter Name

Data Type

Description

status

String

The status of the request, this should display as POLICY_CREATED_SUCCESSFULLY.

id

Integer

The automatically generated ID for the policy.

For an example response, see Sample Response.

Sample Request
{"policy":{
    "name":"RealtimeJohnDoe",
    "priority":9,
    "policyType":"realtime-audio",
    "status":"DISABLED",
    "groupFilter":{
        "leftGroupFilter":{
            "leftFilter":{
                "fieldName":"agent.email",
                "operator":"CONVERSATION_FILTER_OPERATOR_EQUAL",
                "stringValue":"johndoe@uniphore.com"
            }
        }
    },
    "policy_attribute":[{
        "id":"7",
        "endpointDetailsId":"660"
        }]
    }
}
Sample Response
{
    "status": "POLICY_CREATED_SUCCESSFULLY",
    "id": "18344"
}
Add an Access Control Policy

Use the create policy request to add an Access Control policy, use Access Control policies to assign granular access permissions for your U‑Capture users using call Filters (which calls) and Claims (which groups/users in your Organization Hierarchy).

This article describes the endpoint, request parameters, response parameters, and examples for creating Access Control policies - this creates the Filter mentioned above but does not create the Claims. Once the Access Control policy is created, Claims need adding using an attach a claims map request.

Endpoint

Method: POST

URL: /policy/create

Request Parameter

Parameter Name

Data Type

Description

policy

Array

The details of the Access Control policy you want to create.

name

String

A useful name for the policy.

priority

Number

Set the priority of the policy, the priority determines the order in which the policies are ran, 0 being first priority, 1 being second priority and so on.

status

String

Determine if the priority should be active (ENABLED) or inactive (DISABLED) once it's created, this can always be changed using the enable and disable policy requests.

policyType

String

Determine the type of policy (what the policy does), for an Access Control policy set to metadata-and-media-playback-access.

groupFilter

Array

Set the filter for the policy to determine the conversations to provide access to.

See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses.

As mentioned above once the Access Control policy is created, Claims need adding using an attach a claims map request.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

201

Created

Response Parameter

Parameter Name

Data Type

Description

status

String

The status of the request, this should display as POLICY_CREATED_SUCCESSFULLY.

id

Integer

The automatically generated ID for the policy.

For an example response, see Sample Response.

Sample Request
{"policy":{
    "name":"AccessToJohnDoe",
    "priority":9,
    "status":"DISABLED",
    "policyType":"metadata-and-media-playback-access",
    "groupFilter": {
        "left_filter": {
          "field_name": "agent.email",
          "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL",
          "string_value": "johndoe@uniphore.com"
       }
    }
  }
}
Sample Response
{
    "status": "POLICY_CREATED_SUCCESSFULLY",
    "id": "18344"
}
Attach a Claims Map

Use the attach claims map request to add or update the claims map associated with an Access Control policy. Claims specify which users and which organization groups in your Organization Hierarchy should have access permissions to the conversations that match the filter in an Access Control policy.

To check the existing claims map on an access control policy, use the get map for a policy request.

Endpoint

Method: POST

URL: /policy/claims-mapping/attach

Request Parameter

Parameter Name

Data Type

Description

id

Number

The ID of the Access Control policy you want to add or update the claims for.

claims

Array

A list of the users and organization groups to add to the claims of the policy (which users and groups will have access to the conversations matching the filter of the access control policy), consisting of userEmails and organizationGroupIds.

userEmails

Array

A list of user emails to add to the claims of the policy, which individual users will have access to the conversations matching the filters of the access control policy.

Use the get users request to get a list of the users in your system and therefore a list of valid user emails.

organizationGroupIds

Array

A list of IDs for the organization groups to add to the claims of the policy, which groups will have access to the conversations matching the filters of the access control policy.

Use the get organization groups request to get a list of the organization groups in your system and therefore a list of valid IDs.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

201

Created

Sample Request

The example below would add a claim to the access policy with the ID 19081 - it would grant Amy, Barry, and everyone in the organization groups 80 and 81 access to the conversations that match the filter specified in policy 19081.

{
    "id": "19081",
    "claims": {
        "userEmails": [
            "amy@uniphore.com",
            "barry@uniphore.com"
        ],
        "organizationGroupIds": [
            "80",
            "82"
        ]
    }
}
Add a Locks Policy

Use the create policy request to add a Locks policy - use Locks policies to automatically lock calls where call metadata matches specified conditions using filters, ensuring that calls are retained in the system and are not deleted. This provides an automated legal hold system for your captured calls. This article describes the endpoint, request parameters, response parameters, and examples for creating Locks policies.

Note

Locks policies are used to automatically lock captured calls based on calls filters, however calls can also be locked manually either live or post call.

Endpoint

Method: POST

URL: /policy/create

Request Parameter

Parameter Name

Data Type

Description

policy

Array

The details of the Locks policy you want to create.

name

String

A useful name for the policy.

priority

Number

Set the priority of the policy, the priority determines the order in which the policies are ran, 0 being first priority, 1 being second priority and so on.

status

String

Determine if the priority should be active (ENABLED) or inactive (DISABLED) once it's created, this can always be changed using the enable and disable policy requests.

policyType

String

Determine the type of policy (what the policy does), for a Locks policy set to lock.

groupFilter

Array

Set the filter for the policy to determine the conversations to lock.

See Filters for a detailed explanation on how filters work - how to use them in API requests and therefore how to understand them in API responses.

policy_attribute

Array

A list of additional attributes that the policy uses to function, these include an id that indicates which attribute to use and then a qualifier. Not all policy types require policy attributes, see get policy attributes for more information on each attribute.

For a Locks policy you will need the following attribute:

  • 11 - Lock Reason, required, string, the reason why the conversations matching the filter are to be locked, this will help users understand why the conversation should not be deleted.

For an example Request, see Sample Request.

Response and Error Code

Response Code

Condition

201

Created

Response Parameter

Parameter Name

Data Type

Description

status

String

The status of the request, this should display as POLICY_CREATED_SUCCESSFULLY.

id

Integer

The automatically generated ID for the policy.

For an example response, see Sample Response.

Sample Request
{"policy":{
    "name":"LockJohnDoe",
    "priority":9,
    "status":"DISABLED",
    "policyType":"lock",
    "groupFilter": {
        "left_filter": {
          "field_name": "agent.email",
          "operator": "CONVERSATION_FILTER_OPERATOR_EQUAL",
          "string_value": "johndoe@uniphore.com"
       }
    },
    "policy_attribute": [{
            "id": "11",
            "value": "Training"
        }]
    }
}
Sample Response
{
    "status": "POLICY_CREATED_SUCCESSFULLY",
    "id": "18345"
}