Skip to documentation
Billing & payoutsPayroll

Payroll

Methods, permissions, request fields and response schemas for payroll.

Read and search

Retrieve current records, history and status.

Read monthly payrollAgent earnings/payroll for the calendar year and month. Both query parameters are required.GET/payroll/month
Token scope payroll:readActor permission managerAction type read

Query parameters

FieldTypeDescription and constraints
yearRequiredintegerMinimum 2000 · Maximum 2200
monthRequiredintegerMinimum 1 · Maximum 12
Explore this request

Edit example fields and validate the request against its schema.

What you receive

Agent earnings/payroll for the calendar year and month. Both query parameters are required.

Request example · cURL

Replace example IDs and values. Supply the token from your secret store. Each intended write uses one stable $ACTION_KEY.

curl -X GET "$BASE/payroll/month?year=2000&month=1" \
  -H "Authorization: Bearer $ALLPROFILES_API_TOKEN"
Success response schema · HTTP 200
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "month": {
          "type": "integer",
          "minimum": 1,
          "maximum": 12
        },
        "complete": {
          "type": "boolean"
        },
        "runId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "runStatus": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "pending",
            "processing",
            "completed",
            null
          ]
        },
        "totalCents": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "agentUserId": {
                "type": "string",
                "format": "uuid"
              },
              "agentName": {
                "type": "string",
                "minLength": 0,
                "maxLength": 5000
              },
              "amountCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "processing",
                  "paid",
                  "failed",
                  "skipped"
                ]
              },
              "failureReason": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 0,
                "maxLength": 5000
              },
              "breakdown": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "profileId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "displayName": {
                      "type": "string",
                      "minLength": 0,
                      "maxLength": 5000
                    },
                    "daysRented": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "daysInMonth": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 31
                    },
                    "commissionCents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "rentedSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 0,
                      "maxLength": 5000
                    }
                  },
                  "required": [
                    "profileId",
                    "displayName",
                    "daysRented",
                    "daysInMonth",
                    "commissionCents"
                  ],
                  "additionalProperties": true
                }
              },
              "hasPayoutMethod": {
                "type": "boolean"
              },
              "payoutMethod": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "external_wallet"
                    ]
                  },
                  "walletAddress": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 0,
                    "maxLength": 5000
                  },
                  "walletChain": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 0,
                    "maxLength": 5000
                  },
                  "walletCurrency": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 0,
                    "maxLength": 5000
                  }
                },
                "required": [
                  "type",
                  "walletAddress",
                  "walletChain",
                  "walletCurrency"
                ],
                "additionalProperties": true
              }
            },
            "required": [
              "agentUserId",
              "agentName",
              "amountCents",
              "status",
              "failureReason",
              "breakdown",
              "hasPayoutMethod",
              "payoutMethod"
            ],
            "additionalProperties": true
          }
        }
      },
      "required": [
        "year",
        "month",
        "complete",
        "runId",
        "runStatus",
        "totalCents",
        "items"
      ],
      "additionalProperties": true
    }
  }
}
Errors and recovery
400
Invalid JSON, request fields, query, path identifier or missing Idempotency-Key.
401
Missing, invalid, revoked or expired organization API token; its issuing actor must still be the current organization owner.
403
Token scope or actor capability denied, disabled/banned account, or action unavailable.
404
Unknown route or resource not accessible in the bound organization. Cross-tenant resources are not enumerated.
409
Conflicting profile/rental state, duplicate resource, idempotency payload mismatch or operation still in progress.
410
event_cursor_expired: the event cursor is behind retained history. Reconcile current resources and start from the supplied recovery cursor.
422
Business validation/moderation rejected the operation. CHAT_MESSAGE_BLOCKED was not delivered.
429
API rate/concurrency limit exceeded; use backoff and Retry-After when present.
500
Internal operation error. Sensitive implementation details are not returned. Investigate using the request ID before repeating a write.
503
Provider or configuration unavailable; uncertain writes must retain the same Idempotency-Key.

These are documented API errors. The local sandbox checks schema fields only and does not test authorization, moderation or provider behavior.

