Requests API
Create, read, update, and manage support requests via the API.
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/requests | List requests |
| GET | /v1/requests/:id | Get single request |
| POST | /v1/requests | Create request |
| PATCH | /v1/requests/:id | Update request |
| DELETE | /v1/requests/:id | Delete request |
List Requests
Request
GET /v1/requests
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status |
priority | string | Filter by priority |
assignedTo | string | Filter by assignee |
groupId | string | Filter by group |
createdAfter | datetime | Created after date |
createdBefore | datetime | Created before date |
page | number | Page number (default: 1) |
limit | number | Items per page (default: 20, max: 100) |
Example
curl -X GET "https://api.dzdesk.com/v1/requests?status=open&priority=high&limit=10" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
{
"success": true,
"data": {
"requests": [
{
"id": "req_abc123",
"title": "Cannot access email",
"description": "Outlook shows connection error",
"status": "open",
"priority": "high",
"category": "software",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"assignedTo": null,
"assignedGroup": "grp_software",
"requester": {
"id": "usr_123",
"email": "john@company.com",
"name": "John Doe"
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 45,
"pages": 5
}
}
}
Get Single Request
Request
GET /v1/requests/:id
Example
curl -X GET "https://api.dzdesk.com/v1/requests/req_abc123" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
{
"success": true,
"data": {
"id": "req_abc123",
"title": "Cannot access email",
"description": "Outlook shows connection error since this morning",
"status": "in_progress",
"priority": "high",
"category": "software",
"tags": ["email", "outlook"],
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T14:22:00Z",
"assignedTo": {
"id": "usr_456",
"email": "jane@company.com",
"name": "Jane Smith"
},
"assignedGroup": {
"id": "grp_software",
"name": "Software Support"
},
"requester": {
"id": "usr_123",
"email": "john@company.com",
"name": "John Doe",
"isVip": false
},
"sla": {
"tier": "Tier 2",
"responseTarget": "2024-01-15T14:30:00Z",
"resolutionTarget": "2024-01-15T18:30:00Z",
"responseStatus": "met",
"resolutionStatus": "on_track"
},
"comments": [
{
"id": "cmt_789",
"content": "I'll look into this right away",
"author": {
"id": "usr_456",
"name": "Jane Smith"
},
"isInternal": false,
"createdAt": "2024-01-15T11:00:00Z"
}
],
"attachments": [
{
"id": "att_111",
"filename": "error_screenshot.png",
"size": 245000,
"uploadedAt": "2024-01-15T10:30:00Z"
}
]
}
}
Create Request
Request
POST /v1/requests
Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Request title |
description | string | Yes | Detailed description |
priority | string | Yes | critical, high, medium, low |
category | string | No | Category name |
assignedTo | string | No | User ID to assign |
assignedGroup | string | No | Group ID to assign |
tags | array | No | List of tags |
Example
curl -X POST "https://api.dzdesk.com/v1/requests" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "New laptop setup required",
"description": "New employee starting Monday needs laptop configured",
"priority": "medium",
"category": "hardware",
"assignedGroup": "grp_hardware",
"tags": ["new-hire", "laptop"]
}'
Response
{
"success": true,
"data": {
"id": "req_def456",
"title": "New laptop setup required",
"status": "open",
"createdAt": "2024-01-15T15:00:00Z"
}
}
Update Request
Request
PATCH /v1/requests/:id
Body Parameters
| Field | Type | Description |
|---|---|---|
title | string | Updated title |
description | string | Updated description |
status | string | New status |
priority | string | New priority |
assignedTo | string | New assignee |
assignedGroup | string | New group |
tags | array | Updated tags |
Example
curl -X PATCH "https://api.dzdesk.com/v1/requests/req_abc123" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "resolved",
"resolution": "Recreated Outlook profile, issue resolved"
}'
Response
{
"success": true,
"data": {
"id": "req_abc123",
"status": "resolved",
"updatedAt": "2024-01-15T16:30:00Z"
}
}
Delete Request
Request
DELETE /v1/requests/:id
Example
curl -X DELETE "https://api.dzdesk.com/v1/requests/req_abc123" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
{
"success": true,
"data": {
"deleted": true
}
}
Note: Requires admin permissions.
Add Comment
Request
POST /v1/requests/:id/comments
Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | Comment text |
isInternal | boolean | No | Internal note (default: false) |
Example
curl -X POST "https://api.dzdesk.com/v1/requests/req_abc123/comments" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "Issue resolved by recreating user profile",
"isInternal": false
}'
Upload Attachment
Request
POST /v1/requests/:id/attachments
Example
curl -X POST "https://api.dzdesk.com/v1/requests/req_abc123/attachments" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file=@screenshot.png"
Response
{
"success": true,
"data": {
"id": "att_222",
"filename": "screenshot.png",
"size": 150000,
"url": "https://api.dzdesk.com/v1/attachments/att_222"
}
}
Status Values
| Status | Description |
|---|---|
open | New request |
assigned | Assigned to agent |
in_progress | Being worked on |
pending | Waiting for response |
resolved | Solution provided |
closed | Completed |
Priority Values
| Priority | Description |
|---|---|
critical | System down, urgent |
high | Major impact |
medium | Standard issue |
low | Minor/question |
Related Topics
- Authentication - API authentication
- Users API - User endpoints
- Webhooks - Event notifications