Responses and Errors

The UseForms API uses conventional HTTP response codes to indicate success or failure of a request.

HTTP Status Code Summary

Success Responses

Success responses usually come in the below format

{
   "success": true,
   "data": [
      {
         "id": "6022518865701d3d05b48c71",
         "name": "Sample Object"
      }
   ],
   "_metadata" {
      "total": 5,
      "perPage": 1,
      "pageCount": 5,
      "pageLinks": {
         "current": "https://api.developer.useforms.com/v1/forms?perPage=1&page=1",
         "next": "https://api.developer.useforms.com/v1/forms?perPage=1&page=2",
         "previous": null
      }
   }
}
  • success: A boolean value that is always true if the request went successfully

  • data: Response data. This will be either be an array of objects (for endpoints that return multiple records) or an object (for endpoints that return a single record).

  • _metadata: Response metadata. This is only available for endpoints that return multiple records. It contains the total count of records, the number of records returned per page, the total number of pages, and links to the previous and next pages.

Error Responses

Error responses usually come in the below format

{
   "success": false,
   "error": "Error message"   
}
  • success: A boolean value that is always false if the request failed.

  • error: A description of what caused the request to fail

Last updated