Financial fields named ...Cents or ...InCents use integer cents. Path fields and nested constraints are shown above and in the downloadable OpenAPI contract.

List payroll runsSearch and paginate payroll records accessible to your organization.GET/payroll/runs
Token scope payroll:readActor permission managerAction type read

Pagination: Default 50, maximum 100. Follow nextCursor with the same search, tenant and resource until null. Creation cutoff excludes later inserts; mutable fields may change between pages. Unsupported search returns 400.

Query parameters

FieldTypeDescription and constraints
limitOptionalintegerMinimum 1 · Maximum 100 · Default: 50
cursorOptionalstringAt least 1 characters · At most 768 characters
searchOptionalstringAt least 0 characters · At most 200 characters
Explore this request

Edit example fields and validate the request against its schema.

What you receive

{data: bounded payroll-runs summaries[], nextCursor: string | null}. Fetch detail endpoints for full records.

Request example · cURL

Replace example IDs and values. Supply the token from your secret store. Each intended write uses one stable $ACTION_KEY.

curl -X GET "$BASE/payroll/runs?limit=50" \
  -H "Authorization: Bearer $ALLPROFILES_API_TOKEN"
Success response schema · HTTP 200
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "organizationId": {
                "type": "string",
                "format": "uuid"
              },
              "periodYear": {
                "type": "integer"
              },
              "periodMonth": {
                "type": "integer",
                "minimum": 1,
                "maximum": 12
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "processing",
                  "completed"
                ]
              },
              "totalCents": {
                "type": "integer"
              },
              "createdById": {
                "type": "string",
                "format": "uuid"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "completedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "organizationId",
              "periodYear",
              "periodMonth",
              "status",
              "totalCents",
              "createdById",
              "createdAt",
              "completedAt"
            ],
            "additionalProperties": false
          },
          "maxItems": 100,
          "minItems": 0
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 768
        }
      },
      "required": [
        "data",
        "nextCursor"
      ],
      "additionalProperties": false
    }
  }
}
Errors and recovery
400
Invalid JSON, request fields, query, path identifier or missing Idempotency-Key.
401
Missing, invalid, revoked or expired organization API token; its issuing actor must still be the current organization owner.
403
Token scope or actor capability denied, disabled/banned account, or action unavailable.
404
Unknown route or resource not accessible in the bound organization. Cross-tenant resources are not enumerated.
409
Conflicting profile/rental state, duplicate resource, idempotency payload mismatch or operation still in progress.
410
event_cursor_expired: the event cursor is behind retained history. Reconcile current resources and start from the supplied recovery cursor.
422
Business validation/moderation rejected the operation. CHAT_MESSAGE_BLOCKED was not delivered.
429
API rate/concurrency limit exceeded; use backoff and Retry-After when present.
500
Internal operation error. Sensitive implementation details are not returned. Investigate using the request ID before repeating a write.
503
Provider or configuration unavailable; uncertain writes must retain the same Idempotency-Key.

These are documented API errors. The local sandbox checks schema fields only and does not test authorization, moderation or provider behavior.

Financial fields named ...Cents or ...InCents use integer cents. Path fields and nested constraints are shown above and in the downloadable OpenAPI contract.

Read a payroll runRun with payment items and states.GET/payroll/runs/:id
Token scope payroll:readActor permission managerAction type read

Path parameters

FieldTypeDescription and constraints
idRequiredstring · uuid

Resource UUID scoped to the current organization.

Explore this request

Edit example fields and validate the request against its schema.

What you receive

Run with payment items and states.

Request example · cURL

Replace example IDs and values. Supply the token from your secret store. Each intended write uses one stable $ACTION_KEY.

curl -X GET "$BASE/payroll/runs/$ID" \
  -H "Authorization: Bearer $ALLPROFILES_API_TOKEN"
