DocumentApprovals - Huddle/huddle-apis GitHub Wiki
Use this API to manage approval workflows on a document's current version: retrieve approval state, add or replace approvers, set an optional due date/message, and allow each assignee to complete or reject their own assignment.
This endpoint group is intended for integrations that need approval lifecycle control in one place without directly orchestrating lower-level Tasks APIs.
| Method | Path | Purpose | Details |
|---|---|---|---|
GET |
/approvalsbff/documents/123/approvals |
Get approval state for the document's current version. | Jump |
POST |
/approvalsbff/documents/123/approvals/request |
Create or upsert approval assignees/due date/message. | Jump |
POST |
/approvalsbff/documents/123/approvals/assignment |
Complete or reject the current caller's assignment. | Jump |
GET |
/approvalsbff/documentowners/123/approvals |
List open approvals created by a document owner with assignment detail. | Jump |
GET |
/approvalsbff/documentowners/123/approvals |
List open approvals created by a document owner with counts only. | Jump |
GET |
/approvalsbff/workspaces/555/approvals |
List open approvals across a workspace. | Jump |
GET /approvalsbff/documents/123/approvals HTTP/1.1
Accept: application/json
Authorization: Bearer <token>{
"links": [
{ "rel": "self", "href": "https://api.huddle.net/approvalsbff/documents/123/approvals" },
{ "rel": "parent", "href": "https://api.huddle.net/files/documents/123" },
{ "rel": "updateassignees", "href": "https://api.huddle.net/approvalsbff/documents/123/approvals/updateassignees" },
{ "rel": "approvalrequest", "href": "https://api.huddle.net/approvalsbff/documents/123/approvals/request" }
],
"status": "Open",
"dueDate": "Thu, 30 Nov 2017 00:00:00 GMT",
"requester": {
"name": "Bob",
"email": "[email protected]",
"rel": "requester",
"links": [{ "rel": "self", "href": "https://api.huddle.net/users/108" }]
},
"assignments": [
{
"actors": [
{
"name": "Jane",
"email": "[email protected]",
"rel": "assignee",
"links": [{ "rel": "self", "href": "https://api.huddle.net/users/456" }]
}
],
"status": "Open",
"created": "Wed, 29 Nov 2017 00:00:00 GMT",
"links": [
{ "rel": "self", "href": "https://api.huddle.net/users/456" },
{ "rel": "edit", "href": "https://api.huddle.net/approvalsbff/documents/123/approvals/assignment" }
]
}
]
}Notes:
- Assignment status values are
Open,Complete, andRejected. - Top-level
statusisOpenif any assignment is open,Rejectedif none are open and at least one is rejected, otherwiseComplete. -
dueDateis omitted when no due date exists.
Creates approvals if none exist for the current document version, otherwise updates due date/message/assignees.
POST /approvalsbff/documents/123/approvals/request HTTP/1.1
Content-Type: application/json
Authorization: Bearer <token>{
"assignees": [
{ "href": "https://api.huddle.net/users/456" },
{ "href": "https://api.huddle.net/users/789" }
],
"message": "Please review by Friday",
"dueDate": "Thu, 30 Nov 2017 00:00:00 GMT"
}200 OK (empty body).
Behavior:
- If
assigneesis empty ([]), the existing workflow is removed. -
assignees[].hrefmust resolve to valid user URIs. -
messageanddueDateare optional.
Updates the authenticated caller's own assignment status.
Use case: assignee actions from a "My approvals" UI where the current user chooses Approve or Reject on one document.
POST /approvalsbff/documents/123/approvals/assignment HTTP/1.1
Content-Type: application/json
Authorization: Bearer <token>{
"status": "complete"
}or
{
"status": "rejected"
}Returns the same JSON shape as GET /approvalsbff/documents/{documentId}/approvals with updated assignment/status values.
Validation:
- Supported values are
completeandrejected(case-insensitive). - If the caller has no open assignment on the document, the API returns
400.
Lists approvals created by a specific owner (ownerId) with per-assignment detail.
Use case: a manager dashboard showing all active approvals they requested, including who is still pending.
GET /approvalsbff/documentowners/123/approvals HTTP/1.1
Accept: application/json
Authorization: Bearer <token>{
"links": [
{ "rel": "self", "href": "https://api.huddle.net/approvalsbff/documentowners/123/approvals" }
],
"approvals": [
{
"dueDate": "Thu, 01 Jan 2026 00:00:00 GMT",
"assignments": [
{
"actor": {
"name": "Jane",
"email": "[email protected]",
"rel": "assignee",
"links": [{ "rel": "self", "href": "https://api.huddle.net/users/456" }]
},
"status": "Open"
},
{
"actor": {
"name": "Alex",
"email": "[email protected]",
"rel": "assignee",
"links": [{ "rel": "self", "href": "https://api.huddle.net/users/789" }]
},
"status": "Complete"
}
],
"document": {
"title": "Policy.docx",
"contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"extension": "docx",
"links": [{ "rel": "self", "href": "https://api.huddle.net/files/documents/20" }],
"workspace": { "links": [{ "rel": "self", "href": "https://api.huddle.net/workspaces/555" }] }
}
}
]
}Lists approvals created by an owner, but returns counts (openAssignments, completedAssignments) instead of detailed assignment actors.
Use case: lightweight list views where you only need progress badges and document metadata.
GET /approvalsbff/documentowners/123/approvals-slim HTTP/1.1
Accept: application/json
Authorization: Bearer <token>{
"links": [
{ "rel": "self", "href": "https://api.huddle.net/approvalsbff/documentowners/123/approvals" }
],
"approvals": [
{
"dueDate": "Thu, 01 Jan 2026 00:00:00 GMT",
"openAssignments": 2,
"completedAssignments": 1,
"document": {
"title": "Policy.docx",
"contentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"extension": "docx",
"links": [{ "rel": "self", "href": "https://api.huddle.net/files/documents/20" }],
"workspace": { "links": [{ "rel": "self", "href": "https://api.huddle.net/workspaces/555" }] }
}
}
]
}Lists open approvals within a workspace grouped by document.
Use case: workspace-level reporting widgets (for admins or coordinators) that need a single feed of outstanding approvals.
GET /approvalsbff/workspaces/555/approvals HTTP/1.1
Accept: application/json
Authorization: Bearer <token>{
"links": [
{ "rel": "self", "href": "https://api.huddle.net/approvalsbff/workspaces/555/approvals" }
],
"approvals": [
{
"dueDate": "Thu, 01 Jan 2026 00:00:00 GMT",
"assignments": [
{
"actor": {
"name": "Jane",
"email": "[email protected]",
"rel": "assignee",
"links": [{ "rel": "self", "href": "https://api.huddle.net/users/456" }]
},
"status": "Open"
}
],
"document": {
"title": "Q4 Plan.xlsx",
"contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"extension": "xlsx",
"links": [{ "rel": "self", "href": "https://api.huddle.net/files/documents/10" }],
"workspace": { "links": [{ "rel": "self", "href": "https://api.huddle.net/workspaces/555" }] }
}
}
]
}| Status | Meaning |
|---|---|
400 |
Invalid documentId, invalid request body, or invalid assignment transition. |
401 |
Unauthorized. |
403 |
Forbidden. |
404 |
Document not found. |
504 |
Upstream timeout. |
500 |
Unexpected server error. |