Responses and Errors
The UseForms API uses conventional HTTP response codes to indicate success or failure of a request.
HTTP Status Code Summary
200 - OK
Successful response
400 - Bad Request
The request was not accepted. This is usually due to an invalid input parameter.
401 - Unauthorized
No/invalid API key was provided
404 - Not Found
The request resource does not exist. This is usually due to a URL error or an invalid object id.
500 - Internal Server Error.
Something went wrong on UseForms' end. Please contact support
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 alwaystrue
if the request went successfullydata
: 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 alwaysfalse
if the request failed.error
: A description of what caused the request to fail
Last updated
Was this helpful?