Create IVR Mapping Job
createMappingCreate an IVR mapping job for a phone number: its name, number, config and tags. This saves the job and nothing else: it places no call and starts no run, and the job comes back with status="idle" and no currentRun. A run is what calls the number, navigates the menu by DTMF and/or voice, transcribes the audio and analyses it with AI to discover the branches (typically 2-15 minutes, depending on tree depth). Start a run with startMapping. Check listMappings first: if a job for this number exists, run that one instead of saving another. Use when: the user asks to map a number.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"phoneNumber": "<phoneNumber>",
"config": "<config>"
},
"name": "createMapping"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Job display name. | |
| tags | No | Up to 10 lowercase kebab-case labels for filtering and organisation. Normalised server-side (trimmed, lowercased, de-duplicated). | |
| config | Yes | ||
| profileId | No | Data profile used to supply scripted input values during the run. A profile id is `profile_` followed by base-36 characters, not a UUID. | |
| phoneNumber | Yes | Target phone number in E.164 format. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique mapping-job identifier. | |
| name | Yes | Job display name. | |
| tags | No | String labels for filtering and grouping. Lowercase alphanumeric + hyphens. | |
| error | No | Error message if the job failed. | |
| stats | No | Aggregate statistics for the current run, populated while the job executes. | |
| config | Yes | Per-job configuration knobs that govern exploration shape and call orchestration. Sensible defaults are applied server-side when fields are omitted on create. | |
| status | Yes | On getMappingJob, the status of the run the response describes (a copy of `currentRun.status`, with `queued` shown as `idle`), or `idle` when the job has never run. createMappingJob returns `idle`: creating a job places no call and starts no run (POST /mapping/{id}/start does). | |
| userId | Yes | User who created the job. | |
| createdAt | Yes | Creation timestamp. | |
| runNumber | No | Flat-merged run number from the active or requested (via `?version=`) run. Phase 04 D-09 — preserved at top level for frontend back-compat alongside the new nested `currentRun` object. | |
| startedAt | No | Most-recent run start timestamp. | |
| updatedAt | Yes | Last update timestamp. | |
| currentRun | No | Nested run summary on single-job responses (Phase 04 D-09 / D-10). `currentRun.status` is the run's own status (`queued`, `running`, `completed`, `failed` or `limited`); read it to decide whether the discovery is done. The flat `status` on the job response is a copy of it, except that `queued` shows as `idle`. The field name stays `currentRun` even when `?version=N` is supplied — the wrapper describes the run this response describes (active by default, or the historical run identified by `version`). | |
| completedAt | No | Most-recent run completion timestamp. | |
| limitReason | No | Reason the run stopped early (only present when `status` is `limited`). | |
| phoneNumber | Yes | Target phone number in E.164 format. | |
| workspaceId | Yes | Owning workspace. | |
| currentRunId | No | Identifier of the most-recent run (absent if never started). | |
| inFlightCount | No | Currently executing calls. |