Skip to main content
PATCH
/
client
/
departments
/
{departmentId}
cURL
curl --request PATCH \
  --url https://sandbox-remote-api.rayda.co/api/v2/client/departments/{departmentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "success": true,
  "message": "Record created successfully",
  "data": {
    "id": "9e0fe6c9-7d47-4341-a578-a1cf42695e13",
    "company": {
      "id": "9dc21956-ccd8-4ae5-bc77-d167d6d542ed",
      "name": "Rayda"
    },
    "name": "Business Development",
    "member_count": 2,
    "asset_count": 0,
    "created_at": "2025-01-26T17:08:56.000Z",
    "updated_at": "2025-01-26T17:08:56.000Z",
    "head": {
      "name": " ",
      "id": null
    },
    "members": [
      {
        "id": "9e0e7675-bc9b-40e1-b1db-4cc6451f7f4e",
        "first_name": "Jackson",
        "last_name": "Doe",
        "email": "[email protected]",
        "user_departments": [
          {
            "id": "9e0febe1-1ff2-4625-accd-9f43d229ea1d",
            "company_id": "9dc21956-ccd8-4ae5-bc77-d167d6d542ed",
            "user_id": "9e0e7675-bc9b-40e1-b1db-4cc6451f7f4e",
            "department_id": "9e0febe1-148e-4330-ae0c-b333b570d0e9",
            "status": "Active",
            "created_at": "2025-01-26T17:23:10.000Z",
            "updated_at": "2025-01-26T17:23:10.000Z",
            "deleted_at": null
          }
        ]
      }
    ]
  }
}
'
{
  "success": true,
  "message": "Record Updated successfully",
  "data": {
    "id": "9f216061-6164-4985-9ce2-02ec4b0b5786",
    "company": {
      "id": "9e9a08cb-e3dc-4772-8c7e-cd3ec205d9c0",
      "name": "Rayda"
    },
    "name": "Finance",
    "member_count": 1,
    "asset_count": 0,
    "created_at": "2025-06-11T15:49:57.000000Z",
    "updated_at": "2025-06-21T07:18:41.000000Z",
    "head": {
      "name": " ",
      "id": null
    },
    "members": [
      {
        "id": "9f216061-5970-439d-855d-cb5dc2f48f9c",
        "first_name": "Sally",
        "last_name": "Gorczany",
        "email": "[email protected]",
        "user_departments": [
          {
            "id": "9f216061-6340-415d-b0b1-87158322560f",
            "company_id": "9e9a08cb-e3dc-4772-8c7e-cd3ec205d9c0",
            "user_id": "9f216061-5970-439d-855d-cb5dc2f48f9c",
            "department_id": "9f216061-6164-4985-9ce2-02ec4b0b5786",
            "status": "Active",
            "created_at": "2025-06-11T15:49:57.000000Z",
            "updated_at": "2025-06-11T15:49:57.000000Z",
            "deleted_at": null
          }
        ]
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

departmentId
string<uuid>
required

ID of the department to update

Body

application/json

The department data to update

success
boolean
Example:

true

message
string
Example:

"Record created successfully"

data
object

Response

Record updated successfully

success
boolean
Example:

true

message
string
Example:

"Record Updated successfully"

data
object
Example:
{
"id": "9f216061-6164-4985-9ce2-02ec4b0b5786",
"company": {
"id": "9e9a08cb-e3dc-4772-8c7e-cd3ec205d9c0",
"name": "Rayda"
},
"name": "Finance",
"member_count": 1,
"asset_count": 0,
"created_at": "2025-06-11T15:49:57.000000Z",
"updated_at": "2025-06-21T07:18:41.000000Z",
"head": { "name": " ", "id": null },
"members": [
{
"id": "9f216061-5970-439d-855d-cb5dc2f48f9c",
"first_name": "Sally",
"last_name": "Gorczany",
"email": "[email protected]",
"user_departments": [
{
"id": "9f216061-6340-415d-b0b1-87158322560f",
"company_id": "9e9a08cb-e3dc-4772-8c7e-cd3ec205d9c0",
"user_id": "9f216061-5970-439d-855d-cb5dc2f48f9c",
"department_id": "9f216061-6164-4985-9ce2-02ec4b0b5786",
"status": "Active",
"created_at": "2025-06-11T15:49:57.000000Z",
"updated_at": "2025-06-11T15:49:57.000000Z",
"deleted_at": null
}
]
}
]
}