> ## Documentation Index
> Fetch the complete documentation index at: https://docs.callkaro.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Schedule Call

<Note>
  This endpoint deletes a scheduled call for a specific agent and phone number combination. Once deleted, the scheduled call will not be executed.
</Note>

## Quick Example

```bash theme={null}
curl -X POST "https://api.callkaro.ai/call/delete-schedule-call?agent_id=YOUR_AGENT_ID" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -d '{
    "to_number": "919876543210"
  }'
```

## Use Cases

* **Cancel follow-ups**: Remove scheduled follow-up calls when customers request to be removed
* **Reschedule calls**: Delete existing scheduled calls before creating new ones at different times
* **Prevent duplicates**: Clean up duplicate scheduled calls before scheduling new ones
* **Campaign management**: Remove specific phone numbers from scheduled campaign calls

## Parameters

<ParamField query="agent_id" type="string" required>
  The agent ID for which to delete scheduled calls
</ParamField>

<ParamField body="to_number" type="string" required>
  The phone number for which to delete the scheduled call. Can be in international format with or without '+' prefix.
</ParamField>

## Common Scenarios

<AccordionGroup>
  <Accordion title="Delete scheduled call with Indian number">
    ```json theme={null}
    {
      "to_number": "919876543210"
    }
    ```

    The number will be processed and scheduled call deleted for this phone number.
  </Accordion>

  <Accordion title="Using form data instead of JSON">
    ```bash theme={null}
    curl -X POST "https://api.callkaro.ai/call/delete-schedule-call?agent_id=YOUR_AGENT_ID" \
      -H "X-API-KEY: YOUR_API_KEY" \
      -F "to_number=919876543210"
    ```

    Form data is also supported as an alternative to JSON body.
  </Accordion>
</AccordionGroup>

## Response

### Success (200 OK)

```json theme={null}
{
  "status": "success",
  "message": "Scheduled call deleted successfully"
}
```

### Errors

<ResponseField name="400" type="Bad Request">
  Missing required parameters

  ```json theme={null}
  {"status": "error", "message": "Missing agent_id in request query"}
  ```

  or

  ```json theme={null}
  {"status": "error", "message": "Missing to_number in request"}
  ```
</ResponseField>

<ResponseField name="403" type="Forbidden">
  Invalid or missing API key

  ```json theme={null}
  {"status": "error", "message": "Missing X-API-KEY in headers"}
  ```
</ResponseField>

<ResponseField name="500" type="Server Error">
  Internal server error - contact support

  ```json theme={null}
  {"status": "error", "message": "Internal server error"}
  ```
</ResponseField>

## Best Practices

<Tip>
  * Always verify the agent\_id exists before attempting to delete scheduled calls
  * Use this endpoint as part of your workflow when rescheduling calls to avoid duplicates
  * Consider implementing retry logic for network failures
  * Log successful deletions for audit purposes
</Tip>
