Skip to main content
Using TypeScript? Check out our GraphQL SDK for a fully typed client.
You can add multiple labels to a thread with a call to addLabels. Label type IDs passed to this endpoint should not be archived, we return a validation error with code cannot_add_label_using_archived_label_type for any which are submitted. If a label type you provide is already added to the thread we will return a validation error with code label_with_given_type_already_added_to_thread. You can retrieve label type IDs in the Plain UI settings by hovering over a label type and selecting ‘Copy label ID’ from the overflow menu. This operation requires the following permissions:
  • label:create
Mutation
mutation addLabels($input: AddLabelsInput!) {
  addLabels(input: $input) {
    labels {
      id
      createdAt {
        iso8601
      }
    }
    error {
      message
      type
      code
      fields {
        field
        message
        type
      }
    }
  }
}
Variables
{
  "input": {
    "labelTypeIds": ["lt_01HB8BTNTZ58730MX8H5VMKFD5", "lt_01HB8BTNKSCF1FK5ETFVRSDC6G"],
    "threadId": "th_01H8H46YPB2S4MAJM382FG9423"
  }
}