Skip to main content
GET
/
whatsapp
/
campaigns
/
recipient-payload
Get recipient JSON schema for a template
curl --request GET \
  --url https://api.otpiq.com/api/whatsapp/campaigns/recipient-payload \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "template": {
      "id": "<string>",
      "name": "<string>",
      "language": "<string>"
    },
    "fields": [
      {
        "key": "1",
        "label": "Body {{1}}",
        "required": true,
        "example": "<string>",
        "templateParametersPath": "templateParameters.body.1"
      }
    ],
    "exampleRecipient": {
      "phoneNumber": "9647712345678",
      "templateParameters": {
        "body": {},
        "header": {},
        "buttons": {}
      }
    }
  }
}
Use this endpoint to understand the exact shape of the templateParameters required for your chosen template before attaching recipients.

Authorizations

Authorization
string
header
required

Project API key (sk_live… or sk_dev…). Send it as Authorization: Bearer <api_key>.

Query Parameters

templateId
string

MongoDB template id from GET /api/whatsapp/resources

Pattern: ^[a-fA-F0-9]{24}$
_id
string

Campaign MongoDB id (uses the campaign's linked template)

Pattern: ^[a-fA-F0-9]{24}$
campaignId
string

Alias for _id (campaign MongoDB id)

Pattern: ^[a-fA-F0-9]{24}$

Response

Payload schema and examples

success
enum<boolean>
required
Available options:
true
data
object
required