Operations
Start Stripe customer and invoice syncs through the Execution API, scoped to your connected account and a date range.
Summary
The Execution API runs named business operations, such as a Stripe invoice sync, against your own workspace. GET /operations lists what you can run and the inputs each operation accepts. POST /operations/{operationId}/runs queues a run and returns a run id to poll.
Every input an operation accepts is either applied to the work or refused with an error. The API never accepts a value and then ignores it.
Capabilities
- List the catalog with each operation's input schema.
- Sync customers from your connected Stripe account, incrementally or from the full history.
- Sync invoices from your connected Stripe account, optionally limited to a range of creation dates.
- Confirm that a sync targets the account you expect by naming it in
stripeAccountId. - Retry a trigger safely with an
Idempotency-Key.
Prerequisites
- A credential with operations.write to start runs, operations.read to list operations and runs.read to read runs. See Authentication.
- A connected Stripe account in Marketplace for the Stripe sync operations.
- An
Idempotency-Keyheader on everyPOST /operations/{operationId}/runsrequest.
Concepts
The workspace comes from the credential
Inputs never name a workspace. A body that includes teamId, or any field the operation does not declare, is rejected with 400.
One Stripe account per workspace
Each workspace connects one Stripe account for sync. stripeAccountId does not select a different account. It confirms the connected one: if the value is not the account connected to your workspace, or Stripe is not connected, the request is rejected with 422 and nothing is queued. The sync also stops with a permanent error if the workspace's connected account changes between the request and the run.
Date ranges are UTC calendar days
startDate and endDate are calendar dates (YYYY-MM-DD) in UTC and match on when Stripe created the invoice.
| Input | What the run reads |
|---|---|
| Neither | The regular incremental sync: invoices created since the last successful sync. |
startDate only | Invoices created from 00:00:00 UTC on startDate onward, then the regular catch-up. |
endDate only | Every invoice created up to 23:59:59.999 UTC on endDate. |
| Both | Only invoices created from 00:00:00 UTC on startDate through 23:59:59.999 UTC on endDate. |
A run with an endDate is a bounded backfill. It reads only that window and leaves the regular nightly sync's progress alone, so it does not make the data count as up to date in Marketplace activity.
Workflow
-
List operations and read the input schema:
curl --request GET \ --url https://api.eigenn.io/v1/operations \ --header "Authorization: Bearer $EIGENN_API_TOKEN" -
Queue a bounded invoice sync for January 2026:
curl --request POST \ --url https://api.eigenn.io/v1/operations/integration.sync.invoices/runs \ --header "Authorization: Bearer $EIGENN_API_TOKEN" \ --header "Content-Type: application/json" \ --header "Idempotency-Key: invoices-2026-01" \ --data '{"input": {"stripeAccountId": "acct_123", "startDate": "2026-01-01", "endDate": "2026-01-31"}}' -
Keep the returned
runIdand read it withGET /runs/{runId}. A run starts asqueued, becomesrunningwhen the worker picks it up, and ends assucceededorfailed. A run is markedfailedonly after the worker's retries are used up, so a run that is stillrunningmay yet recover. A succeeded run'sresultholdsprocessed, the number of records synced, and askippedreason when the sync had nothing to do, such as a disabled entity. A failed run'serrorholds a fixed code and message, not the provider's error text. -
To repeat the same request safely, send the same
Idempotency-Keyand body. The original run is returned with 202.
Behavior specification
Operation inputs
| Operation | Input | Rule |
|---|---|---|
integration.sync.customers | stripeAccountId | Optional. Must be the connected account, otherwise 422. |
integration.sync.customers | fullSync | Optional boolean. true re-reads all customer history. |
integration.sync.invoices | stripeAccountId | Optional. Must be the connected account, otherwise 422. |
integration.sync.invoices | startDate | Optional calendar date. Must not be after endDate or in the future, otherwise 400. |
integration.sync.invoices | endDate | Optional calendar date. Makes the run a bounded backfill. |
Status codes
| Status | When |
|---|---|
| 202 | The run was queued, or the same idempotency key and body were already accepted. |
| 400 | The input is invalid: unknown field, teamId, malformed date, start after end, or start in the future. |
| 403 | The credential lacks the operation's scope. |
| 404 | No operation has that id. |
| 409 | The idempotency key was already used with a different body. |
| 422 | The input names one of your records that does not match your workspace, such as a stripeAccountId that is not your connected account. |
Diagrams
Rendering diagram…
Screenshots
Not applicable: this page describes an API rather than an application screen.
Verification
- Call
GET /operationsand confirm both sync operations liststripeAccountId; the invoice sync also listsstartDateandendDate. - Queue an invoice sync with your connected account and a one-month window. Expect 202 and a
runId. - Repeat the request with the same
Idempotency-Key. Expect 202 with the samerunId. - Send a
stripeAccountIdthat is not your connected account. Expect 422 and no new run inGET /runs. - Send a
startDatein the future, or afterendDate. Expect 400. - After the sync has had time to run, confirm that only invoices created inside the window were added.