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

# Preview Call Link

> Looks up a call link's metadata without joining the call

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

## Description

Looks up the **metadata of a call link** without joining the call. Useful to show, before joining, who created the link and whether approval is required to join. Accepts either the bare token or the full link URL in the `link` field.

## Examples

### Preview by full URL

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

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

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

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

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

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

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

### Preview by token only

The `link` field also accepts the bare token, without the rest of the URL.

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

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

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

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

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

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

  func main() {
      body := strings.NewReader(`{
          "link": "AbCdEfGhIjKlMnOp"
      }`)
      req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/call/link/"+os.Getenv("Instance_Name")+"/preview", 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",
  "video":              false,
  "approvalRequired":   false,
  "isAdmin":            false,
  "creator":            "5511999999999@s.whatsapp.net",
  "creatorPhoneNumber": "5511999999999"
}
```

<Note>
  `approvalRequired` indicates whether the link has a waiting room (participants must be approved before joining). `isAdmin` indicates whether this account is an admin of the link. `creator` and `creatorPhoneNumber` identify who created the link. This lookup does not join the call or change the link.
</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="link" type="string" required>
  The link's token or the full call link URL (e.g., `https://call.whatsapp.com/audio/<token>`).
</ParamField>

<ParamField body="video" type="boolean">
  Optional hint indicating whether the link is a video link. Usually not needed, since the type is already returned in the response.
</ParamField>

## Errors

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

Error envelope:

```json theme={null}
{
  "success": false,
  "error": { "message": "Link is required" }
}
```
