Skip to main content
How to update card labels via API
Grazi Sabatini avatar
Written by Grazi Sabatini
Updated over a week ago

🔐 Available on all plans

🎯 For those who want to update labels in mass

⏩ Content Summary:

Learn how to make the most of Pipefy’s API to update many labels at once:

  • Identify your Pipe ID.

  • Use queries in the API to identify the labels you want to update.

  • Use mutations to update labels.

  • Perform the above actions without exceeding your plan's allowable volume.

How to update labels in mass

You can update ir using Pipefy’s API (GraphiQL) to make queries and mutations (actions) in your processes. Learn how to use Pipefy’s API.

📢 Keep in mind: To be able to use the API, you have to have administrator permissions in your organization. Learn more about roles and permissions in Pipefy.

You’ll be doing a bit of coding here, but this article includes all the necessary steps to make these updates.

First, find the pipe containing the labels to be updated; you will need to perform a few actions in it. You will also need to open Pipefy’s API.

Inside the pipe containing labels to be updated

To start, you will need the ID of the pipe containing the labels you want to update in mass.

Open the pipe. The ID is located in the URL:

You will also need the ID of the card containing the labels you want to update.

Open the card. The ID is located in the end of the URL:

In Pipefy’s API

Now that you have the pipe and card IDs, you will need to make two queries to identify the label field ID and label name ID that you want to update.

📢 Keep in mind: We recommend you test one card before adding others; it’s best to confirm results before updating cards in mass. When ready to make mass updates, we suggest you change no more than 30 cards each time to prevent the system from blocking your ID.

Access the API and follow the instructions below:

At the left side of the screen, paste in the first query, replacing the pipe’s ID (the code you identified in the first step) inside the pipe, to find the label field ID.

{
pipe(id:Pipe ID){
start_form_fields{
id
label
}
phases{
name
fields{
id
label
}
}
}
}

The query will look like this:

On the right side, you will have a list with the information requested. Find the label field of your pipe:

Now, paste in the second query, replacing the pipe’s ID inside the pipe, to find the label name ID.

{
pipe(id:Pipe ID)
{
labels
{
id
name
}
}
}

The query will look like this. Now we have the label name ID:

With the information you now have, you can build a mutation by altering the following information.
To update the labels, replace the card_id, field_id, and new_value with the card id, label field id, and label name id, respectively.

mutation{
n1 : updateCardField(input:{card_id: Card ID field_id: "label field id" new_value: "label name id"}) {
clientMutationId
}
}

After running the mutation in GraphiQL, it will look like this:

📢 Keep in mind: Be careful when making updating in mass, as it’s possible for the API to exceed your plan’s volume. Learn more about plan limits.

Related content

🎓 Learn how to do more with less with free Pipefy Academy courses!

🌎 Join the Pipefy Community to ask questions, share ideas, stay tuned for product updates and events, and showcase your knowledge with professionals from around the globe!




Did this answer your question?