---
title: "Start pairing by code or QR"
method: POST
path: "/api/v1/slots/{slotId}/pairing"
tags: ["WhatsApp slots"]
---

# Start pairing by code or QR

`POST /api/v1/slots/{slotId}/pairing`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/slots/{slotId}/pairing`
- Auth: HTTP bearer

## Path parameters

- `slotId` integer, required

## Request body

- PairingInputBody
  - `mode` 'code' | 'qr', required
  - `phone` string: E.164 phone, required for mode code

## Response `202`

Accepted

- PairingBody
  - `code` string, required: Pairing code to type on the phone, empty when none
  - `expires_at` string, date-time, nullable, required
  - `mode` string, required: code, qr or empty before the first pairing
  - `phone` string, required
  - `qr` string, required: Raw QR payload to render, empty when none
  - `state` 'new' | 'pairing' | 'connected' | 'disconnected' | 'logged_out' | 'banned', required

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
