Skip to content

Function: updateCard()

ts
function updateCard(client, parameters): Promise<{
  address?: string | null;
  agent?:   | {
     conversationId?: string | null;
     name?: string | null;
   }
     | null;
  attachments?: unknown[];
  badges?: {
     attachments?: number;
     attachmentsByType?: {
        trello?: {
           board?: number;
           card?: number;
        };
     };
     checkItems?: number;
     checkItemsChecked?: number;
     checkItemsEarliestDue?: Date | null;
     comments?: number;
     description?: boolean;
     due?: Date | null;
     dueComplete?: boolean;
     externalSource?: Record<string, any> | null;
     fogbugz?: string;
     lastUpdatedByAi?: boolean;
     location?: boolean;
     maliciousAttachments?: number;
     start?: Date | null;
     subscribed?: boolean;
     viewingMemberVoted?: boolean;
     votes?: number;
  };
  cardRole?: "link" | "board" | "separator" | "mirror" | null;
  checkItemStates?: object[];
  closed?: boolean;
  coordinates?: string | null;
  cover?: {
     brightness?: "light" | "dark";
     color?:   | "green"
        | "yellow"
        | "orange"
        | "red"
        | "purple"
        | "blue"
        | "sky"
        | "lime"
        | "pink"
        | "black"
        | null;
     idAttachment?: string | null;
     idPlugin?: string | null;
     idUploadedBackground?: boolean | null;
     isTemplate?: boolean;
     size?: "normal";
     yPosition?: number;
  };
  creationMethod?: string | null;
  creationMethodError?: unknown;
  creationMethodLoadingStartedAt?: unknown;
  customFieldItems?: unknown[];
  dateClosed?: unknown;
  dateCompleted?: unknown;
  dateLastActivity?: Date;
  dateViewedByCreator?: unknown;
  desc?: string;
  descData?: {
     emoji?: Record<string, any>;
  };
  due?: Date | null;
  dueComplete?: boolean;
  dueReminder?: string | null;
  email?: string | null;
  externalSource?: unknown;
  faviconUrl?: unknown;
  id: string;
  idAttachmentCover?: string | null;
  idBoard?: string;
  idChecklists?: (
     | string
     | {
     checkItems?: object[];
     id: string;
     idBoard?: string;
     idCard?: string;
     limits?: {
        attachments?: {
           perBoard?: ... | ...;
           perCard?: ... | ...;
        };
        boards?: {
           totalAccessRequestsPerBoard?: ... | ...;
           totalMembersPerBoard?: ... | ...;
           totalPerMember?: ... | ...;
        };
        cards?: {
           openPerBoard?: ... | ...;
           openPerList?: ... | ...;
           totalPerBoard?: ... | ...;
           totalPerList?: ... | ...;
        };
        checkItems?: {
           perChecklist?: ... | ...;
        };
        checklists?: {
           perBoard?: ... | ...;
           perCard?: ... | ...;
        };
        customFieldOptions?: {
           perField?: ... | ...;
        };
        customFields?: {
           perBoard?: ... | ...;
        };
        labels?: {
           perBoard?: ... | ...;
        };
        lists?: {
           openPerBoard?: ... | ...;
           totalPerBoard?: ... | ...;
        };
        orgs?: {
           freeBoardsPerOrg?: ... | ...;
           totalMembersPerOrg?: ... | ...;
           totalPerMember?: ... | ...;
           usersPerFreeOrg?: ... | ...;
        };
        reactions?: {
           perAction?: ... | ...;
           uniquePerAction?: ... | ...;
        };
        stickers?: {
           perCard?: ... | ...;
        };
     };
     name?: string;
     pos?: number | "top" | "bottom";
  })[];
  idLabels?: (
     | string
     | {
     color?:   | "green"
        | "yellow"
        | "orange"
        | "red"
        | "purple"
        | "blue"
        | "sky"
        | "lime"
        | "pink"
        | "black"
        | null;
     id: string;
     idBoard?: string;
     idOrganization?: string | null;
     limits?: {
        attachments?: {
           perBoard?: ... | ...;
           perCard?: ... | ...;
        };
        boards?: {
           totalAccessRequestsPerBoard?: ... | ...;
           totalMembersPerBoard?: ... | ...;
           totalPerMember?: ... | ...;
        };
        cards?: {
           openPerBoard?: ... | ...;
           openPerList?: ... | ...;
           totalPerBoard?: ... | ...;
           totalPerList?: ... | ...;
        };
        checkItems?: {
           perChecklist?: ... | ...;
        };
        checklists?: {
           perBoard?: ... | ...;
           perCard?: ... | ...;
        };
        customFieldOptions?: {
           perField?: ... | ...;
        };
        customFields?: {
           perBoard?: ... | ...;
        };
        labels?: {
           perBoard?: ... | ...;
        };
        lists?: {
           openPerBoard?: ... | ...;
           totalPerBoard?: ... | ...;
        };
        orgs?: {
           freeBoardsPerOrg?: ... | ...;
           totalMembersPerOrg?: ... | ...;
           totalPerMember?: ... | ...;
           usersPerFreeOrg?: ... | ...;
        };
        reactions?: {
           perAction?: ... | ...;
           uniquePerAction?: ... | ...;
        };
        stickers?: {
           perCard?: ... | ...;
        };
     };
     name?: string | null;
     nodeId?: string;
     uses?: number;
  })[];
  idList?: string;
  idMemberCreator?: string | null;
  idMembers?: string[];
  idMembersVoted?: string[];
  idOrganization?: string | null;
  idShort?: number;
  isTemplate?: boolean;
  labels?: object[];
  limits?: {
     attachments?: {
        perBoard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        perCard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
     boards?: {
        totalAccessRequestsPerBoard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        totalMembersPerBoard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        totalPerMember?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
     cards?: {
        openPerBoard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        openPerList?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        totalPerBoard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        totalPerList?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
     checkItems?: {
        perChecklist?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
     checklists?: {
        perBoard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        perCard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
     customFieldOptions?: {
        perField?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
     customFields?: {
        perBoard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
     labels?: {
        perBoard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
     lists?: {
        openPerBoard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        totalPerBoard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
     orgs?: {
        freeBoardsPerOrg?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        totalMembersPerOrg?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        totalPerMember?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        usersPerFreeOrg?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
     reactions?: {
        perAction?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
        uniquePerAction?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
     stickers?: {
        perCard?: {
           count?: number;
           disableAt: number;
           status: string;
           warnAt: number;
        };
     };
  };
  locationName?: string | null;
  manifest?: unknown;
  manualCoverAttachment?: boolean;
  members?: unknown[];
  membersVoted?: unknown[];
  mirrorSourceId?: string | null;
  mirrorSourceNodeId?: unknown;
  name?: string;
  nodeId?: string;
  originalDesc?: string | null;
  originalName?: string | null;
  pinned?: boolean;
  pluginData?: unknown[];
  pos?: number;
  recurrenceRule?: unknown;
  shortLink?: string;
  shortUrl?: string;
  singleInstrumentationId?: unknown;
  sourceEmail?: unknown;
  start?: Date | null;
  staticMapUrl?: unknown;
  stickers?: unknown[];
  subscribed?: boolean;
  url?: string;
  urlSource?: unknown;
  urlSourceText?: unknown;
}>;

Defined in: api/cards.ts:123

Update a card. Query parameters may also be replaced with a JSON request body instead.

Parameters

ParameterTypeDescription
clientClient-
parameters{ address?: string; closed?: boolean; coordinates?: string; cover?: { value?: { brightness?: "light" | "dark"; color?: | "green" | "yellow" | "orange" | "red" | "purple" | "blue" | "sky" | "lime" | "pink" | "black"; url?: string; }; }; desc?: string; due?: string; dueComplete?: boolean; id: string; idAttachmentCover?: string; idBoard?: string; idLabels?: string; idList?: string; idMembers?: string; locationName?: string; name?: string; pos?: number | "top" | "bottom"; start?: string; subscribed?: boolean; }-
parameters.address?stringFor use with/by the Map View
parameters.closed?booleanWhether the card should be archived (closed: true)
parameters.coordinates?stringFor use with/by the Map View. Should be latitude,longitude
parameters.cover?{ value?: { brightness?: "light" | "dark"; color?: | "green" | "yellow" | "orange" | "red" | "purple" | "blue" | "sky" | "lime" | "pink" | "black"; url?: string; }; }Updates the card's cover
parameters.cover.value?{ brightness?: "light" | "dark"; color?: | "green" | "yellow" | "orange" | "red" | "purple" | "blue" | "sky" | "lime" | "pink" | "black"; url?: string; }An object containing information regarding the card's cover brightness can be sent alongside any of the other parameters, but all of the other parameters are mutually exclusive; you can not have the cover be a color and an idAttachment at the same time.
parameters.cover.value.brightness?"light" | "dark"Determines whether the text on the cover should be dark or light. Setting it to light will make the text on the card cover dark. And vice versa, setting it to dark will make the text on the card cover light
parameters.cover.value.color?| "green" | "yellow" | "orange" | "red" | "purple" | "blue" | "sky" | "lime" | "pink" | "black"One of: pink, yellow, lime, blue, black, orange, red, purple, sky, green
parameters.cover.value.url?stringUsed if making an image the cover. Only Unsplash URLs (https://images.unsplash.com/) work.
parameters.desc?stringThe new description for the card
parameters.due?stringWhen the card is due, or null
parameters.dueComplete?booleanWhether the status of the card is complete
parameters.idstringThe ID of the Card
parameters.idAttachmentCover?stringThe ID of the image attachment the card should use as its cover, or null for none
parameters.idBoard?stringThe ID of the board the card should be on
parameters.idLabels?stringComma-separated list of label IDs
parameters.idList?stringThe ID of the list the card should be in
parameters.idMembers?stringComma-separated list of member IDs
parameters.locationName?stringFor use with/by the Map View
parameters.name?stringThe new name for the card
parameters.pos?number | "top" | "bottom"The position of the card in its list. top, bottom, or a positive float
parameters.start?stringThe start date of a card, or null
parameters.subscribed?booleanWhether the member is should be subscribed to the card

Returns

Promise<{ address?: string | null; agent?: | { conversationId?: string | null; name?: string | null; } | null; attachments?: unknown[]; badges?: { attachments?: number; attachmentsByType?: { trello?: { board?: number; card?: number; }; }; checkItems?: number; checkItemsChecked?: number; checkItemsEarliestDue?: Date | null; comments?: number; description?: boolean; due?: Date | null; dueComplete?: boolean; externalSource?: Record<string, any> | null; fogbugz?: string; lastUpdatedByAi?: boolean; location?: boolean; maliciousAttachments?: number; start?: Date | null; subscribed?: boolean; viewingMemberVoted?: boolean; votes?: number; }; cardRole?: "link" | "board" | "separator" | "mirror" | null; checkItemStates?: object[]; closed?: boolean; coordinates?: string | null; cover?: { brightness?: "light" | "dark"; color?: | "green" | "yellow" | "orange" | "red" | "purple" | "blue" | "sky" | "lime" | "pink" | "black" | null; idAttachment?: string | null; idPlugin?: string | null; idUploadedBackground?: boolean | null; isTemplate?: boolean; size?: "normal"; yPosition?: number; }; creationMethod?: string | null; creationMethodError?: unknown; creationMethodLoadingStartedAt?: unknown; customFieldItems?: unknown[]; dateClosed?: unknown; dateCompleted?: unknown; dateLastActivity?: Date; dateViewedByCreator?: unknown; desc?: string; descData?: { emoji?: Record<string, any>; }; due?: Date | null; dueComplete?: boolean; dueReminder?: string | null; email?: string | null; externalSource?: unknown; faviconUrl?: unknown; id: string; idAttachmentCover?: string | null; idBoard?: string; idChecklists?: ( | string | { checkItems?: object[]; id: string; idBoard?: string; idCard?: string; limits?: { attachments?: { perBoard?: ... | ...; perCard?: ... | ...; }; boards?: { totalAccessRequestsPerBoard?: ... | ...; totalMembersPerBoard?: ... | ...; totalPerMember?: ... | ...; }; cards?: { openPerBoard?: ... | ...; openPerList?: ... | ...; totalPerBoard?: ... | ...; totalPerList?: ... | ...; }; checkItems?: { perChecklist?: ... | ...; }; checklists?: { perBoard?: ... | ...; perCard?: ... | ...; }; customFieldOptions?: { perField?: ... | ...; }; customFields?: { perBoard?: ... | ...; }; labels?: { perBoard?: ... | ...; }; lists?: { openPerBoard?: ... | ...; totalPerBoard?: ... | ...; }; orgs?: { freeBoardsPerOrg?: ... | ...; totalMembersPerOrg?: ... | ...; totalPerMember?: ... | ...; usersPerFreeOrg?: ... | ...; }; reactions?: { perAction?: ... | ...; uniquePerAction?: ... | ...; }; stickers?: { perCard?: ... | ...; }; }; name?: string; pos?: number | "top" | "bottom"; })[]; idLabels?: ( | string | { color?: | "green" | "yellow" | "orange" | "red" | "purple" | "blue" | "sky" | "lime" | "pink" | "black" | null; id: string; idBoard?: string; idOrganization?: string | null; limits?: { attachments?: { perBoard?: ... | ...; perCard?: ... | ...; }; boards?: { totalAccessRequestsPerBoard?: ... | ...; totalMembersPerBoard?: ... | ...; totalPerMember?: ... | ...; }; cards?: { openPerBoard?: ... | ...; openPerList?: ... | ...; totalPerBoard?: ... | ...; totalPerList?: ... | ...; }; checkItems?: { perChecklist?: ... | ...; }; checklists?: { perBoard?: ... | ...; perCard?: ... | ...; }; customFieldOptions?: { perField?: ... | ...; }; customFields?: { perBoard?: ... | ...; }; labels?: { perBoard?: ... | ...; }; lists?: { openPerBoard?: ... | ...; totalPerBoard?: ... | ...; }; orgs?: { freeBoardsPerOrg?: ... | ...; totalMembersPerOrg?: ... | ...; totalPerMember?: ... | ...; usersPerFreeOrg?: ... | ...; }; reactions?: { perAction?: ... | ...; uniquePerAction?: ... | ...; }; stickers?: { perCard?: ... | ...; }; }; name?: string | null; nodeId?: string; uses?: number; })[]; idList?: string; idMemberCreator?: string | null; idMembers?: string[]; idMembersVoted?: string[]; idOrganization?: string | null; idShort?: number; isTemplate?: boolean; labels?: object[]; limits?: { attachments?: { perBoard?: { count?: number; disableAt: number; status: string; warnAt: number; }; perCard?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; boards?: { totalAccessRequestsPerBoard?: { count?: number; disableAt: number; status: string; warnAt: number; }; totalMembersPerBoard?: { count?: number; disableAt: number; status: string; warnAt: number; }; totalPerMember?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; cards?: { openPerBoard?: { count?: number; disableAt: number; status: string; warnAt: number; }; openPerList?: { count?: number; disableAt: number; status: string; warnAt: number; }; totalPerBoard?: { count?: number; disableAt: number; status: string; warnAt: number; }; totalPerList?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; checkItems?: { perChecklist?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; checklists?: { perBoard?: { count?: number; disableAt: number; status: string; warnAt: number; }; perCard?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; customFieldOptions?: { perField?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; customFields?: { perBoard?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; labels?: { perBoard?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; lists?: { openPerBoard?: { count?: number; disableAt: number; status: string; warnAt: number; }; totalPerBoard?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; orgs?: { freeBoardsPerOrg?: { count?: number; disableAt: number; status: string; warnAt: number; }; totalMembersPerOrg?: { count?: number; disableAt: number; status: string; warnAt: number; }; totalPerMember?: { count?: number; disableAt: number; status: string; warnAt: number; }; usersPerFreeOrg?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; reactions?: { perAction?: { count?: number; disableAt: number; status: string; warnAt: number; }; uniquePerAction?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; stickers?: { perCard?: { count?: number; disableAt: number; status: string; warnAt: number; }; }; }; locationName?: string | null; manifest?: unknown; manualCoverAttachment?: boolean; members?: unknown[]; membersVoted?: unknown[]; mirrorSourceId?: string | null; mirrorSourceNodeId?: unknown; name?: string; nodeId?: string; originalDesc?: string | null; originalName?: string | null; pinned?: boolean; pluginData?: unknown[]; pos?: number; recurrenceRule?: unknown; shortLink?: string; shortUrl?: string; singleInstrumentationId?: unknown; sourceEmail?: unknown; start?: Date | null; staticMapUrl?: unknown; stickers?: unknown[]; subscribed?: boolean; url?: string; urlSource?: unknown; urlSourceText?: unknown; }>