Success response schema · HTTP 200
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "run": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid"
            },
            "organizationId": {
              "type": "string",
              "format": "uuid"
            },
            "periodYear": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "periodMonth": {
              "type": "integer",
              "minimum": 1,
              "maximum": 12
            },
            "status": {
              "type": "string",
              "enum": [
                "pending",
                "processing",
                "completed"
              ]
            },
            "totalCents": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "createdById": {
              "type": "string",
              "format": "uuid"
            },
            "createdAt": {
              "type": "string",
              "format": "date-time"
            },
            "completedAt": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            }
          },
          "required": [
            "id",
            "organizationId",
            "periodYear",
            "periodMonth",
            "status",
            "totalCents",
            "createdById",
            "createdAt",
            "completedAt"
          ],
          "additionalProperties": true
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "agentUserId": {
                "type": "string",
                "format": "uuid"
              },
              "agentName": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 0,
                "maxLength": 5000
              },
              "agentEmail": {
                "type": "string",
                "minLength": 0,
                "maxLength": 5000
              },
              "amountCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "processing",
                  "paid",
                  "failed",
                  "skipped"
                ]
              },
              "breakdown": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "profileId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "displayName": {
                      "type": "string",
                      "minLength": 0,
                      "maxLength": 5000
                    },
                    "daysRented": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "daysInMonth": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 31
                    },
                    "commissionCents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "rentedSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 0,
                      "maxLength": 5000
                    }
                  },
                  "required": [
                    "profileId",
                    "displayName",
                    "daysRented",
                    "daysInMonth",
                    "commissionCents"
                  ],
                  "additionalProperties": true
                }
              },
              "bridgeTransferId": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 0,
                "maxLength": 5000
              },
              "failureReason": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 0,
                "maxLength": 5000
              },
              "paidAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "agentUserId",
              "agentName",
              "agentEmail",
              "amountCents",
              "status",
              "breakdown",
              "bridgeTransferId",
              "failureReason",
              "paidAt"
            ],
            "additionalProperties": true
          }
        }
      },
      "required": [
        "run",
        "items"
      ],
      "additionalProperties": true
    }
  }
}
Errors and recovery
400
Invalid JSON, request fields, query, path identifier or missing Idempotency-Key.
401
Missing, invalid, revoked or expired organization API token; its issuing actor must still be the current organization owner.
403
Token scope or actor capability denied, disabled/banned account, or action unavailable.
404
Unknown route or resource not accessible in the bound organization. Cross-tenant resources are not enumerated.
409
Conflicting profile/rental state, duplicate resource, idempotency payload mismatch or operation still in progress.
410
event_cursor_expired: the event cursor is behind retained history. Reconcile current resources and start from the supplied recovery cursor.
422
Business validation/moderation rejected the operation. CHAT_MESSAGE_BLOCKED was not delivered.
429
API rate/concurrency limit exceeded; use backoff and Retry-After when present.
500
Internal operation error. Sensitive implementation details are not returned. Investigate using the request ID before repeating a write.
503
Provider or configuration unavailable; uncertain writes must retain the same Idempotency-Key.

These are documented API errors. The local sandbox checks schema fields only and does not test authorization, moderation or provider behavior.

Financial fields named ...Cents or ...InCents use integer cents. Path fields and nested constraints are shown above and in the downloadable OpenAPI contract.

Read the agent payout ledgerSearch and paginate payroll records accessible to your organization.GET/payouts
Token scope payroll:readActor permission memberAction type read

Pagination: Default 50, maximum 100. Follow nextCursor with the same search, tenant and resource until null. Creation cutoff excludes later inserts; mutable fields may change between pages. Unsupported search returns 400.

Query parameters

FieldTypeDescription and constraints
limitOptionalintegerMinimum 1 · Maximum 100 · Default: 50
cursorOptionalstringAt least 1 characters · At most 768 characters
searchOptionalstringAt least 0 characters · At most 200 characters
Explore this request

Edit example fields and validate the request against its schema.

What you receive

{data: bounded payouts summaries[], nextCursor: string | null}. Fetch detail endpoints for full records.

Request example · cURL

Replace example IDs and values. Supply the token from your secret store. Each intended write uses one stable $ACTION_KEY.

curl -X GET "$BASE/payouts?limit=50" \
  -H "Authorization: Bearer $ALLPROFILES_API_TOKEN"
