Google Labels API

Operations related to Labels

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 17

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v2/labels List Drive labels · Google Retrieve Labels #
Ask an LLM
“What labels are defined in my Drive account?”
“Can I list only published labels?”
Tell an agent
List all Drive labels.
List labels with at least role {minimumRole}.
POST /v2/labels Create a Drive label · Google Create Labels #
Ask an LLM
“How do I create a new label for Drive items?”
“Can I set a custom learn-more URL on a new label?”
Tell an agent
Create a label of type {labelType}.
Create a label with learn-more URL {learnMoreUri}.
DELETE /v2/{name} Revoke a label's permission · Google Delete Name #
Ask an LLM
“How do I revoke a user's permission on a label?”
“Can I remove a group's access to a label?”
Tell an agent destructive · confirm first
Delete permission {name} on the label.
Revoke the group permission {name} from the label.
POST /v2/{name}:delta Apply draft changes to a label · Google Create Name:delta #
Ask an LLM
“How do I apply a batch of update requests to a label's draft?”
“Will invalid label update requests roll back the whole batch?”
Tell an agent
Apply update requests {requests} to label {name}.
Draft a new revision of label {name} with {requests}.
POST /v2/{name}:disable Disable a published label · Google Create Name:disable #
Ask an LLM
“How do I disable a label that's already published?”
“What happens to a label's draft when I disable it?”
Tell an agent destructive · confirm first
Disable label {name}.
Disable label {name} with disabled policy {disabledPolicy}.
POST /v2/{name}:enable Re-enable a disabled label · Google Create Name:enable #
Ask an LLM
“How do I bring a disabled label back to its published state?”
“Can I restore a label that was turned off?”
Tell an agent
Enable disabled label {name}.
Restore label {name} to published state.
POST /v2/{name}:publish Publish a label's draft changes · Google Create Name:publish #
Ask an LLM
“How do I publish the draft changes to a label?”
“Can I undo a label's draft changes after publishing?”
Tell an agent
Publish the draft of label {name}.
Publish label {name} with language {languageCode}.
POST /v2/{name}:updateLabelCopyMode Change how a label copies on Drive items · Google Create Name:updatelabelcopymode #
Ask an LLM
“How do I make a label's field values copy when a Drive item is copied?”
“Can I change a label's copy mode without publishing it?”
Tell an agent
Set label {name}'s copy mode to {copyMode}.
Change how label {name} copies on Drive items to {copyMode}.
GET /v2/{parent}/locks List locks on a label · Google Retrieve Parent Locks #
Ask an LLM
“Which fields of a label are locked?”
“Can I see the locks applied to a label?”
Tell an agent
List locks on label {parent}.
Show which fields of label {parent} are locked.
GET /v2/{parent}/permissions List a label's permissions · Google Retrieve Parent Permissions #
Ask an LLM
“Who has access to a particular label?”
“Can I list the permissions on a label as an admin?”
Tell an agent
List permissions on label {parent}.
Show who can edit label {parent}.
POST /v2/{parent}/permissions Grant a user or group access to a label · Google Create Parent Permissions #
Ask an LLM
“How do I give a user permission on a label?”
“Can I grant a group access to a label?”
Tell an agent
Grant {role} permission on label {parent} to {email}.
Give group {group} the {role} role on label {parent}.
PATCH /v2/{parent}/permissions Update a Drive label's permissions · Google Patch Parent Permissions #
Ask an LLM
“How do I give a user or group permission to a Drive label?”
“Do label permissions need to be published after I change them?”
Tell an agent
Update the permissions on label {parent} to give {email} the {role} role.
Grant group {group} the {role} role on label {parent}.
POST /v2/{parent}/permissions:batchDelete Delete Drive label permissions in bulk · Google Create Parent Permissions:batchdelete #
Ask an LLM
“Can I revoke several Drive label permissions at once?”
“What happens to a label when all its permissions are removed?”
Tell an agent destructive · confirm first
Delete the listed permissions from label {parent}.
Revoke these Drive label permissions in one batch: {requests}.
POST /v2/{parent}/permissions:batchUpdate Update Drive label permissions in bulk · Google Create Parent Permissions:batchupdate #
Ask an LLM
“Can I change several Drive label permissions in one request?”
“How do I add a new permission to a label without publishing it?”
Tell an agent
Apply these permission changes to label {parent}: {requests}.
Bulk update the Drive label permissions on {parent} to {requests}.
GET /gmail/v1/users/{userId}/labels List a Gmail user's labels · Google List Labels #
Ask an LLM
“What labels exist in my Gmail account?”
“Can I see all the labels a user has set up?”
Tell an agent
List all labels in the mailbox of user {userId}.
Show every Gmail label for {userId}.
PUT /gmail/v1/users/{userId}/labels/{id} Replace a Gmail label · Google Update Labels #
Ask an LLM
“How do I overwrite a Gmail label's settings completely?”
“Can I replace a label's details with a full new definition?”
Tell an agent
Replace the Gmail label {id} for user {userId} with this definition.
Overwrite label {id} in {userId}'s mailbox.
PATCH /gmail/v1/users/{userId}/labels/{id} Patch a Gmail label · Google Patch Labels #
Ask an LLM
“Can I change just one field of a Gmail label without resending the whole thing?”
“How do I rename a label that already exists?”
Tell an agent
Patch the Gmail label {id} for user {userId} with these changes.
Rename label {id} in {userId}'s mailbox to something else.

Documentation

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google:google-labels-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-labels-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Labels API
  version: '1.0'
  description: 'Operations tagged Labels across 2 of this provider''s published API definitions: google-drive-labels-api-openapi.yml, google-gmail-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://drivelabels.googleapis.com
  description: Google Drive Labels API Server
- url: https://gmail.googleapis.com
  description: Google Gmail API Server
tags:


# --- truncated at 32 KB (128 KB total) ---
# Full source: https://artifacts.apis.io/google/openapi/google-labels-api-openapi.yml