Guides
Account and numbers

Phone numbers

Getting, registering and verifying numbers, two-step verification PIN, business profile, user blocking and quality events.

List and get

bash
curl --url 'https://whatsapp.mimicr.dev/v24.0/424361664134261?fields=display_phone_number,verified_name,quality_rating,messaging_limit_tier,status' \
  --header 'Authorization: Bearer <token>'
json
{
  "verified_name": "Loja Aurora",
  "display_phone_number": "+55 55 3270-4202",
  "quality_rating": "GREEN",
  "messaging_limit_tier": "TIER_10K",
  "status": "CONNECTED",
  "id": "424361664134261"
}

List phone numbers returns every number of the WABA. messaging_limit_tier comes from messaging_limit in the sandbox settings and throughput.level is HIGH when throughput_mps is above 80.

Registration and two-step verification PIN

The sandbox number starts registered. To test 133010 without the Graph API: PUT /v1/whatsapp/{slug}/phone-numbers/{id} with {"registered": false}.

Verification code

Request a verification code with {"code_method": "SMS", "language": "pt_BR"} (or VOICE). In Mimicr, no SMS goes out: the code shows on the phone number card in the console. Confirm it with Verify the code; a wrong code answers 136025.

Business profile

bash
curl --request POST \
  --url https://whatsapp.mimicr.dev/v24.0/424361664134261/whatsapp_business_profile \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "messaging_product": "whatsapp",
    "about": "Entregamos gás em 30 minutos",
    "address": "Av. Paulista, 1000",
    "email": "contato@loja.example.com",
    "vertical": "RETAIL",
    "websites": ["https://loja.example.com"]
  }'

about has at most 139 characters. Get the business profile returns {"data": [{...}]}.

Block users

bash
curl --request POST \
  --url https://whatsapp.mimicr.dev/v24.0/424361664134261/block_users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "messaging_product": "whatsapp", "block_users": [{ "user": "5511987654321" }, { "user": "5511900000000" }] }'
json
{
  "messaging_product": "whatsapp",
  "block_users": {
    "added_users": [{ "input": "5511987654321", "wa_id": "5511987654321" }],
    "failed_users": [{ "input": "5511900000000", "errors": [{ "message": "Invalid user", "code": 139100, "error_data": { "details": "User has not messaged the business in the last 24 hours." } }] }]
  }
}

Messages from a blocked user produce no webhook. Unblock with DELETE on the same path.

Quality and account events

Meta reports quality and account changes by webhook. In Mimicr, fire them whenever you want:

bash
curl --request POST \
  --url https://api.mimicr.dev/v1/whatsapp/docs/webhooks/emit \
  --header 'Authorization: Bearer mk_...' \
  --header 'Content-Type: application/json' \
  --data '{ "field": "phone_number_quality_update", "event": "FLAGGED" }'

phone_number_quality_update takes FLAGGED, UNFLAGGED, DOWNGRADE and UPGRADE and changes the number's quality_rating. account_update takes VERIFIED_ACCOUNT, DISABLED_UPDATE, ACCOUNT_VIOLATION, ACCOUNT_RESTRICTION, ACCOUNT_DELETED, PARTNER_ADDED and PARTNER_REMOVED.