Success response schema · HTTP 200
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "agentUserId": {
                "type": "string",
                "format": "uuid"
              },
              "agentName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "agentEmail": {
                "type": "string"
              },
              "bookingId": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "amountCents": {
                "type": "integer"
              },
              "currency": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "processing",
                  "paid",
                  "failed",
                  "cancelled"
                ]
              },
              "transferId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "failureReason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "paidAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "agentUserId",
              "agentName",
              "agentEmail",
              "bookingId",
              "amountCents",
              "currency",
              "status",
              "transferId",
              "failureReason",
              "createdAt",
              "paidAt"
            ],
            "additionalProperties": false
          },
          "maxItems": 100,
          "minItems": 0
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ],
          "minLength": 1,
          "maxLength": 768
        }
      },
      "required": [
        "data",
        "nextCursor"
      ],
      "additionalProperties": false
    }
  }
}
Errors and recovery
400
Invalid JSON, request fields, query, path identifier or missing Idempotency-Key.
401
Missing, invalid, revoked or expired organization API token; its issuing actor must still be the current organization owner.
403
Token scope or actor capability denied, disabled/banned account, or action unavailable.
404
Unknown route or resource not accessible in the bound organization. Cross-tenant resources are not enumerated.
409
Conflicting profile/rental state, duplicate resource, idempotency payload mismatch or operation still in progress.
410
event_cursor_expired: the event cursor is behind retained history. Reconcile current resources and start from the supplied recovery cursor.
422
Business validation/moderation rejected the operation. CHAT_MESSAGE_BLOCKED was not delivered.
429
API rate/concurrency limit exceeded; use backoff and Retry-After when present.
500
Internal operation error. Sensitive implementation details are not returned. Investigate using the request ID before repeating a write.
503
Provider or configuration unavailable; uncertain writes must retain the same Idempotency-Key.

These are documented API errors. The local sandbox checks schema fields only and does not test authorization, moderation or provider behavior.

Financial fields named ...Cents or ...InCents use integer cents. Path fields and nested constraints are shown above and in the downloadable OpenAPI contract.

Lifecycle and actions

Manage transitions, delivery and provider workflows.

Refresh pending monthly payrollProvider-refreshed pending payout states; may trigger existing completion notifications.POST/payroll/month/sync
Token scope payroll:writeActor permission managerAction type external

This action needs separately enabled financial automation. Check deployed capabilities before using it; its scope may be unavailable in the token picker.

Send Idempotency-Key. Retry the same intended action with the same key and exact payload to retrieve its saved result.

Request body

FieldTypeDescription and constraints
yearRequiredintegerMinimum 2000 · Maximum 2200
monthRequiredintegerMinimum 1 · Maximum 12
Explore this request

Edit example fields and validate the request against its schema.

What you receive

Provider-refreshed pending payout states; may trigger existing completion notifications.

Request example · cURL

Replace example IDs and values. Supply the token from your secret store. Each intended write uses one stable $ACTION_KEY.

curl -X POST "$BASE/payroll/month/sync" \
  -H "Authorization: Bearer $ALLPROFILES_API_TOKEN" \
  -H "Idempotency-Key: $ACTION_KEY" \
  -H "Content-Type: application/json" \
  --data '{"year":2000,"month":1}'
