Skip to main content
GET
/
v1
/
simulation
/
job
/
lookup
JavaScript
import Roark from '@roarkanalytics/sdk';

const client = new Roark({
  bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});

const response = await client.simulation.lookupSimulationJob({ roarkPhoneNumber: {} });

console.log(response.data);
{
  "data": {
    "simulationJobId": "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",
    "status": "COMPLETED",
    "processingStatus": "PROCESSED",
    "callId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "roarkPhoneNumber": "+15551234567",
    "persona": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Sarah Johnson - Anxious Patient",
      "language": "EN",
      "secondaryLanguage": null,
      "accent": "US",
      "gender": "FEMALE",
      "backgroundNoise": "OFFICE",
      "speechPace": "NORMAL",
      "speechClarity": "CLEAR",
      "hasDisfluencies": false,
      "baseEmotion": "FRUSTRATED",
      "intentClarity": "CLEAR",
      "confirmationStyle": "EXPLICIT",
      "memoryReliability": "HIGH",
      "backstoryPrompt": "A busy professional calling during lunch break",
      "properties": {
        "age": 35,
        "zipCode": "94105"
      },
      "createdAt": "2025-01-10T12:00:00.000Z",
      "updatedAt": "2025-01-10T12:00:00.000Z"
    },
    "scenario": {
      "id": "f8e7d6c5-b4a3-9281-7069-5f4e3d2c1b0a",
      "description": "Patient calling to schedule an urgent dental appointment due to severe tooth pain"
    },
    "agentEndpoint": {
      "id": "3c2b1a09-8f7e-6d5c-4b3a-291807060504",
      "name": "PHONE",
      "phoneNumber": "+15555551234",
      "type": "PHONE"
    },
    "createdAt": "2025-01-15T14:23:45.123Z",
    "startedAt": "2025-01-15T14:24:15.456Z",
    "completedAt": "2025-01-15T14:28:32.789Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

Response

Successfully found simulation job

data
object
required

Simulation job with related entities

Example:
{
  "simulationJobId": "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",
  "status": "COMPLETED",
  "processingStatus": "PROCESSED",
  "callId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "roarkPhoneNumber": "+15551234567",
  "persona": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Sarah Johnson - Anxious Patient",
    "language": "EN",
    "secondaryLanguage": null,
    "accent": "US",
    "gender": "FEMALE",
    "backgroundNoise": "OFFICE",
    "speechPace": "NORMAL",
    "speechClarity": "CLEAR",
    "hasDisfluencies": false,
    "baseEmotion": "FRUSTRATED",
    "intentClarity": "CLEAR",
    "confirmationStyle": "EXPLICIT",
    "memoryReliability": "HIGH",
    "backstoryPrompt": "A busy professional calling during lunch break",
    "properties": { "age": 35, "zipCode": "94105" },
    "createdAt": "2025-01-10T12:00:00.000Z",
    "updatedAt": "2025-01-10T12:00:00.000Z"
  },
  "scenario": {
    "id": "f8e7d6c5-b4a3-9281-7069-5f4e3d2c1b0a",
    "description": "Patient calling to schedule an urgent dental appointment due to severe tooth pain"
  },
  "agentEndpoint": {
    "id": "3c2b1a09-8f7e-6d5c-4b3a-291807060504",
    "name": "PHONE",
    "phoneNumber": "+15555551234",
    "type": "PHONE"
  },
  "createdAt": "2025-01-15T14:23:45.123Z",
  "startedAt": "2025-01-15T14:24:15.456Z",
  "completedAt": "2025-01-15T14:28:32.789Z"
}