Watsy
Getting startedQuickstart

Getting started

Quickstart

From a new account to your first successful verification, with a test key and at no cost.

  1. Create a project and a test key

    1. Sign up in the Watsy dashboard and create a project.
    2. Under API keys, create a key of type test.
    3. Copy it now: it is shown only once. It starts with wsy_test_.

    Keep the key in a server environment variable. Never put it in a mobile app, a web page or a public repository.

  2. Register a test number

    Under Test numbers, add your number. Test keys only send to these numbers, and the code is always zeros: 000000.

  3. Send your first code

    curl -X POST https://watsy.me/v1/verify \
      -H "Authorization: Bearer $WATSY_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: quickstart-1" \
      -d '{
        "phone": "07701234567"
      }'

    The 201 response carries the verification id and "mode": "test". Keep the id for the next step.

  4. Check the code

    curl -X POST https://watsy.me/v1/verify/5d3c1f0e-7a1b-4c55-9a7e-2f1d6b0c9e11/check \
      -H "Authorization: Bearer $WATSY_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: quickstart-1-check" \
      -d '{
        "code": "000000"
      }'

    If you get "valid": true, the integration works. Decide on that field only.

  5. Go live

    Top up your balance, create a live key (wsy_live_) and swap it in for the test key. Nothing else changes in your code.

Next steps