Skip to content

Labels

4 operations in the WP Waterfall API.

List labels

get/labelsPermalink to List labels

  • Scope: sites:read
  • Permission: sites.read

Lists the company's labels with site_count, the number of sites that carry each, in pages of up to 200 (default 50). A member limited to some sites sees only the labels on their own sites, counted over those sites.

Parameters

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: 1 to 200, and 50 when left out. Default: 50. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200LabelListLabels
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
data requiredarray of LabelThe rows of this page.
data[].id requiredstring (uuid)UUIDv7
data[].name requiredstring
data[].color requiredstring
data[].site_count requiredintegerRange: 0 to any.
data[].created_at requiredstring (date-time)
next_cursor requiredstring or nullSend it as cursor to get the next page. Null on the last page.

Create a label

post/labelsPermalink to Create a label

  • Scope: sites:write
  • Permission: labels.manage

Creates a label with a name of up to 40 characters and a color written as #RRGGBB (default #6b7280). Owners and Admins may call it. Answers 201 with the label.

Parameters

NameInTypeDescription
Idempotency-Key requiredheaderstringSend a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422.

Request body application/json, required, CreateLabelRequest

Fields

NameTypeDescription
name requiredstring
colorstringDefault: #6b7280.

Responses

StatusBodyDescription
201LabelLabel
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

201 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
name requiredstring
color requiredstring
site_count requiredintegerRange: 0 to any.
created_at requiredstring (date-time)

Edit a label

patch/labels/{id}Permalink to Edit a label

  • Scope: sites:write
  • Permission: labels.manage

Changes the label's name, its color, or both. The change shows on every site that carries the label. Owners and Admins may call it.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)The id of the label.
Idempotency-KeyheaderstringOptional on PUT and PATCH. When the call starts a job, a retry with the same key, path, and body within 24 hours returns that job instead of starting another. A different path or body starts a new job.

Request body application/json, required, PatchLabelRequest

Fields

NameTypeDescription
namestring
colorstring

Responses

StatusBodyDescription
200LabelLabel
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)

200 response fields

NameTypeDescription
id requiredstring (uuid)UUIDv7
name requiredstring
color requiredstring
site_count requiredintegerRange: 0 to any.
created_at requiredstring (date-time)

Delete a label

delete/labels/{id}Permalink to Delete a label

  • Scope: sites:write
  • Permission: labels.manage

Deletes the label. It disappears from every site that carries it, and the sites stay. Owners and Admins may call it. Answers 204, or 404 when the label was not found.

Parameters

NameInTypeDescription
id requiredpathstring (uuid)The id of the label.

Responses

StatusBodyDescription
204Deleted
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.
4XXProblemProblem Details (RFC 9457)