Getting Started
1. Authentication
Get your API token at app.gigstack.pro/settings?tab=api2. Base URL
livemode value cannot change an API key’s mode. See authentication.
3. Authentication Header
Nearly every API request requires the Authorization header:
Contact gigstack to be issued a signup secret — it is not something you can generate from the dashboard, and it must never be shipped in client-side code.
Authentication errors
Credential problems are answered by the authentication layer, before the endpoint runs. These bodies are not the standardized envelope — there is nosuccess and no timestamp:
The plan-gate
403 message is Spanish and contains HTML (La API se encuentra disponible para un plan más grande, …). Branch on the status code; do not show the text to end users or match on it. gigstack Connect adds its own 401 / 403 / 404 cases, listed below.
Client identification (optional)
Documents the API creates for a team are stored withfrom: 'api'. Send X-Gigstack-Client: mcp to store them with from: 'mcp' instead — this is what the gigstack MCP server does. mcp is the only recognised value; anything else is treated as api. The header changes attribution only: mcp documents behave exactly like api documents.
4. Creating an account programmatically
Partners with a signup secret can provision a whole gigstack account — auth user, billing account, team, plan subscription and an API key pair — in one call.Idempotency-Key header is required. It must be 8 to 128 characters drawn from A-Z a-z 0-9 . _ : -. It is not required to be a UUID — acct-acme-2026-02-14 is perfectly valid. A key that is missing or does not match that pattern returns 400.
Because an omitted
rfc stays null, the new team cannot issue CFDIs until an RFC and a SAT connection are added. Everything else — clients, payments, services, receipts, webhooks — works immediately. The response’s next_steps block spells this out.
Replays. Re-sending the same Idempotency-Key after success returns 201 with the original response body (including the same API keys). While the first attempt is still running you get 409 idempotency_in_progress — retry shortly. If the first attempt failed you get 409 idempotency_failed; use a new key to retry.
Store the API keys from the successful response securely. A successful idempotent replay can return those same credentials; treat replay responses as secrets too.If you are creating a team that will later connect to the SAT — especially a connected team under gigstack Connect — read the RFC guidance before you pick the
rfc. Getting it wrong is only discovered much later, at FIEL upload.
Key Features
- Mexican Tax Compliance - Full SAT, RFC, and CFDI 4.0 support
- Invoice Lifecycle - Create, stamp, and cancel invoices
- Payment Processing - Multiple processors with refund support
- Client Management - Fiscal validation and EFOS checking
- Service Catalog - Products with tax configurations
- gigstack Connect - Multi-team resource management
gigstack Connect
A master team can act on other teams that share its billing account by adding theteam query parameter to a request:
- Your API key’s team must be a master team (gigstack Connect enabled)
- The target team must exist and share the same billing account
- Your plan must include the
multipleIssuerAccountsfeature - Use an API key: OAuth access tokens are bound to one team, and any other
teamvalue is rejected with403 Team mismatch with OAuth token
{ "message": … } bodies from the authentication layer):
See the gigstack Connect guide for details.
Response Format
Most endpoints return the standardized envelope.timestamp is epoch milliseconds; message is present only when the endpoint sets one.
Success Response
Error Response
error.code is a stable, machine-readable value (validation_failed, invalid_request_body, unauthorized, forbidden, resource_not_found, resource_conflict, internal_server_error, …). Branch on it and on the HTTP status, not on message.
List Response
List endpoints putdata and the pagination keys at the top level:
next back as the next query parameter to get the following page. limit defaults to 10 (max 100) unless an endpoint says otherwise. Search endpoints (/search) report found, page and per_page instead of a cursor.
Exceptions
Not every endpoint uses the envelope: authentication failures (above), invoice creation and stamping ({ "message", "error" }), the SAT and bulk-download endpoints ({ "success", "message", "data" } with no timestamp) and the health probes return their own shapes. Each operation in the API reference documents the exact body it returns.
Test Mode
Every API key is either live or test; the mode is fixed and both use the same host (https://api.gigstack.io/v2). Create your test key at app.gigstack.pro/settings?tab=api.
- Separate data. Resources are stored with the mode of the key that created them, and list and search endpoints only return resources of your key’s mode.
- Crossing modes is refused. For example, cancelling a live invoice with a test key answers
403(Livemode mismatch). - Separate folios. Live and test keep independent folio counters for each series.
- Live-only operations.
POST /invoices/eom/runandPOST /teamsreject test keys. - Verification is scoped. The Mexican staging recipes created test-mode documents and checked their returned mode and workflow results. This does not establish behavior for every provider or a production issuer. Do not provide test-mode output to customers as real fiscal documents. See verification coverage.
- Draft stamping needs an extra check. It uses the stored draft mode. Verify that the draft itself was created in test mode; the calling key does not convert an existing live draft.
Rate Limits
These limits answer429. No Retry-After header is sent.
A credit-limit error requires available credits or a changed limit; retrying faster
does not add credits. A daily SAT quota requires waiting for its reset. Other limits
may apply at the infrastructure level.
For
503, inspect the operation’s error code: an unavailable provider and an unknown
stamping outcome are different. Retry reads with bounded backoff. For writes,
reconcile the result and use the endpoint’s documented idempotency behavior before
retrying. A timeout or 500 can occur after an external action has completed. See
responses and retries and invoice errors.
API Resources
Quick Examples
Create a Client
Create an Invoice
Note: exchange_rate is optional. If not provided, the latest rate from our rates collection will be used automatically.
Register a Payment
Note:
exchange_rateis optional. If not provided, the rate from the payment date will be fetched automatically from our rates collection.dateis optional. Use it to backdate a payment (must be in the past). Defaults to current time.
Development Tools
- Swagger UI: Interactive API documentation
- Postman Collection: Pre-configured requests
- Code Examples: Available in multiple languages
- Webhooks: Real-time event notifications
Support
- Documentation: docs.gigstack.io
- Support Email: support@gigstack.io
- API Status: status.gigstack.io
Ready to start building? Choose a resource from the guides above to begin your integration.