Skip to main content

Reorder Client Fields (v1)

Method + Path

POST /v1/workspace/:workspaceId/clients/fields/reorder

Actual backend path: /v1/workspace/:workspaceId/clients/fields/reorder

Description

Reorder custom field definitions for clients. This updates the display order of fields.

Authentication

Required - JWT token in Authorization header

Required Permissions:

  • clients.update

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>
Content-TypestringYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier

Request Body

{
"fields": [
{
"fieldId": "507f1f77bcf86cd799439011",
"order": 1
},
{
"fieldId": "507f1f77bcf86cd799439012",
"order": 2
}
]
}

Body Parameters

ParameterTypeRequiredDescription
fieldsarrayYesArray of field order objects (minimum 1)
fields[].fieldIdstringYesField identifier
fields[].ordernumberYesNew order position (integer)

Response (200)

{
"fields": [
{
"id": "507f1f77bcf86cd799439011",
"key": "notes",
"label": "Notes",
"order": 1
},
{
"id": "507f1f77bcf86cd799439012",
"key": "preferences",
"label": "Preferences",
"order": 2
}
]
}

Common Errors

  • 400 Bad Request: Invalid request body or less than one field provided
  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions (requires clients.update)
  • 404 Not Found: Workspace or field not found
  • 422 Unprocessable Entity: Validation errors
  • 500 Internal Server Error: Server error