Full JSON request schema
{
  "type": "object",
  "properties": {
    "year": {
      "type": "integer",
      "minimum": 2000,
      "maximum": 2200
    },
    "month": {
      "type": "integer",
      "minimum": 1,
      "maximum": 12
    }
  },
  "required": [
    "year",
    "month"
  ],
  "additionalProperties": false
}
Success response schema · HTTP 201
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "month": {
          "type": "integer",
          "minimum": 1,
          "maximum": 12
        },
        "complete": {
          "type": "boolean"
        },
        "runId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "runStatus": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "pending",
            "processing",
            "completed",
            null
          ]
        },
        "totalCents": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "agentUserId": {
                "type": "string",
                "format": "uuid"
              },
              "agentName": {
                "type": "string",
                "minLength": 0,
                "maxLength": 5000
              },
              "amountCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "processing",
                  "paid",
                  "failed",
                  "skipped"
                ]
              },
              "failureReason": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 0,
                "maxLength": 5000
              },
              "breakdown": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "profileId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "displayName": {
                      "type": "string",
                      "minLength": 0,
                      "maxLength": 5000
                    },
                    "daysRented": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "daysInMonth": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 31
                    },
                    "commissionCents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "rentedSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 0,
                      "maxLength": 5000
                    }
                  },
                  "required": [
                    "profileId",
                    "displayName",
                    "daysRented",
                    "daysInMonth",
                    "commissionCents"
                  ],
                  "additionalProperties": true
                }
              },
              "hasPayoutMethod": {
                "type": "boolean"
              },
              "payoutMethod": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "external_wallet"
                    ]
                  },
                  "walletAddress": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 0,
                    "maxLength": 5000
                  },
                  "walletChain": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 0,
                    "maxLength": 5000
                  },
                  "walletCurrency": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 0,
                    "maxLength": 5000
                  }
                },
                "required": [
                  "type",
                  "walletAddress",
                  "walletChain",
                  "walletCurrency"
                ],
                "additionalProperties": true
              }
            },
            "required": [
              "agentUserId",
              "agentName",
              "amountCents",
              "status",
              "failureReason",
              "breakdown",
              "hasPayoutMethod",
              "payoutMethod"
            ],
            "additionalProperties": true
          }
        }
      },
      "required": [
        "year",
        "month",
        "complete",
        "runId",
        "runStatus",
        "totalCents",
        "items"
      ],
      "additionalProperties": true
    }
  }
}
Errors and recovery
400
Invalid JSON, request fields, query, path identifier or missing Idempotency-Key.
401
Missing, invalid, revoked or expired organization API token; its issuing actor must still be the current organization owner.
403
Token scope or actor capability denied, disabled/banned account, or action unavailable.
404
Unknown route or resource not accessible in the bound organization. Cross-tenant resources are not enumerated.
409
Conflicting profile/rental state, duplicate resource, idempotency payload mismatch or operation still in progress.
410
event_cursor_expired: the event cursor is behind retained history. Reconcile current resources and start from the supplied recovery cursor.
422
Business validation/moderation rejected the operation. CHAT_MESSAGE_BLOCKED was not delivered.
429
API rate/concurrency limit exceeded; use backoff and Retry-After when present.
500
Internal operation error. Sensitive implementation details are not returned. Investigate using the request ID before repeating a write.
503
Provider or configuration unavailable; uncertain writes must retain the same Idempotency-Key.

These are documented API errors. The local sandbox checks schema fields only and does not test authorization, moderation or provider behavior.

Financial fields named ...Cents or ...InCents use integer cents. Path fields and nested constraints are shown above and in the downloadable OpenAPI contract.

Create or pay monthly payrollThis action can move funds.POST/payroll/pay
Token scope payroll:payActor permission payAgentsAction type financial

This action needs separately enabled financial automation. Check deployed capabilities before using it; its scope may be unavailable in the token picker.

Send Idempotency-Key. Retry the same intended action with the same key and exact payload to retrieve its saved result.

Before you use it

This action can move funds. Requires owner or canPayAgents grant and explicit token scope.

Request body

FieldTypeDescription and constraints
yearRequiredintegerMinimum 2000 · Maximum 2200
monthRequiredintegerMinimum 1 · Maximum 12
agentUserIdsRequiredarray of stringAt least 0 items · At most 1000 items
modeRequiredstringOne of: "auto", "manual"
Explore this request

Edit example fields and validate the request against its schema.

What you receive

Payroll result/run; auto executes provider payment when configured; manual records off-platform handling.

Request example · cURL

Replace example IDs and values. Supply the token from your secret store. Each intended write uses one stable $ACTION_KEY.

