---
title: "Sets the custom fields for a task."
method: POST
path: "/tasks/{taskId}/setcustomfields"
tags: ["customFields"]
---

# Sets the custom fields for a task.

`POST /tasks/{taskId}/setcustomfields`

The required properties depend on the type of the custom field.
            
            <Check title="Required Permissions" icon="key">The user must have at least `write` permissions on the specified task.</Check>

## Path parameters

- `taskId` string, uuid, required

## Headers

- `Authorization` string, required

## Request body

- CustomFieldPostForm[]
  - `customFieldDefinitionId` string, uuid, required — The custom field definition id.
  - `userIdValue` string, uuid, nullable — The user id. The user id can be set for custom field type 'user'.
  - `clientIdValue` string, uuid, nullable — The client id. The client id can be set for custom field type 'client'.
  - `numberValue` number, double, nullable — The number value. The number value can be set for custom field type 'number'.
  - `selectionOptionIdValue` string, uuid, nullable — The selection option id value. The id can be set for custom field types 'select' and 'coloredSelect'.
  - `textValue` string, nullable — The text value. The text value can be set for custom field types 'text' and 'link'.
  - `dateValue` string, date-time, nullable — The date value. The date value can be set for custom field types 'date' and 'datetime'.
  - `booleanValue` boolean, nullable — The boolean value. The boolean value can be set for custom field type 'boolean'.

## Response `204`

No Content

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found

---

[API](https://skmtc.net/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.net/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/awork-io/api-v1-reference/versions/f784a53f60df/schema)
