Guides
Phone numbers
Getting, registering and verifying numbers, two-step verification PIN, business profile, user blocking and quality events.
List and get
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>'
{
"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
- Set two-step verification PIN:
POST /{phone-number-id}with{"pin": "123456"}(six digits). - Register a phone number:
{"messaging_product": "whatsapp", "pin": "123456"}. A PIN different from the one set answers133005. - Deregister a phone number: from then on every send answers
133010, until you register again.
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
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
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" }] }'{
"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:
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.