Help topics

Verify a hashed value through the API

Check whether a value matches a Hashed field with the verify endpoint. The response says only whether it matches. It never returns the stored value.

Before you start

Verify a value

  1. Send a POST request to /wp-json/morphic/v1/items/<model>/<entry-id>/verify. Replace <model> with the model's name and <entry-id> with the entry's ID.
  2. Send a JSON body with the hashed field's name in field and the value to check in value. For example: {"field": "pin", "value": "4821"}.
  3. Read the response.

Result: The response is {"match": true} when the value matches the stored hash, and {"match": false} when it does not.

If the request fails

  • If the field is not a Hashed field, the response is HTTP 422 with the message <field> is not a hashed secret, for example pin is not a hashed secret, and the reason not_hash. Check the field name and the field's Secret option.
  • If the value is longer than 4096 characters, the response says value is too long.
  • If you send more than 10 verify requests in 5 minutes for the same entry and caller, the response says too many attempts; try again in a few minutes. Each request restarts the 5-minute window. Requests that are blocked do not extend it.

For the full list of messages, see Sealed and hashed fields reference.