Safe Voice API
Overview
The Safe Voice API allows you to create screenings of Vivox voice channels and retrieve the recordings and insights
of the conversation between the players in that channel.
Additionally, the results of each screening can be viewed by moderators in our UDash UI tool such that they can
efficiently take action on problematic behaviour.
For more information, please refer to our Documentation.
Download OpenAPI specification:
Create a Safe Voice Screening
Create a Safe Voice Screening
Authorizations
ServiceAccount (Safe Voice Processor (safevoice.screening.create))
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: Safe Voice Processor (safevoice.screening.create)
Request body for "{title}"
Media Type:
application/jsonThe URI of the channel that you want to screen.
To learn more about the Vivox channel URI structure, refer to the Channel URI structure section in the Vivox documentation.
Enter the full url of where your server is listening to receive error and status callbacks.
Safe Voice will invoke this endpoint once the screening is complete, or if there was an error.
Safe Voice will send a POST request with the same body as a GET screening would return.
Specifying a callbackKey together with the callbackUrl is required.
If you would like to validate that the callbacks sent to your callback endpoint are from Safe Voice,
you can specify this parameter.
We will sent the content of this field in the 'Authorization' header in the callback request as a basic auth header.
This means the header will look like this: "Authorization": "callbackKey"
The event type responsible for the audio session processing.
For instance:
- report: screening created from user report.
- unreported: screening created by random match sample.
- sample: Deprecated, use instead.
unreported - mute: screening created based on mute events.
- unspecified: screening created by an unspecified event.
- unknown: Deprecated, use instead.
unspecified
The player ID used to login to Vivox. Learn more about player IDs in our Developer Documentation.
The player ID used to login to Vivox. Learn more about player IDs in our Developer Documentation.
A list of player data.
If player data is provided, Safe Voice will only record and process
the audio of the players in this list.
It's important that the playerId field provided matches the player id that was used to login to vivox.
If the players list is not provided, all players will be recorded and processed.
The player ID used to login to Vivox. Learn more about player IDs in our Developer Documentation.
Player ID that will be the focal point of the recording. If perspectiveTarget is defined, Safe Voice will record all interactions involving this player from their perspective.
If consent enforcement is enabled, all present players must have given consent before submitting the request.
Code samples for "{title}":
Request example
curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Content-Type: application/json" \ -d '{ "targetUri": "sip:confctl-g-issuer.lobby@vdx5.vivox.com.", "history": 0, "receiveResults": false, "destinationCredentials": { "bucket": "string", "accessKeyId": "string", "secretAccessKey": "string" }, "callbackUrl": "https://example.com", "callbackKey": "string", "eventType": "string", "playerReportEvents": [ { "reportType": [ "string" ], "reportReason": "string", "reportedPlayerId": "string", "reporterPlayerId": "string" } ], "customMetadata": {}, "players": [ { "playerId": "string", "displayName": "string" } ], "perspectiveTarget": "string"}' \ "https://services.api.unity.com/safevoice/v1/organizations/{organizationId}/projects/{projectId}/environments/{environmentId}/screenings"
Response example
{ "id": "string", "createdAt": "string", "updatedAt": "string", "processingStatus": "NEW", "errorDescription": "string", "errorCode": "string", "organization": "string", "project": "string", "environment": "string", "targetUri": "sip:confctl-g-issuer.lobby@vdx5.vivox.com.", "receiveResults": true, "callbackUrl": "https://example.com", "eventType": "string", "playerReportEvents": [ { "reportType": [ "string" ], "reportReason": "string", "reportedPlayerId": "string", "reporterPlayerId": "string" } ], "customMetadata": {}, "players": [ { "playerId": "string", "displayName": "string" } ], "perspectiveTarget": "string"}
Retrieve a Safe Voice Screening
Retrieve a Safe Voice Screening
Authorizations
ServiceAccount (Safe Voice Processor (safevoice.screening.get))
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: Safe Voice Processor (safevoice.screening.get)
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/safevoice/v1/organizations/{organizationId}/projects/{projectId}/environments/{environmentId}/screenings/{screeningId}"
Response example
{ "id": "string", "createdAt": "string", "updatedAt": "string", "processingStatus": "NEW", "errorDescription": "string", "errorCode": "string", "organization": "string", "project": "string", "environment": "string", "targetUri": "sip:confctl-g-issuer.lobby@vdx5.vivox.com.", "receiveResults": true, "callbackUrl": "https://example.com", "eventType": "string", "playerReportEvents": [ { "reportType": [ "string" ], "reportReason": "string", "reportedPlayerId": "string", "reporterPlayerId": "string" } ], "customMetadata": {}, "players": [ { "playerId": "string", "displayName": "string" } ], "perspectiveTarget": "string"}
Add Player Report Event
Add Player Report Event
Authorizations
ServiceAccount (Safe Voice Processor (safevoice.screening.create))
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: Safe Voice Processor (safevoice.screening.create)
Request body for "{title}"
Media Type:
application/jsonThe player ID used to login to Vivox. Learn more about player IDs in our Developer Documentation.
The player ID used to login to Vivox. Learn more about player IDs in our Developer Documentation.
Code samples for "{title}":
Request example
curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Content-Type: application/json" \ -d '{ "reportType": [ "string" ], "reportReason": "string", "reportedPlayerId": "string", "reporterPlayerId": "string"}' \ "https://services.api.unity.com/safevoice/v1/organizations/{organizationId}/projects/{projectId}/environments/{environmentId}/screenings/{screeningId}/player-report-events"
Response example
{ "type": "string", "title": "Bad Request", "status": 400, "code": 0, "detail": "Failed to parse request body. Error: Unexpected end of JSON input", "instance": "string", "details": [ {} ], "requestId": "aad109f8-033f-4a24-8b77-5032eb3a6158"}
Retrieve a Safe Voice Screening result
Retrieve a Safe Voice Screening result
Authorizations
ServiceAccount (Safe Voice Processor (safevoice.screening.get))
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: Safe Voice Processor (safevoice.screening.get)
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/safevoice/v1/organizations/{organizationId}/projects/{projectId}/environments/{environmentId}/screenings/{screeningId}/result"
Response example
{ "id": "string", "metadata": { "eventType": "string", "playerReportEvents": [ { "reportType": [ "string" ], "reportReason": "string", "reportedPlayerId": "string", "reporterPlayerId": "string" } ] }, "result": { "players": [ { "id": "string", "displayName": "string", "events": [ { "sourcePlayerId": null, "action": null, "targetPlayerId": null, "timestamp": null } ], "characteristics": [ { "category": null, "value": null, "confidence": null } ], "languages": [ { "language": null, "languageRatio": null } ], "scores": [ { "id": null, "class": null, "value": null } ], "segments": [ "string" ], "trackId": "string", "url": "string", "waveform": [ [ null ] ], "isAudioDeleted": "string" } ], "overallRiskScore": { "value": 0.45, "class": "high" }, "scores": [ { "id": "string", "value": 0.45, "class": "high" } ], "moments": [ { "id": "string", "playerId": "string", "timestampStart": 0, "timestampEnd": 0, "type": "toxicity_detection", "score": 0.45, "tags": [ { "name": null, "category": null, "attributes": null } ], "transcription": "string" } ] }, "createdAt": "string", "resolvedAt": "string", "samplingInterval": "string", "duration": 0, "status": "LIVE"}
Create a Data Deletion Request
Create a Data Deletion Request
Authorizations
ServiceAccount (Safe Voice Data Deletion (safevoice.deletion.create))
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: Safe Voice Data Deletion (safevoice.deletion.create)
Request body for "{title}"
Media Type:
application/jsonThe player ID used to login to Vivox. Learn more about player IDs in our Developer Documentation.
Enter the full url of where your server is listening to receive error and status callbacks.
Safe Voice will invoke this endpoint once the deletion request is complete, or if there was an error.
Safe Voice will send a POST request with the same body as a GET /data-deletion/{deletionId} would return.
Specifying a callbackKey together with the callbackUrl is required.
If you would like to validate that the callbacks sent to your callback endpoint are from Safe Voice,
you can specify this parameter.
We will sent the content of this field in the 'Authorization' header in the callback request as a basic auth header.
This means the header will look like this: "Authorization": "callbackKey"
Code samples for "{title}":
Request example
curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Content-Type: application/json" \ -d '{ "playerId": "string", "callbackUrl": "https://example.com", "callbackKey": "string"}' \ "https://services.api.unity.com/safevoice/v1/organizations/{organizationId}/projects/{projectId}/environments/{environmentId}/data-deletion"
Response example
{ "id": "string", "createdAt": "string", "updatedAt": "string", "status": "NEW", "reason": "USER", "organization": "string", "project": "string", "environment": "string", "audioSessionResults": [ "string" ], "tracks": [ "string" ], "moments": [ "string" ], "playerId": "string", "callbackUrl": "https://example.com"}
Retrieve a Data Deletion Request
Retrieve a Data Deletion Request
Authorizations
ServiceAccount (Safe Voice Data Deletion (safevoice.deletion.get))
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: Safe Voice Data Deletion (safevoice.deletion.get)
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/safevoice/v1/organizations/{organizationId}/projects/{projectId}/environments/{environmentId}/data-deletion/{deletionId}"
Response example
{ "id": "string", "createdAt": "string", "updatedAt": "string", "status": "NEW", "reason": "USER", "organization": "string", "project": "string", "environment": "string", "audioSessionResults": [ "string" ], "tracks": [ "string" ], "moments": [ "string" ], "playerId": "string", "callbackUrl": "https://example.com"}
Create a Data Retrieval Request
Create a Data Retrieval Request
Authorizations
ServiceAccount (Safe Voice Data Retrieval (safevoice.retrieval.create))
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: Safe Voice Data Retrieval (safevoice.retrieval.create)
Request body for "{title}"
Media Type:
application/jsonIf you would like to validate that the callbacks sent to your callback endpoint are from Safe Voice,
you can specify this parameter.
We will sent the content of this field in the 'Authorization' header in the callback request as a basic auth header.
This means the header will look like this: "Authorization": "callbackKey"
Enter the full url of where your server is listening to receive error and status callbacks.
Safe Voice will invoke this endpoint once the data retrieval request is complete, or if there was an error.
Safe Voice will send a POST request with the same body as a GET /data-retrieval/{dataRetrievalId} would return.
Specifying a callbackKey together with the callbackUrl is required.
Code samples for "{title}":
Request example
curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Content-Type: application/json" \ -d '{ "callbackKey": "string", "callbackUrl": "https://example.com"}' \ "https://services.api.unity.com/safevoice/v1/organizations/{organizationId}/projects/{projectId}/environments/{environmentId}/players/{playerId}/data-retrieval"
Response example
{ "id": "string", "organization": "string", "project": "string", "environment": "string", "playerId": "string", "createdAt": "string", "updatedAt": "string", "status": "NEW", "errorCode": "string", "errorDescription": "string", "callbackUrl": "https://example.com", "transcriptionsUrl": "https://example.com"}
Get a Data Retrieval Request
Get a Data Retrieval Request
Authorizations
ServiceAccount (Safe Voice Data Retrieval (safevoice.retrieval.get))
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: Safe Voice Data Retrieval (safevoice.retrieval.get)
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/safevoice/v1/organizations/{organizationId}/projects/{projectId}/environments/{environmentId}/players/{playerId}/data-retrieval/{dataRetrievalId}"
Response example
{ "id": "string", "organization": "string", "project": "string", "environment": "string", "playerId": "string", "createdAt": "string", "updatedAt": "string", "status": "NEW", "errorCode": "string", "errorDescription": "string", "callbackUrl": "https://example.com", "transcriptionsUrl": "https://example.com"}