> ## 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.

# Create Call Link

> Creates a reusable call link (audio or video) that anyone can open to join

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

## Description

Creates a reusable **shareable call link**, audio or video, that can be shared with anyone. Whoever opens the link can join the call, without needing to receive a call first. Use the `video` field to choose between an audio link (default) or a video link. The response returns the link's `token` and the full `url`, ready to share.

## Examples

### Audio link (default)

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

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

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

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

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

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

  func main() {
      body := strings.NewReader(`{}`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/call/link/"+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>

### Video link

`video: true` generates a video call link instead of audio.

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

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

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

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

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

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

  func main() {
      body := strings.NewReader(`{
          "video": true
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/call/link/"+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,
  "token":   "AbCdEfGhIjKlMnOp",
  "url":     "https://call.whatsapp.com/audio/AbCdEfGhIjKlMnOp",
  "video":   false
}
```

<Note>
  For `video: true`, the URL path segment changes to `/video/` (e.g., `https://call.whatsapp.com/video/<token>`). The link is reusable, it can be opened by multiple people, at different times, until it is revoked.
</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="video" type="boolean" default="false">
  When `true`, generates a **video** call link instead of audio.
</ParamField>

## Errors

| HTTP | Message                          |
| ---- | -------------------------------- |
| 400  | `Instance name is required`      |
| 400  | `Invalid request body: <detail>` |
| 404  | `instance not found`             |
| 500  | `<failure reason>`               |

Error envelope:

```json theme={null}
{
  "success": false,
  "error": { "message": "instance not found" }
}
```
