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
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many rows to return in one page: 1 to 200, and 50 when left out. Default: 50. Range: 1 to 200. |
cursor | query | string | The next_cursor of the page before. Leave it out for the first page. |
Responses
| Status | Body | Description |
|---|---|---|
200 | LabelList | Labels |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
data required | array of Label | The rows of this page. |
data[].id required | string (uuid) | UUIDv7 |
data[].name required | string | |
data[].color required | string | |
data[].site_count required | integer | Range: 0 to any. |
data[].created_at required | string (date-time) | |
next_cursor required | string or null | Send 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
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send 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
| Name | Type | Description |
|---|---|---|
name required | string | |
color | string | Default: #6b7280. |
Responses
| Status | Body | Description |
|---|---|---|
201 | Label | Label |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
201 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
name required | string | |
color required | string | |
site_count required | integer | Range: 0 to any. |
created_at required | string (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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the label. |
Idempotency-Key | header | string | Optional 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
| Name | Type | Description |
|---|---|---|
name | string | |
color | string |
Responses
| Status | Body | Description |
|---|---|---|
200 | Label | Label |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
name required | string | |
color required | string | |
site_count required | integer | Range: 0 to any. |
created_at required | string (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
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the label. |
Responses
| Status | Body | Description |
|---|---|---|
204 | Deleted | |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |