Skip to content
Navigation

Check a code

Checks the code the user entered against a verification. A wrong, expired or already-used code still returns 200: check verify_success, and verify_error for the reason.

POST
https://app.touchsms.com.au/api/v3/verify/{verify}/verify

Authorization

  • basicAuth
    HTTP
    required

Path parameters

  • verify
    string
    required

    Verification ID returned when it was created.

    format: uuid

Request body JSON required

  • code
    string
    required

    Code entered by the user.

Returns

200

The verification and the result of the check. A failed check still returns 200; use verify_success.

JSON
  • data
    optional
    object
    • id
      optional
      string
      format: uuid
    • status
      optional
      created
      or
      sent
      or
      expired
      or
      failed
      or
      verified
      or
      cancelled
    • type
      optional
      sms
      or
      email
    • destination
      optional
      string
    • source
      optional
      string
    • metadata
      optional
      object | null
    • template
      optional
      string
    • expires_at
      optional
      string
      format: date-time
    • created_at
      optional
      string
      format: date-time
  • verify_success
    optional
    boolean

    Whether the code was accepted.

  • verify_error
    optional
    string | null

    Why the check failed, for example Provided code does not match verify, Verify expired before check request, Verify cancelled before check request or Verify already used.

401

Missing, malformed or invalid API credentials.
JSON
  • message
    string
    required

403

The resource exists but does not belong to you, or you lack permission.
JSON
  • message
    string
    required

404

The resource does not exist.
JSON
  • message
    string
    required

422

The request failed validation. errors lists the messages for each invalid field.
JSON
  • message
    optional
    string
  • errors
    optional
    map of
    array<string>

Type to search…

↑↓ navigate↵ selectEsc close