Watsy
Verification & messagesCancel a verification

Verification & messages

Cancel a verification

Closes an open verification so its code is no longer accepted, e.g. before resending.

POSThttps://watsy.me/v1/verify/{id}/cancel
curl -X POST https://watsy.me/v1/verify/5d3c1f0e-7a1b-4c55-9a7e-2f1d6b0c9e11/cancel \
  -H "Authorization: Bearer $WATSY_KEY"
{
  "id": "5d3c1f0e-7a1b-4c55-9a7e-2f1d6b0c9e11",
  "object": "verification",
  "mode": "live",
  "phone": "+9647701234567",
  "status": "canceled",
  "channel": "telegram",
  "channels": [
    "whatsapp",
    "telegram",
    "sms"
  ],
  "attempts": 0,
  "max_attempts": 5,
  "attempts_remaining": 5,
  "locale": "ar",
  "metadata": {
    "user_id": 8841
  },
  "expires_at": "2026-10-28T10:05:00.000Z",
  "verified_at": null,
  "created_at": "2026-10-28T10:00:00.000Z"
}

Authorization

  • Authorizationstring (header)required

    Bearer followed by your project key: wsy_live_… or wsy_test_….

Headers

  • Idempotency-Keystring

    1 to 255 characters. Makes retries safe for 24 hours. See Idempotency.

  • X-Request-Idstring

    Optional, 8 to 64 characters. Echoed back; generated when missing.

Path parameters

  • idstring (uuid)required

    The verification id returned by POST /v1/verify.

Response (200)

application/json
  • idstringrequired

    Verification id (UUID).

  • objectstringrequired

    Always verification.

  • modestringrequired

    Mode of the key that created it.

    Values:livetest

  • phonestringrequired

    The normalized E.164 number.

  • statusstringrequired

    Lifecycle state. See the status table.

    Values:pendingsentverifiedfailedexpiredcanceled

  • channelstring | nullrequired

    The channel last tried, or the one that delivered.

  • channelsstring[]required

    The requested channel chain, in order.

  • attemptsintegerrequired

    Checks made so far.

  • max_attemptsintegerrequired

    Check limit from the project settings (default 5).

  • attempts_remainingintegerrequired

    Checks left.

  • localestringrequired

    Message language.

    Values:aren

  • metadataobjectrequired

    Your metadata as sent, or {}.

  • expires_atstringrequired

    When the code expires.

  • verified_atstring | nullrequired

    When it was verified.

  • created_atstringrequired

    Creation time.

  • No body, or {}. Any field returns 400 validation_failed.
  • Only open verifications (pending, sent) are canceled. A closed one is returned unchanged with 200.
  • There is no refund, because the code was already sent. This response has no messages or price_milli.