Collaboration API
Manage team collaboration on deals with assignments, threaded comments, document requests, activity timelines, and notifications. All collaboration data is scoped to your organization.
Assignments
Assign team members to deals with specific roles. Assignments trigger notifications and appear in the deal's activity timeline.
Returns all current assignments for a deal, including the assigned user's details and role.
| Name | Type | Required | Description |
|---|---|---|---|
| deal_id | integer | Required | The deal ID |
curl https://api.banklyze.com/v1/deals/42/assignments \
-H "Authorization: Bearer sk_live_abc123"{
"data": [
{
"id": 1,
"deal_id": 42,
"user_id": 5,
"user_email": "analyst@company.com",
"user_name": "Jane Smith",
"role": "reviewer",
"assigned_at": "2026-03-01T10:00:00Z",
"assigned_by": "manager@company.com"
},
{
"id": 2,
"deal_id": 42,
"user_id": 8,
"user_email": "underwriter@company.com",
"user_name": "John Doe",
"role": "underwriter",
"assigned_at": "2026-03-01T10:05:00Z",
"assigned_by": "manager@company.com"
}
]
}Assign a user to a deal with a specific role. The assigned user receives a notification.
| Name | Type | Required | Description |
|---|---|---|---|
| deal_id | integer | Required | The deal ID |
| user_id | integer | Required | The user ID to assign |
| role | string | Required | Assignment role: "reviewer", "underwriter", or "manager" |
curl -X POST https://api.banklyze.com/v1/deals/42/assignments \
-H "Authorization: Bearer sk_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"user_id": 5,
"role": "reviewer"
}'{
"data": {
"id": 3,
"deal_id": 42,
"user_id": 5,
"role": "reviewer",
"assigned_at": "2026-03-10T14:30:00Z",
"assigned_by": "manager@company.com"
}
}Remove a user's assignment from a deal. Returns 204 No Content on success.
| Name | Type | Required | Description |
|---|---|---|---|
| deal_id | integer | Required | The deal ID |
| assignment_id | integer | Required | The assignment ID to remove |
curl -X DELETE https://api.banklyze.com/v1/deals/42/assignments/3 \
-H "Authorization: Bearer sk_live_abc123"Comments
Threaded comments on deals. Top-level comments can have replies via the parent_id field. Comments support a single level of nesting.
Returns paginated comments for a deal. Top-level comments include their nested replies.
| Name | Type | Required | Description |
|---|---|---|---|
| deal_id | integer | Required | The deal ID |
| page | integer | Default: 1 | Page number |
| per_page | integer | Default: 25 | Results per page (max 100) |
curl "https://api.banklyze.com/v1/deals/42/comments?page=1&per_page=25" \
-H "Authorization: Bearer sk_live_abc123"{
"data": [
{
"id": 10,
"deal_id": 42,
"user_id": 5,
"user_name": "Jane Smith",
"content": "Revenue looks strong but NSF count is concerning. Flagging for senior review.",
"parent_id": null,
"created_at": "2026-03-05T09:15:00Z",
"updated_at": "2026-03-05T09:15:00Z",
"replies": [
{
"id": 11,
"user_id": 8,
"user_name": "John Doe",
"content": "Agreed. The 4 NSFs in January are a red flag. Requesting additional statements.",
"parent_id": 10,
"created_at": "2026-03-05T10:00:00Z"
}
]
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 1,
"total_pages": 1
}
}Add a comment to a deal. Set parent_id to reply to an existing comment.
| Name | Type | Required | Description |
|---|---|---|---|
| deal_id | integer | Required | The deal ID |
| content | string | Required | Comment text content |
| parent_id | integer | Optional | Parent comment ID for threaded replies |
curl -X POST https://api.banklyze.com/v1/deals/42/comments \
-H "Authorization: Bearer sk_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"content": "Revenue looks strong but NSF count is concerning.",
"parent_id": null
}'{
"data": {
"id": 12,
"deal_id": 42,
"user_id": 5,
"content": "Revenue looks strong but NSF count is concerning.",
"parent_id": null,
"created_at": "2026-03-10T14:30:00Z"
}
}Update the content of an existing comment. Only the comment author can edit their own comments.
| Name | Type | Required | Description |
|---|---|---|---|
| comment_id | integer | Required | The comment ID to edit |
| content | string | Required | Updated comment text |
curl -X PATCH https://api.banklyze.com/v1/comments/12 \
-H "Authorization: Bearer sk_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"content": "Revenue looks strong but NSF count is concerning. Flagging for senior review."
}'Soft-delete a comment. Only the comment author or an admin can delete comments. Returns 204 No Content on success.
| Name | Type | Required | Description |
|---|---|---|---|
| comment_id | integer | Required | The comment ID to delete |
curl -X DELETE https://api.banklyze.com/v1/comments/12 \
-H "Authorization: Bearer sk_live_abc123"Document Requests
Request additional documents from applicants. Track request status as pending, fulfilled, or cancelled.
Returns all document requests for a deal, including their current status and due dates.
| Name | Type | Required | Description |
|---|---|---|---|
| deal_id | integer | Required | The deal ID |
curl https://api.banklyze.com/v1/deals/42/doc-requests \
-H "Authorization: Bearer sk_live_abc123"{
"data": [
{
"id": 1,
"deal_id": 42,
"document_type": "bank_statement",
"description": "Please provide January and February 2026 bank statements.",
"status": "pending",
"due_date": "2026-03-15",
"requested_by": "underwriter@company.com",
"created_at": "2026-03-05T11:00:00Z",
"fulfilled_at": null
}
]
}Create a new document request on a deal. Optionally set a due date for the request.
| Name | Type | Required | Description |
|---|---|---|---|
| deal_id | integer | Required | The deal ID |
| document_type | string | Required | Type of document requested: "bank_statement", "tax_return", or "profit_and_loss" |
| description | string | Required | Human-readable description of what is needed |
| due_date | string | Optional | Due date in YYYY-MM-DD format |
curl -X POST https://api.banklyze.com/v1/deals/42/doc-requests \
-H "Authorization: Bearer sk_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"document_type": "bank_statement",
"description": "Please provide January and February 2026 bank statements.",
"due_date": "2026-03-15"
}'{
"data": {
"id": 2,
"deal_id": 42,
"document_type": "bank_statement",
"description": "Please provide January and February 2026 bank statements.",
"status": "pending",
"due_date": "2026-03-15",
"created_at": "2026-03-10T14:30:00Z"
}
}Update the status of a document request. Valid statuses are pending, fulfilled, and cancelled.
| Name | Type | Required | Description |
|---|---|---|---|
| request_id | integer | Required | The document request ID |
| status | string | Required | New status: "pending", "fulfilled", or "cancelled" |
curl -X PATCH https://api.banklyze.com/v1/doc-requests/2 \
-H "Authorization: Bearer sk_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"status": "fulfilled"
}'Activity Timeline
A unified chronological view of everything that has happened on a deal: status changes, document uploads, comments, assignments, and processing events.
Returns the full activity timeline for a deal in chronological order. Includes all event types merged into a single stream.
| Name | Type | Required | Description |
|---|---|---|---|
| deal_id | integer | Required | The deal ID |
curl https://api.banklyze.com/v1/deals/42/timeline \
-H "Authorization: Bearer sk_live_abc123"{
"data": [
{
"type": "status_change",
"timestamp": "2026-03-01T10:00:00Z",
"actor": "system",
"details": {
"old_status": "new",
"new_status": "processing"
}
},
{
"type": "document_uploaded",
"timestamp": "2026-03-01T10:01:00Z",
"actor": "analyst@company.com",
"details": {
"document_id": 101,
"document_type": "bank_statement",
"filename": "acme-jan-2026.pdf"
}
},
{
"type": "comment",
"timestamp": "2026-03-05T09:15:00Z",
"actor": "Jane Smith",
"details": {
"comment_id": 10,
"content": "Revenue looks strong but NSF count is concerning."
}
},
{
"type": "assignment",
"timestamp": "2026-03-05T10:30:00Z",
"actor": "manager@company.com",
"details": {
"user_name": "John Doe",
"role": "underwriter"
}
}
]
}Returns a paginated activity feed for a deal. Each entry records a discrete action with the actor and metadata.
| Name | Type | Required | Description |
|---|---|---|---|
| deal_id | integer | Required | The deal ID |
| page | integer | Default: 1 | Page number |
| per_page | integer | Default: 50 | Results per page (max 100) |
curl "https://api.banklyze.com/v1/deals/42/activity?page=1&per_page=50" \
-H "Authorization: Bearer sk_live_abc123"{
"data": [
{
"id": 201,
"deal_id": 42,
"action": "document.uploaded",
"actor_id": 5,
"actor_name": "Jane Smith",
"metadata": {
"document_id": 101,
"filename": "acme-jan-2026.pdf"
},
"created_at": "2026-03-01T10:01:00Z"
}
],
"meta": {
"page": 1,
"per_page": 50,
"total": 24,
"total_pages": 1
}
}The timeline endpoint returns all event types in a unified stream, while the activity endpoint returns structured activity records with pagination. Use timeline for a deal detail view and activity for audit logs.
Notifications
Retrieve and manage in-app notifications for the authenticated user. Notifications are generated by assignments, mentions, and deal status changes.
Returns paginated notifications for the authenticated user, ordered by most recent first.
| Name | Type | Required | Description |
|---|---|---|---|
| page | integer | Default: 1 | Page number |
| per_page | integer | Default: 25 | Results per page (max 100) |
| unread_only | boolean | Default: false | Filter to unread notifications only |
curl https://api.banklyze.com/v1/notifications \
-H "Authorization: Bearer sk_live_abc123"{
"data": [
{
"id": 301,
"type": "deal.assigned",
"title": "New deal assignment",
"message": "You have been assigned as reviewer on Acme Trucking LLC",
"deal_id": 42,
"read": false,
"created_at": "2026-03-10T14:30:00Z"
},
{
"id": 300,
"type": "comment.mention",
"title": "New comment mention",
"message": "Jane Smith mentioned you in a comment on Acme Trucking LLC",
"deal_id": 42,
"read": true,
"created_at": "2026-03-09T11:00:00Z"
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 2,
"total_pages": 1
}
}Mark one or more notifications as read. Pass an array of notification IDs to batch-update.
| Name | Type | Required | Description |
|---|---|---|---|
| notification_ids | integer[] | Required | Array of notification IDs to mark as read |
curl -X POST https://api.banklyze.com/v1/notifications/mark-read \
-H "Authorization: Bearer sk_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"notification_ids": [301, 300]
}'{
"data": {
"marked": 2
}
}