curl -X POST "$BASE/payroll/pay" \
  -H "Authorization: Bearer $ALLPROFILES_API_TOKEN" \
  -H "Idempotency-Key: $ACTION_KEY" \
  -H "Content-Type: application/json" \
  --data '{"year":2026,"month":10,"agentUserIds":["923ee3b1-2b21-4ce3-8c2c-679e22867541"],"mode":"manual"}'
Full JSON request schema
{
  "type": "object",
  "properties": {
    "year": {
      "type": "integer",
      "minimum": 2000,
      "maximum": 2200
    },
    "month": {
      "type": "integer",
      "minimum": 1,
      "maximum": 12
    },
    "agentUserIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 1000,
      "minItems": 0
    },
    "mode": {
      "type": "string",
      "enum": [
        "auto",
        "manual"
      ]
    }
  },
  "required": [
    "year",
    "month",
    "agentUserIds",
    "mode"
  ],
  "additionalProperties": false
}
Success response schema · HTTP 201
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "month": {
          "type": "integer",
          "minimum": 1,
          "maximum": 12
        },
        "complete": {
          "type": "boolean"
        },
        "runId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "runStatus": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "pending",
            "processing",
            "completed",
            null
          ]
        },
        "totalCents": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "agentUserId": {
                "type": "string",
                "format": "uuid"
              },
              "agentName": {
                "type": "string",
                "minLength": 0,
                "maxLength": 5000
              },
              "amountCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "processing",
                  "paid",
                  "failed",
                  "skipped"
                ]
              },
              "failureReason": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 0,
                "maxLength": 5000
              },
              "breakdown": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "profileId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "displayName": {
                      "type": "string",
                      "minLength": 0,
                      "maxLength": 5000
                    },
                    "daysRented": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "daysInMonth": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 31
                    },
                    "commissionCents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "rentedSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 0,
                      "maxLength": 5000
                    }
                  },
                  "required": [
                    "profileId",
                    "displayName",
                    "daysRented",
                    "daysInMonth",
                    "commissionCents"
                  ],
                  "additionalProperties": true
                }
              },
              "hasPayoutMethod": {
                "type": "boolean"
              },
              "payoutMethod": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "external_wallet"
                    ]
                  },
                  "walletAddress": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 0,
                    "maxLength": 5000
                  },
                  "walletChain": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 0,
                    "maxLength": 5000
                  },
                  "walletCurrency": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 0,
                    "maxLength": 5000
                  }
                },
                "required": [
                  "type",
                  "walletAddress",
                  "walletChain",
                  "walletCurrency"
                ],
                "additionalProperties": true
              }
            },
            "required": [
              "agentUserId",
              "agentName",
              "amountCents",
              "status",
              "failureReason",
              "breakdown",
              "hasPayoutMethod",
              "payoutMethod"
            ],
            "additionalProperties": true
          }
        }
      },
      "required": [
        "year",
        "month",
        "complete",
        "runId",
        "runStatus",
        "totalCents",
        "items"
      ],
      "additionalProperties": true
    }
  }
}
Errors and recovery
400
Invalid JSON, request fields, query, path identifier or missing Idempotency-Key.
401
Missing, invalid, revoked or expired organization API token; its issuing actor must still be the current organization owner.
403
Token scope or actor capability denied, disabled/banned account, or action unavailable.
404
Unknown route or resource not accessible in the bound organization. Cross-tenant resources are not enumerated.
409
Conflicting profile/rental state, duplicate resource, idempotency payload mismatch or operation still in progress.
410
event_cursor_expired: the event cursor is behind retained history. Reconcile current resources and start from the supplied recovery cursor.
422
Business validation/moderation rejected the operation. CHAT_MESSAGE_BLOCKED was not delivered.
429
API rate/concurrency limit exceeded; use backoff and Retry-After when present.
500
Internal operation error. Sensitive implementation details are not returned. Investigate using the request ID before repeating a write.
503
Provider or configuration unavailable; uncertain writes must retain the same Idempotency-Key.

These are documented API errors. The local sandbox checks schema fields only and does not test authorization, moderation or provider behavior.

Financial fields named ...Cents or ...InCents use integer cents. Path fields and nested constraints are shown above and in the downloadable OpenAPI contract.

