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

# Fake Call

> Rings the recipient's phone for a few seconds then hangs up automatically (no audio)

**Auth:** `TokenAccount` or `TokenInstance` • **Rate-limit:** `Global` (100/min) • **Idempotent:** no

## Description

Starts a voice call that **rings the recipient's phone for a few seconds and hangs up on its own**, no audio, no media connection. Useful to grab attention, validate a number, or for "ring-and-drop" flows. The `duration` field controls how many seconds the call rings before the automatic hang-up: default **8 seconds**, allowed range **1 to 60**.

## Examples

### Simple fake call

Uses the default duration (8 seconds).

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/call/fake/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "number": "5511999999999"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/call/fake/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      number: "5511999999999"
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/call/fake/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "number": "5511999999999"
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "number": "5511999999999"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/call/fake/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

### Ring for a specific duration

`duration: 15` makes the call ring for 15 seconds before hanging up.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://ryzeapi.cloud/api/call/fake/$Instance_Name" \
    -H "token: $Token_Instance" \
    -H "Content-Type: application/json" \
    -d '{
      "number":   "5511999999999",
      "duration": 15
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch(`https://ryzeapi.cloud/api/call/fake/${process.env.Instance_Name}`, {
    method: "POST",
    headers: {
      "token":        process.env.Token_Instance,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      number:   "5511999999999",
      duration: 15
    })
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.post(
      f"https://ryzeapi.cloud/api/call/fake/{os.environ['Instance_Name']}",
      headers={
          "token":        os.environ["Token_Instance"],
          "Content-Type": "application/json"
      },
      json={
          "number":   "5511999999999",
          "duration": 15
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
      "strings"
  )

  func main() {
      body := strings.NewReader(`{
          "number":   "5511999999999",
          "duration": 15
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/call/fake/"+os.Getenv("Instance_Name"), body)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      req.Header.Set("Content-Type", "application/json")
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

```json 200 OK theme={null}
{
  "success":  true,
  "message":  "Call placed successfully",
  "callId":   "3EB08FCF27E532F1D3D3",
  "number":   "5511999999999",
  "duration": 8
}
```

<Note>
  The call is ended automatically by the server after `duration` seconds. There is no audio stream on this call.
</Note>

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name (e.g., `$Instance_Name`).
</ParamField>

## Headers

<ParamField header="token" type="string" required>
  `TokenAccount` or `TokenInstance`.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Request body

<ParamField body="number" type="string" required>
  Destination: phone (`5511999999999`) or JID (`@s.whatsapp.net`).
</ParamField>

<ParamField body="duration" type="int" default="8">
  Seconds the call rings before hanging up automatically. Allowed range: **1 to 60**. Omitted or `0` uses the default `8`.
</ParamField>

## Errors

| HTTP | Message                                     |
| ---- | ------------------------------------------- |
| 400  | `Instance name is required`                 |
| 400  | `Invalid request body: <detail>`            |
| 400  | `Number is required`                        |
| 400  | `Duration must be between 1 and 60 seconds` |
| 404  | `instance not found`                        |
| 500  | `<failure reason>`                          |

Error envelope:

```json theme={null}
{
  "success": false,
  "error": { "message": "Duration must be between 1 and 60 seconds" }
}
```
