AgentInvoiceAgentInvoice
API ReferenceRecurring

Update a recurring schedule

Updates a recurring schedule's configuration. Changes take effect on the next scheduled run. Providing a lineItems array replaces all existing line items.

PATCH
/recurring-schedules/{id}
AuthorizationBearer <token>

API key issued from your AgentInvoice account settings.

In: header

Path Parameters

id*integer

Recurring schedule ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://app.agentinvoice.co/api/recurring-schedules/0" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": 10,
  "clientId": 42,
  "frequency": "monthly",
  "customIntervalDays": 0,
  "currency": "USD",
  "notes": "string",
  "terms": "string",
  "lineItems": [
    {
      "id": 1,
      "description": "Monthly retainer",
      "quantity": "1.00",
      "unitPrice": "2000.00",
      "taxRate": "0.10",
      "amount": "2000.00",
      "sortOrder": 0
    }
  ],
  "autoSend": true,
  "isActive": true,
  "maxInvoices": 0,
  "nextRunAt": "2019-08-24T14:15:22Z",
  "lastRunAt": "2019-08-24T14:15:22Z",
  "totalGenerated": 6,
  "clientName": "string",
  "clientEmail": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "error": "Not found",
  "code": "NOT_FOUND"
}