API Documentation
This page provides a comprehensive overview of the API endpoints available for managing various aspects of the system, including authentication, payments, contracts, clients, and subscriptions.
Authentication
Authentication is a crucial part of our API. It ensures that only authorized users can access the system and perform operations.
Authenticate User
This endpoint authenticates a user and creates a Zapier session.
Request Body
- Name
email- Type
- string
- Description
The user's email address.
- Name
password- Type
- string
- Description
The user's password.
Request
curl -X POST https://v2.moreflow.io/zapier/auth \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "userPassword"}'
Get Current User
This endpoint retrieves the current user's session key and profile ID.
Request
curl https://v2.moreflow.io/zapier/auth/me \
-H "X-Zapier-Session-Key: {sessionKey}"
-H "X-Zapier-Shared-Secret: {sharedSecret}"
Payments
Manage payments and invoices through these endpoints.
List Payments
This endpoint retrieves a list of recent payments/invoices.
Headers
- Name
X-Zapier-Session-Key-Id- Type
- string
- Description
Obtained from the authentication process.
- Name
X-Zapier-Shared-Secret- Type
- string
- Description
Is a shared fixed value to provide an additional layer of security.
Note: Limited to 10 results by default, can be adjusted with ZAPIER_SAMPLE_LIMIT env variable.
Request
curl https://v2.moreflow.io/zapier/payments \
-H "X-Zapier-Session-Key: {sessionKey}"
-H "X-Zapier-Shared-Secret: {sharedSecret}"
Get Single Payment
This endpoint retrieves details of a specific payment/invoice.
Parameters
- Name
invoiceId- Type
- string
- Description
ID of the invoice.
Request
curl https://v2.moreflow.io/zapier/payments/single/123 \
-H "X-Zapier-Session-Key: {sessionKey}"
-H "X-Zapier-Shared-Secret: {sharedSecret}"
Contracts
Manage contracts through these endpoints.
List Contracts
This endpoint retrieves a list of contracts.
Headers
- Name
X-Zapier-Session-Key-Id- Type
- string
- Description
Obtained from the authentication process.
- Name
X-Zapier-Shared-Secret- Type
- string
- Description
Is a shared fixed value to provide an additional layer of security.
Query Parameters
- Name
event_type- Type
- string
- Description
Optional, filters contracts by event type.
Note: Limited to 10 results by default, can be adjusted with ZAPIER_SAMPLE_LIMIT env variable.
Request
curl "https://v2.moreflow.io/zapier/contracts?event_type=example" \
-H "X-Zapier-Session-Key: {sessionKey}"
-H "X-Zapier-Shared-Secret: {sharedSecret}"
Get Single Contract
This endpoint retrieves details of a specific contract.
Parameters
- Name
contractId- Type
- string
- Description
ID of the contract.
Request
curl https://v2.moreflow.io/zapier/contracts/single/123 \
-H "X-Zapier-Session-Key: {sessionKey}"
-H "X-Zapier-Shared-Secret: {sharedSecret}"
Clients
Manage clients through these endpoints.
List Clients
This endpoint retrieves a list of clients.
Headers
- Name
X-Zapier-Session-Key-Id- Type
- string
- Description
Obtained from the authentication process.
- Name
X-Zapier-Shared-Secret- Type
- string
- Description
Is a shared fixed value to provide an additional layer of security.
Note: Limited to 1000 results by default, can be adjusted with ZAPIER_POLL_LIMIT env variable.
Request
curl https://v2.moreflow.io/zapier/clients \
-H "X-Zapier-Session-Key: {sessionKey}"
-H "X-Zapier-Shared-Secret: {sharedSecret}"
Create Client
This endpoint creates a new client.
Headers
- Name
X-Zapier-Session-Key-Id- Type
- string
- Description
Obtained from the authentication process.
- Name
X-Zapier-Shared-Secret- Type
- string
- Description
Is a shared fixed value to provide an additional layer of security.
Request Body
Client object
Request
curl -X POST https://v2.moreflow.io/zapier/clients \
-H "X-Zapier-Session-Key: {sessionKey}"
-H "X-Zapier-Shared-Secret: {sharedSecret}"
-H "Content-Type: application/json" \
-d '{"name": "New Client", "email": "client@example.com"}'
Subscriptions
Manage Zapier subscriptions through these endpoints.
Create Subscription
This endpoint creates a new Zapier subscription.
Headers
- Name
X-Zapier-Session-Key-Id- Type
- string
- Description
Obtained from the authentication process.
- Name
X-Zapier-Shared-Secret- Type
- string
- Description
Is a shared fixed value to provide an additional layer of security.
Request Body
Subscription object
Request
curl -X POST https://v2.moreflow.io/zapier/subscriptions \
-H "X-Zapier-Session-Key: {sessionKey}"
-H "X-Zapier-Shared-Secret: {sharedSecret}"
-H "Content-Type: application/json" \
-d '{"event_type": "new_payment", "target_url": "https://hooks.zapier.com/example"}'
Delete Subscription
This endpoint deletes a specific Zapier subscription.
Headers
- Name
X-Zapier-Session-Key-Id- Type
- string
- Description
Obtained from the authentication process.
- Name
X-Zapier-Shared-Secret- Type
- string
- Description
Is a shared fixed value to provide an additional layer of security.
Parameters
- Name
zapId- Type
- string
- Description
ID of the Zapier subscription.
Request
curl -X DELETE https://v2.moreflow.io/zapier/subscriptions/123 \
-H "X-Zapier-Session-Key: {sessionKey}"
-H "X-Zapier-Shared-Secret: {sharedSecret}"
General Notes
- All endpoints use the
createServiceClient()function to interact with Supabase. - Many endpoints require the
X-Profile-Idheader for user identification. - Error responses are generally thrown as exceptions with the error message.
- Successful responses typically return JSON data with appropriate HTTP status codes.
- Some endpoints use environment variables for configuration (e.g.,
ZAPIER_SAMPLE_LIMIT,ZAPIER_POLL_LIMIT).