Execute payroll itemsExecution result. Omitting itemIds asks the existing service to execute eligible items; supply explicit IDs for deliberate selection.POST/payroll/runs/:id/execute
Token scope payroll:payActor permission payAgentsAction type financial

This action needs separately enabled financial automation. Check deployed capabilities before using it; its scope may be unavailable in the token picker.

Send Idempotency-Key. Retry the same intended action with the same key and exact payload to retrieve its saved result.

Path parameters

FieldTypeDescription and constraints
idRequiredstring · uuid

Resource UUID scoped to the current organization.

Request body

FieldTypeDescription and constraints
itemIdsOptionalarray of stringAt least 0 items · At most 1000 items
Explore this request

Edit example fields and validate the request against its schema.

What you receive

Execution result. Omitting itemIds asks the existing service to execute eligible items; supply explicit IDs for deliberate selection.

Request example · cURL

Replace example IDs and values. Supply the token from your secret store. Each intended write uses one stable $ACTION_KEY.

curl -X POST "$BASE/payroll/runs/$ID/execute" \
  -H "Authorization: Bearer $ALLPROFILES_API_TOKEN" \
  -H "Idempotency-Key: $ACTION_KEY" \
  -H "Content-Type: application/json" \
  --data '{}'
Full JSON request schema
{
  "type": "object",
  "properties": {
    "itemIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 1000,
      "minItems": 0
    }
  },
  "required": [],
  "additionalProperties": false
}
Success response schema · HTTP 201
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "completed",
            "processing"
          ]
        }
      },
      "required": [
        "status"
      ],
      "additionalProperties": true
    }
  }
}
Errors and recovery
400
Invalid JSON, request fields, query, path identifier or missing Idempotency-Key.
401
Missing, invalid, revoked or expired organization API token; its issuing actor must still be the current organization owner.
403
Token scope or actor capability denied, disabled/banned account, or action unavailable.
404
Unknown route or resource not accessible in the bound organization. Cross-tenant resources are not enumerated.
409
Conflicting profile/rental state, duplicate resource, idempotency payload mismatch or operation still in progress.
410
event_cursor_expired: the event cursor is behind retained history. Reconcile current resources and start from the supplied recovery cursor.
422
Business validation/moderation rejected the operation. CHAT_MESSAGE_BLOCKED was not delivered.
429
API rate/concurrency limit exceeded; use backoff and Retry-After when present.
500
Internal operation error. Sensitive implementation details are not returned. Investigate using the request ID before repeating a write.
503
Provider or configuration unavailable; uncertain writes must retain the same Idempotency-Key.

These are documented API errors. The local sandbox checks schema fields only and does not test authorization, moderation or provider behavior.

Financial fields named ...Cents or ...InCents use integer cents. Path fields and nested constraints are shown above and in the downloadable OpenAPI contract.

Record off-platform payroll paymentUpdated payment records; does not prove an external payment occurred.POST/payroll/runs/:id/mark-paid
Token scope payroll:payActor permission payAgentsAction type financial

This action needs separately enabled financial automation. Check deployed capabilities before using it; its scope may be unavailable in the token picker.

Send Idempotency-Key. Retry the same intended action with the same key and exact payload to retrieve its saved result.

Path parameters

FieldTypeDescription and constraints
idRequiredstring · uuid

Resource UUID scoped to the current organization.

Request body

FieldTypeDescription and constraints
itemIdsRequiredarray of stringAt least 0 items · At most 1000 items
Explore this request

Edit example fields and validate the request against its schema.

What you receive

Updated payment records; does not prove an external payment occurred.

Request example · cURL

Replace example IDs and values. Supply the token from your secret store. Each intended write uses one stable $ACTION_KEY.

curl -X POST "$BASE/payroll/runs/$ID/mark-paid" \
  -H "Authorization: Bearer $ALLPROFILES_API_TOKEN" \
  -H "Idempotency-Key: $ACTION_KEY" \
  -H "Content-Type: application/json" \
  --data '{"itemIds":["923ee3b1-2b21-4ce3-8c2c-679e22867541"]}'
