---
title: "Set the call plan of a number"
method: PUT
path: "/numbers/{id}/call-plan"
tags: ["Call plans"]
---

# Set the call plan of a number

`PUT /numbers/{id}/call-plan`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/numbers/{id}/call-plan`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `numbers:write`)

Replaces the call plan of one number. A plan with an ai_agent node needs the assistant (PUT /assistant; voice AI is always included) and updates the assistant with this plan. Send If-Match with the ETag from GET to avoid overwriting a newer plan.

## Path parameters

- `id` string, uuid, required

## Headers

- `If-Match` string

## Request body

- CallPlan: A call plan: a small graph. entry is the first node; every node points to the next by id. At most 50 nodes, and every node must be reachable from entry. Field names inside the plan are camelCase: the plan is stored exactly as you send it.
  - `entry` string, required: The id of the first node.
  - `nodes` object, required: The nodes by id. The key must be the same as the node's id.

## Response `200`

The call plan as saved, with its new version.

- CallPlanSaved
  - `number_id` string, uuid, required
  - `version` integer, required: The version of the number's own plan; 0 when the number has no own plan yet. Also in the ETag header.
  - `plan` CallPlan, required: A call plan: a small graph. entry is the first node; every node points to the next by id. At most 50 nodes, and every node must be reachable from entry. Field names inside the plan are camelCase: the plan is stored exactly as you send it.
    - `entry` string, required: The id of the first node.
    - `nodes` object, required: The nodes by id. The key must be the same as the node's id.
  - `assistant_sync` 'synced' | 'failed' | 'not_needed' | 'skipped_test_mode', required: Whether the assistant was updated with this plan. not_needed for a plan without ai_agent; skipped_test_mode with a test key.

## Other responses

- `400`: Bad Request: invalid_parameter, invalid_json.
- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `402`: Payment Required: voice_ai_not_enabled.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required.
- `404`: Not Found: not_found.
- `409`: Conflict: version_conflict.
- `412`: Precondition Failed: version_conflict.
- `422`: Unprocessable Content: team_targets_not_allowed, forward_target_not_allowed, validation_failed, assistant_not_configured.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `503`: Service Unavailable: service_unavailable.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
