List routines
Lists the workspace's routines newest first, each with its prompt, trigger and last run. Supports searchTerm against the name, filters on ownerUserId, createdAt and updatedAt, sortDescriptor and pagination. Send an empty object for the first page. Requires: read permission on routines.
Authorization
apiKeyAuth x-api-key<token>
API key authentication. Create an API key in your user profile and include it in the x-api-key header.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://customermates.com/api/v1/routines/list" \ -H "Content-Type: application/json" \ -d '{ "searchTerm": "deal", "pagination": { "page": 1, "pageSize": 25 } }'{
"items": [
{
"id": "0b5f3c1e-7a2d-4c8e-9f10-2a3b4c5d6e7f",
"ownerUserId": "3c2b1a09-8f7e-4d6c-9b5a-4f3e2d1c0b9a",
"owner": {
"id": "3c2b1a09-8f7e-4d6c-9b5a-4f3e2d1c0b9a",
"firstName": "Ada",
"lastName": "Lovelace",
"avatarUrl": null,
"status": "active"
},
"name": "Brief new enterprise deals",
"prompt": "Summarize the new deal and suggest the next step for its owner.",
"enabled": true,
"triggerKind": "event",
"cronExpression": null,
"timezone": null,
"triggerEvents": [
"record.created"
],
"triggerFilters": [],
"recordTrigger": {
"query": {
"typeId": "6f1d2c3b-4a59-4e8f-8a7b-1c2d3e4f5a6b",
"filters": [
{
"fieldId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"operator": "eq",
"value": {
"kind": "text",
"value": "Enterprise"
}
}
],
"relationships": []
},
"changedFieldIds": []
},
"recordSources": null,
"debounceSeconds": 0,
"nextRunAt": null,
"lastRunAt": null,
"lastRunStatus": null,
"disabledReason": null,
"createdAt": "2026-10-12T08:00:00.000Z",
"updatedAt": "2026-10-12T08:00:00.000Z"
}
],
"searchTerm": "deal",
"pagination": {
"page": 1,
"pageSize": 25,
"totalPages": 1,
"total": 1
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}Empty