Updates the capacity of the specified user.

PUThttps://api.awork.com/api/v1/users/{userId}/capacity
PUT https://api.awork.com/api/v1/users/{userId}/capacity

Updates the capacity of the specified user. The capacity is stored for the user's planning.

Authentication

AuthorizationBearer

Send your token in the Authorization: Bearer <token> header. See Authentication for API keys and OAuth.

Path parameters

userIdstringRequired
format: uuid

The user whose capacity should be updated.

Request body Required

Updated capacity values for each day of the week.

application/json

capacityPerWeekinteger or nullOptionalDeprecated
format: int32

Backward compatibility property. The capacity of the user per week, in seconds. If this value is null, and all the daily values are null as well, then the default value will be set to the default value.

moninteger or nullOptional
format: int32

The user's capacity on Monday, in seconds.

tueinteger or nullOptional
format: int32

The user's capacity on Tuesday, in seconds.

wedinteger or nullOptional
format: int32

The user's capacity on Wednesday, in seconds.

thuinteger or nullOptional
format: int32

The user's capacity on Thursday, in seconds.

friinteger or nullOptional
format: int32

The user's capacity on Friday, in seconds.

satinteger or nullOptional
format: int32

The user's capacity on Saturday, in seconds.

suninteger or nullOptional
format: int32

The user's capacity on Sunday, in seconds.

Responses

200 OK

application/json

userIdstringOptional
format: uuid

The id of the user this capacity belongs to.

weeklyCapacityobjectOptional
Show 7 properties
monintegerOptional
format: int32

The user's capacity on Monday, in seconds.

tueintegerOptional
format: int32

The user's capacity on Tuesday, in seconds.

wedintegerOptional
format: int32

The user's capacity on Wednesday, in seconds.

thuintegerOptional
format: int32

The user's capacity on Thursday, in seconds.

friintegerOptional
format: int32

The user's capacity on Friday, in seconds.

satintegerOptional
format: int32

The user's capacity on Saturday, in seconds.

sunintegerOptional
format: int32

The user's capacity on Sunday, in seconds.

createdOnstringOptional
format: date-time

The date this user capacity was created.

createdBystringOptional
format: uuid

The id of the user who created this user capacity.

updatedOnstringOptional
format: date-time

The date when this user capacity was last updated.

updatedBystringOptional
format: uuid

The id of the user who updated the user capacity.

capacityPerWeekintegerOptionalDeprecated
format: int32

The capacity of the user per week, in seconds.

401 Unauthorized

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

Search documentation