DevelopersHow to connect an assistantKeys
Reference/Cards/Change

Change a card's due notice

PUThttps://api.getwerk.ai/api/v1/projects/{projectId}/cards/{cardId}/due-notice

Sets how long before its due date a card's due notice is sent.

Only the project's owner and admins may change it; a member's own alarm is a reminder. A lead equal to the card's own changes nothing.

Authorization

AuthorizationheaderRequired

Authorization: Bearer <key> Authentication

Path parameters

projectIdstring, uuidRequired

The project's id.

cardIdstring, uuidRequired

The card's id.

Body

clientRequestIdstring, uuidRequired

An id the caller makes for this request. Sent again with the same request, it returns the first answer and changes nothing twice; sent with a different request, it is refused.

versionintegerRequired

The card's version as last read; when it changed since, the change is refused.

At least 1
leadenumRequired

How long before the due date the notice is sent; none sends no notice.

Allowed valuesnoneat_due15_minutes1_hour2_hours1_day2_days

Response

200 The card's lead after the change.

itemIdstring, uuid

The card's id.

versioninteger

The card's version after the change.

At least 1
leadenum

The card's due notice lead now.

Allowed valuesnoneat_due15_minutes1_hour2_hours1_day2_days

Errors

400invalid_queryThe query is not in the form the route takes; the limit is in the unit of the input details.field names (characters for a text, entries for a list, the value for a number).
400invalid_card_queryThe request about cards or their files is not in the form its route takes, or names a day of a filter while the signed-in person's profile has no time zone; the limit is in the unit of the input details.field names (characters for a text, entries for a list, the value for a number).
401session_revokedThe request carries no session the server holds, or its session has ended.
401session_expiredThe session has expired.
403actor_not_allowedThe signed-in person may not make this change to the card.
403not_permittedThe signed-in person's role, or whose the record is, does not allow this request.
403not_a_memberThe signed-in person is not in the project.
403due_notice_owner_admin_requiredOnly the project's owner or an admin sets a card's due notice.
403personal_project_restrictedThe request acts on the signed-in person's own My Werk, which only they see, or on a reminder with no card, which lives there, and My Werk does not take this action.
404conversation_not_foundThe project the request names, or its chat, is not one the signed-in person is in.
404item_not_foundThe card the request names, or its list, is not one the signed-in person can see.
409session_changedThe session changed while the request was in flight.
409project_deletedThe project is being deleted.
409project_archivedThe project is archived, so it does not take this request.
409request_conflictThe request id was already used with another request, or the change it asks could not be made to the record it names.
409request_erasedThe request id belongs to a request whose record was erased.
409card_archivedThe card is archived, so it does not take this change.
413payload_too_largeThe request body has more bytes than the route takes.
rate_limitedMore requests of this kind were sent than Werk takes within the time it counts them over.
500server_errorThe server could not complete the request, and it is not known whether a write it holds was made.
curl
curl -X PUT "https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/cards/3c9e5b17-8d2f-4a64-b1e3-7f5a0c9d2b48/due-notice" \
  -H "Authorization: Bearer wk_key_..." \
  -H "Content-Type: application/json" \
  -d '{
    "clientRequestId": "f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4f08",
    "version": 7,
    "lead": "1_day"
  }'
TypeScript
const res = await fetch("https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/cards/3c9e5b17-8d2f-4a64-b1e3-7f5a0c9d2b48/due-notice", {
  method: "PUT",
  headers: {
    Authorization: "Bearer wk_key_...",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "clientRequestId": "f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4f08",
    "version": 7,
    "lead": "1_day"
  }),
});
const answer = await res.json();
200JSON
{
  "itemId": "3c9e5b17-8d2f-4a64-b1e3-7f5a0c9d2b48",
  "version": 8,
  "lead": "1_day"
}