Labels
Retrieves a paginated list of labels. Can be filtered by name.
API key passed in the Authorization header. Format: <api-key>
Filter results by name.
Comma-separated list of relationships to include. Available: name, colour
Sort field. Prefix with - for descending. Available: created_at
Page number for pagination.
1Number of results per page.
Successful response
Unauthenticated
Unauthorized
GET /api/v1/labels HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": 1,
"colour": "blue",
"created_at": "2025-01-15T10:30:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z",
"name": "My Example"
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api.example.com/api/v1/labels",
"per_page": 25,
"to": 1,
"total": 1
},
"links": {
"first": "https://api.example.com/api/v1/labels?page=1",
"last": "https://api.example.com/api/v1/labels?page=1",
"prev": null,
"next": null
}
}Creates a new label.
API key passed in the Authorization header. Format: <api-key>
Successful response
Unauthenticated
Unauthorized
Validation Error
POST /api/v1/labels HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"colour": "blue",
"name": "My Example"
}{
"data": {
"id": 1,
"colour": "blue",
"created_at": "2025-01-15T10:30:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z",
"name": "My Example"
}
}Retrieves the details of a specific label.
API key passed in the Authorization header. Format: <api-key>
The label identifier.
Filter results by name.
Comma-separated list of relationships to include. Available: name, colour
Sort field. Prefix with - for descending. Available: created_at
Page number for pagination.
1Number of results per page.
Successful response
Unauthenticated
Unauthorized
GET /api/v1/labels/{label} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"id": 1,
"colour": "blue",
"created_at": "2025-01-15T10:30:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z",
"name": "My Example"
}
}Updates an existing label.
API key passed in the Authorization header. Format: <api-key>
The label identifier.
Successful response
Unauthenticated
Unauthorized
Validation Error
PUT /api/v1/labels/{label} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"colour": "blue",
"name": "My Example"
}{
"data": {
"id": 1,
"colour": "blue",
"created_at": "2025-01-15T10:30:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z",
"name": "My Example"
}
}Permanently deletes a specific label.
API key passed in the Authorization header. Format: <api-key>
The label identifier.
Successful response
Unauthenticated
Unauthorized
DELETE /api/v1/labels/{label} HTTP/1.1
Host: core.wearepatchworks.com
Authorization: YOUR_API_KEY
Accept: */*
{
"message": "Action completed successfully."
}Last updated
Was this helpful?