Mark a duplicate card
Marks a card as a duplicate of another card of the same project.
A card cannot duplicate itself, a done card or a card that is itself a duplicate. The mark is removed with the card's change route.
Authorization
Authorization: Bearer <key> Authentication
Headers
The language tag Werk writes the answer's own words in, such as step names and history lines, matched to a language it serves; a card's text stays as written. At a project's paths, the reads of its cards and steps, of a card, its update photos, a file and its reminders, and of follow and reminder invitations, and a document's read-now and consent, take the language of the person's chat with Werk in that project first, while it has one. Without either, the language Werk uses with the person the key or the connection acts for.
Path parameters
The project's id.
The card's id.
Body
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.
The card this one duplicates, in the same project.
Response
200 The card after the change.
The card as the key's person reads it after the change.
Show properties of itemHide properties of item
completed when the card is on its project's last step, not_completed when it was archived before it, open otherwise.
The card's id.
The card's number as people write it, with # before it.
The card's title, as written.
The language the card's title and description are written in.
The title in the reader's language, when it is written in another.
Show properties of titleTranslationHide properties of titleTranslation
The reader's language the text is translated into.
ready when text holds the translation, pending while it is being made, failed when it could not be made, paused when no plan pays for translations now.
The translated text, present once ready.
The step the card is on, with where that step sits in the work.
Show properties of statusHide properties of status
The id of the step the card is on.
The step's name.
open on a new step, done on the project's last step, active on any other step.
The kind of step the card is on; a step that ends the work reads in_progress while it is not the project's last step.
The language the step's name is written in; absent for a step name Werk writes in the reader's language itself.
The step's name in the reader's language, when it is written in another.
Show properties of labelTranslationHide properties of labelTranslation
The reader's language the text is translated into.
ready when text holds the translation, pending while it is being made, failed when it could not be made, paused when no plan pays for translations now.
The translated text, present once ready.
How long before the due date its holder and followers get the due notice; none sends no notice.
Who set the due moment; present only for a due date with a time.
Show properties of dueSetByHide properties of dueSetBy
That person's name.
The card's due date, or null when it has none.
Show properties of dueHide properties of due
One of 2 shapes, told apart by kind:
kinddatedate for a due day with no time, datetime for a due moment.
The due day, as YYYY-MM-DD.
kinddatetimedate for a due day with no time, datetime for a due moment.
The due moment, as an ISO 8601 date and time with its offset.
The time zone the due moment was given in, when known.
The card's holder, or null when the card is free.
Show properties of assigneeHide properties of assignee
The holder's person id.
The holder's name as the project shows it.
The holder's initials, for an avatar with no photo.
The holder's photo, when they have one.
Show properties of photoHide properties of photo
The person whose photo it is.
The photo's version, which changes with the photo; its read takes it to fetch the current one.
The card's version, which grows with every change to it.
The card's number in its project, unique there and never reused.
The card's step among its project's steps, as the project defines it.
Show properties of currentStepHide properties of currentStep
The step's id; a change of step sends it as stepId.
The step's name.
The kind of step: new for an open step, in_progress or waiting for one in between, resolved or closed for one that ends the work.
The language the step's name is written in; absent for a step name Werk writes in the reader's language itself.
The step's name in the reader's language, when it is written in another.
Show properties of labelTranslationHide properties of labelTranslation
The reader's language the text is translated into.
ready when text holds the translation, pending while it is being made, failed when it could not be made, paused when no plan pays for translations now.
The translated text, present once ready.
True when the card is archived: it has left the working lists and stays readable and searchable.
How much the card holds.
Show properties of countsHide properties of counts
Photos on the card.
Updates on the card.
Documents on the card.
The card's list: its items checked and in all; absent when the card has no list.
Show properties of checklistHide properties of checklist
List items checked.
List items in all.
The changes the key's person may make to this card by hand now, by action name.
Errors
invalid_query The 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).invalid_card_query The 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).session_revoked The request carries no session the server holds, or its session has ended.session_expired The session has expired.actor_not_allowed The signed-in person may not make this change to the card.not_permitted The signed-in person's role, or whose the record is, does not allow this request.not_a_member The signed-in person is not in the project.conversation_not_found The project the request names, or its chat, is not one the signed-in person is in.item_not_found The card the request names, or its list, is not one the signed-in person can see.not_found The route or record the request names does not exist, or is not one the signed-in person can reach.session_changed The session changed while the request was in flight.project_deleted The project is being deleted.project_archived The project is archived, so it does not take this request.request_conflict The request id was already used with another request, or the change it asks could not be made to the record it names.request_erased The request id belongs to a request whose record was erased.card_archived The card is archived, so it does not take this change.project_profile_changed The project's setup changed while the cards were read.payload_too_large The request body has more bytes than the route takes.rate_limited More requests of this kind were sent than Werk takes within the time it counts them over.server_error The server could not complete the request, and it is not known whether a write it holds was made.curl -X PUT "https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/cards/6e2a8d43-1c7b-4f95-a3d6-0b4e9c1f7a25/duplicate-of" \
-H "Authorization: Bearer wk_key_..." \
-H "Content-Type: application/json" \
-d '{
"clientRequestId": "f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4f10",
"duplicateOfId": "3c9e5b17-8d2f-4a64-b1e3-7f5a0c9d2b48"
}'const res = await fetch("https://api.getwerk.ai/api/v1/projects/2f6c9e41-7a3b-4d58-9c1e-0b8d4f2a6e73/cards/6e2a8d43-1c7b-4f95-a3d6-0b4e9c1f7a25/duplicate-of", {
method: "PUT",
headers: {
Authorization: "Bearer wk_key_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
"clientRequestId": "f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4f10",
"duplicateOfId": "3c9e5b17-8d2f-4a64-b1e3-7f5a0c9d2b48"
}),
});
const answer = await res.json();{
"item": {
"outcome": "open",
"id": "6e2a8d43-1c7b-4f95-a3d6-0b4e9c1f7a25",
"ref": "#15",
"title": "Paint the hallway",
"language": "en-US",
"status": {
"key": "open",
"label": "Pending",
"category": "open",
"bucket": "new"
},
"dueNoticeLead": "at_due",
"due": null,
"assignee": null,
"version": 2,
"number": 15,
"currentStep": {
"id": "open",
"label": "Pending",
"bucket": "new"
},
"archived": false,
"counts": {
"photos": 0,
"updates": 0,
"documents": 0
}
}
}Send a requestPUT
It is sent with the key you give, as you. A change made here is real.
The request could not be sent, or its response could not be read.