Full JSON request schema
{
  "type": "object",
  "properties": {
    "itemIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 1000,
      "minItems": 0
    }
  },
  "required": [
    "itemIds"
  ],
  "additionalProperties": false
}
Success response schema · HTTP 201
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "completed",
            "processing"
          ]
        }
      },
      "required": [
        "status"
      ],
      "additionalProperties": true
    }
  }
}
Errors and recovery
400
Invalid JSON, request fields, query, path identifier or missing Idempotency-Key.
401
Missing, invalid, revoked or expired organization API token; its issuing actor must still be the current organization owner.
403
Token scope or actor capability denied, disabled/banned account, or action unavailable.
404
Unknown route or resource not accessible in the bound organization. Cross-tenant resources are not enumerated.
409
Conflicting profile/rental state, duplicate resource, idempotency payload mismatch or operation still in progress.
410
event_cursor_expired: the event cursor is behind retained history. Reconcile current resources and start from the supplied recovery cursor.
422
Business validation/moderation rejected the operation. CHAT_MESSAGE_BLOCKED was not delivered.
429
API rate/concurrency limit exceeded; use backoff and Retry-After when present.
500
Internal operation error. Sensitive implementation details are not returned. Investigate using the request ID before repeating a write.
503
Provider or configuration unavailable; uncertain writes must retain the same Idempotency-Key.

These are documented API errors. The local sandbox checks schema fields only and does not test authorization, moderation or provider behavior.

Financial fields named ...Cents or ...InCents use integer cents. Path fields and nested constraints are shown above and in the downloadable OpenAPI contract.

Pay one agent payoutPayout execution result; existing durable payroll/payment checks still apply.POST/payouts/:id/pay
Token scope payroll:payActor permission payAgentsAction type financial

This action needs separately enabled financial automation. Check deployed capabilities before using it; its scope may be unavailable in the token picker.

Send Idempotency-Key. Retry the same intended action with the same key and exact payload to retrieve its saved result.

Path parameters

FieldTypeDescription and constraints
idRequiredstring · uuid

Resource UUID scoped to the current organization.

Explore this request

Edit example fields and validate the request against its schema.

What you receive

Payout execution result; existing durable payroll/payment checks still apply.

Request example · cURL

Replace example IDs and values. Supply the token from your secret store. Each intended write uses one stable $ACTION_KEY.

curl -X POST "$BASE/payouts/$ID/pay" \
  -H "Authorization: Bearer $ALLPROFILES_API_TOKEN" \
  -H "Idempotency-Key: $ACTION_KEY"
Success response schema · HTTP 201
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "minLength": 0,
          "maxLength": 5000
        },
        "transferId": {
          "type": "string",
          "minLength": 0,
          "maxLength": 5000
        }
      },
      "required": [
        "status"
      ],
      "additionalProperties": true
    }
  }
}
Errors and recovery
400
Invalid JSON, request fields, query, path identifier or missing Idempotency-Key.
401
Missing, invalid, revoked or expired organization API token; its issuing actor must still be the current organization owner.
403
Token scope or actor capability denied, disabled/banned account, or action unavailable.
404
Unknown route or resource not accessible in the bound organization. Cross-tenant resources are not enumerated.
409
Conflicting profile/rental state, duplicate resource, idempotency payload mismatch or operation still in progress.
410
event_cursor_expired: the event cursor is behind retained history. Reconcile current resources and start from the supplied recovery cursor.
422
Business validation/moderation rejected the operation. CHAT_MESSAGE_BLOCKED was not delivered.
429
API rate/concurrency limit exceeded; use backoff and Retry-After when present.
500
Internal operation error. Sensitive implementation details are not returned. Investigate using the request ID before repeating a write.
503
Provider or configuration unavailable; uncertain writes must retain the same Idempotency-Key.

These are documented API errors. The local sandbox checks schema fields only and does not test authorization, moderation or provider behavior.

Financial fields named ...Cents or ...InCents use integer cents. Path fields and nested constraints are shown above and in the downloadable OpenAPI contract.