API
Uhuu API is available at https://api.uhuu.io/v1
. Responses are sent as JSON
.
Schema
API documentation is online: Uhuu - OpenAPI / Swagger or check your API token with Interactive API Demo.
Alternatively you can download spec files and postman collection to test with your network tools.
Postman app is available for download on their website.
Authorization
Create API Tokens
You can issue API tokens to authenticate API requests. Browse your team settings and click on the API Tokens at the navigation tabs and create one. Go to team tokens on dashboard.
Include API Tokens
To authenticate requests, pass your application’s API Token via the HTTP Authorization
header as a Bearer
token:
Authorization: Bearer <token>
Endpoint routes
Following REST API endpoints are available.
Required Permissions
All GET
requests need read
permission and POST
request need create
permission.
Base API url: https://api.uhuu.io/v1
.
Get token team info
GET /team
Get team's workspaces
GET /workspaces
Get workspace information including templates
GET /workspaces/[WORKSPACE_ID]
Get template information.
GET /templates/[TEMPLATE_ID]
Create document with template
POST /templates/[TEMPLATE_ID]
GET document information and rendering status
POST /documents/[DOCUMENT_ID]
HTTP Verbs
We use common HTTP verbs appropriate to each action.
Verb | Description |
---|---|
GET | Retrieving resources. |
POST | Creating resources. |
PUT | Updating resources. |
DELETE | Deleting resources. |
Error messages
If an error occurs, whether on the server or client side, the error message(s) will be returned in message. For example:
405 -> Not Allowed error
{
"message": "The POST method is not supported for this route. Supported methods: GET, HEAD.",
"status": 405
}
We use conventional HTTP response codes to indicate the success or failure of an API request.
In general, codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.). Codes in the 5xx range indicate an error with Uhuu's servers.
Common Status Codes | Description |
---|---|
200 - OK | Everything worked as expected. |
400 - Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 - Unauthorized | Invalid Access Token. |
403 - Forbidden | Missing permissions to perform request. |
404 - Not Found | The requested resource doesn’t exist. |
500, 503 | Something went wrong on our end. |