curl --request POST \
--url https://api.gigstack.io/v2/teams/{id}/deactivate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gigstack.io/v2/teams/{id}/deactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gigstack.io/v2/teams/{id}/deactivate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "team_1234567890",
"legal_name": "Empresa de Tecnología S.A. de C.V.",
"address": {
"country": "MEX",
"street": "Av. Insurgentes Sur 456",
"zip": "03100",
"city": "Ciudad de México",
"state": "CDMX",
"exterior": "96",
"interior": "10",
"neighborhood": "Polanco"
},
"brand": {
"alias": "Mi Empresa",
"primary_color": "#007bff",
"secondary_color": "#6c757d",
"logo": "https://example.com/logo.png"
},
"settings": {
"avoid_legal_name_replacer": true,
"enforce_client_country_taxes": true,
"global_invoice_disabled": false,
"automate_complement_for_ppd_invoices": true,
"automate_partial_payment_complements": true,
"use_foreign_public_in_usd": true,
"avoid_receipts": true,
"cancel_receipts_on_refunds": true,
"invoice_per_receipt": true,
"allow_notes_on_self_invoice": true,
"allow_product_code_on_self_invoice": true,
"send_invoice_english_pdf": true,
"default_description": "Default invoice description",
"override_item_description": "Custom item description",
"invoice_pdf_notes": "Additional notes for PDF",
"product_key": "81112209",
"unit_key": "E48",
"unit_name": "<string>",
"use": "G03",
"sku": "<string>",
"addenda": "<string>",
"custom_payment_description": "<string>",
"customer_portal_id": "portal_1234567890",
"force_series": "<string>",
"avoid_automations_on_currencies": [
"USD",
"EUR"
],
"uses_on_self_invoice_portal": [
"G03",
"S01"
],
"concepts_catalog": [
"<string>"
],
"taxes": [
{}
],
"taxes_usd": [
{}
],
"withholding_taxes": [
{}
],
"local_taxes": [
{}
],
"complements": [
{
"data": "<string>",
"description": "<string>",
"type": "<string>"
}
],
"allowed_product_codes": [
{
"key": "<string>",
"description": "<string>"
}
],
"allowed_uses_by_product_key": [
{
"key": "01010101",
"uses": [
"G03",
"D07"
],
"description": "<string>"
}
],
"periodicity": {
"label": "Mes",
"value": "month"
},
"pdf_language": "en",
"global_invoicing_monthly_cuts": 2,
"eom_ppd_threshold_days": 15,
"limit_days_to_pay": 1,
"payment_reminders": {
"days": 1,
"enabled": true,
"before_body": "<string>",
"before_subject": "<string>",
"after_body": "<string>",
"after_subject": "<string>"
},
"reinvoice": {
"window_days": 1,
"handler": "credit_note"
},
"refunds": {
"automatic_refunds": true,
"current_month_handler": "credit_note"
},
"emails": {
"invoices_bcc": [
"accounting@example.com"
],
"avoid_invoice_emails": false,
"avoid_test_invoice_emails": true,
"avoid_receipts_emails": false,
"payments_bcc": [
"jsmith@example.com"
],
"receipts_bcc": [
"jsmith@example.com"
],
"avoid_foreign_receipts_emails": true,
"invoice_body": "<string>",
"invoice_subject": "<string>",
"complement_body": "<string>",
"complement_subject": "<string>",
"credit_note_body": "<string>",
"credit_note_subject": "<string>",
"payment_body": "<string>",
"payment_subject": "<string>",
"receipt_body": "<string>",
"receipt_subject": "<string>",
"receipt_reminder_body": "<string>",
"receipt_reminder_subject": "<string>"
},
"email_templates": {
"invoices": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
},
"complements": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
},
"credit_notes": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
},
"payments": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
},
"receipts": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
},
"receipt_reminders": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
}
},
"default_series": {
"income": {
"serie": "A"
},
"complements": {
"serie": "P"
},
"credit_note": {
"serie": "NC"
}
}
},
"tax_id": "EMP800101ABC",
"tax_system": "601",
"support_email": "support@empresa.com",
"support_phone": "+52 55 1234 5678",
"owner": "user_1234567890",
"created_at": 1677651234,
"sat": {
"completed": true,
"connected_at": 1677651234,
"csd_expires_at": 1924991999
},
"members": [
{
"id": "user_1234567890",
"email": "member@empresa.com",
"role": "admin",
"is_owner": true,
"permissions": {
"invoices": "editor",
"receipts": "editor",
"payments": "editor",
"services": "editor",
"expenses": "editor"
}
}
],
"integrations": {
"stripe": {
"completed": false,
"category": "payments"
},
"mercadopago": {
"completed": false,
"category": "payments"
},
"clip": {
"completed": false,
"category": "payments"
},
"whmcs": {
"completed": false,
"category": "payments"
},
"paypal": {
"completed": false,
"category": "payments"
},
"openpay": {
"completed": false,
"category": "payments"
},
"conekta": {
"completed": false,
"category": "payments"
},
"bank": {
"completed": false,
"category": "payments"
},
"shopify": {
"completed": false,
"category": "payments"
},
"zapier": {
"completed": false,
"category": "payments"
},
"airtable": {
"completed": false,
"category": "payments"
},
"google_sheets": {
"completed": false,
"category": "payments"
},
"hilos": {
"completed": false,
"category": "messaging"
}
},
"credit_limit": 1000,
"used_credits": 250,
"credit_period_start": 1677651234000,
"metadata": {
"custom_field": "value"
},
"status": "active",
"scheduled_deletion": {
"date": "<unknown>",
"flagged_at": 123,
"flagged_by": "<string>"
},
"deactivated": false,
"deactivated_at": null
},
"message": "<string>"
}{
"success": false,
"error": {
"code": "invalid_request_body",
"message": "An error occurred"
},
"timestamp": 1767225600000
}{
"success": false,
"error": {
"code": "invalid_request_body",
"message": "An error occurred"
},
"timestamp": 1767225600000
}{
"success": false,
"error": {
"code": "invalid_request_body",
"message": "An error occurred"
},
"timestamp": 1767225600000
}Deactivate a business (dar de baja)
Pricing v3 only. Deactivates a non-master team of the caller’s billing account so its RFC stops being billed from the next monthly cut (it is not billed for the month it is deactivated in unless it already issued something live that month). Use it for a business with invoices, payments or receipts, which DELETE /teams/{id} refuses (team_has_existing_resources) because they are kept for the SAT. While deactivated the team can be read, listed and its XML and PDF downloaded, but every stamp answers 412 TEAM_DEACTIVATED and creating receipts, payment requests, recurrences, retentions, drafts or SAT downloads answers 403 team_deactivated. Payments that arrive from connected processors are not written to the team; each one is kept as a frozenEvents record. Only the owner or an administrator of the billing account signed in as a person (web app or MCP personal credential); never a team API key.
curl --request POST \
--url https://api.gigstack.io/v2/teams/{id}/deactivate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gigstack.io/v2/teams/{id}/deactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.gigstack.io/v2/teams/{id}/deactivate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "team_1234567890",
"legal_name": "Empresa de Tecnología S.A. de C.V.",
"address": {
"country": "MEX",
"street": "Av. Insurgentes Sur 456",
"zip": "03100",
"city": "Ciudad de México",
"state": "CDMX",
"exterior": "96",
"interior": "10",
"neighborhood": "Polanco"
},
"brand": {
"alias": "Mi Empresa",
"primary_color": "#007bff",
"secondary_color": "#6c757d",
"logo": "https://example.com/logo.png"
},
"settings": {
"avoid_legal_name_replacer": true,
"enforce_client_country_taxes": true,
"global_invoice_disabled": false,
"automate_complement_for_ppd_invoices": true,
"automate_partial_payment_complements": true,
"use_foreign_public_in_usd": true,
"avoid_receipts": true,
"cancel_receipts_on_refunds": true,
"invoice_per_receipt": true,
"allow_notes_on_self_invoice": true,
"allow_product_code_on_self_invoice": true,
"send_invoice_english_pdf": true,
"default_description": "Default invoice description",
"override_item_description": "Custom item description",
"invoice_pdf_notes": "Additional notes for PDF",
"product_key": "81112209",
"unit_key": "E48",
"unit_name": "<string>",
"use": "G03",
"sku": "<string>",
"addenda": "<string>",
"custom_payment_description": "<string>",
"customer_portal_id": "portal_1234567890",
"force_series": "<string>",
"avoid_automations_on_currencies": [
"USD",
"EUR"
],
"uses_on_self_invoice_portal": [
"G03",
"S01"
],
"concepts_catalog": [
"<string>"
],
"taxes": [
{}
],
"taxes_usd": [
{}
],
"withholding_taxes": [
{}
],
"local_taxes": [
{}
],
"complements": [
{
"data": "<string>",
"description": "<string>",
"type": "<string>"
}
],
"allowed_product_codes": [
{
"key": "<string>",
"description": "<string>"
}
],
"allowed_uses_by_product_key": [
{
"key": "01010101",
"uses": [
"G03",
"D07"
],
"description": "<string>"
}
],
"periodicity": {
"label": "Mes",
"value": "month"
},
"pdf_language": "en",
"global_invoicing_monthly_cuts": 2,
"eom_ppd_threshold_days": 15,
"limit_days_to_pay": 1,
"payment_reminders": {
"days": 1,
"enabled": true,
"before_body": "<string>",
"before_subject": "<string>",
"after_body": "<string>",
"after_subject": "<string>"
},
"reinvoice": {
"window_days": 1,
"handler": "credit_note"
},
"refunds": {
"automatic_refunds": true,
"current_month_handler": "credit_note"
},
"emails": {
"invoices_bcc": [
"accounting@example.com"
],
"avoid_invoice_emails": false,
"avoid_test_invoice_emails": true,
"avoid_receipts_emails": false,
"payments_bcc": [
"jsmith@example.com"
],
"receipts_bcc": [
"jsmith@example.com"
],
"avoid_foreign_receipts_emails": true,
"invoice_body": "<string>",
"invoice_subject": "<string>",
"complement_body": "<string>",
"complement_subject": "<string>",
"credit_note_body": "<string>",
"credit_note_subject": "<string>",
"payment_body": "<string>",
"payment_subject": "<string>",
"receipt_body": "<string>",
"receipt_subject": "<string>",
"receipt_reminder_body": "<string>",
"receipt_reminder_subject": "<string>"
},
"email_templates": {
"invoices": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
},
"complements": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
},
"credit_notes": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
},
"payments": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
},
"receipts": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
},
"receipt_reminders": {
"es": {
"body": "<string>",
"subject": "<string>"
},
"en": {
"body": "<string>",
"subject": "<string>"
}
}
},
"default_series": {
"income": {
"serie": "A"
},
"complements": {
"serie": "P"
},
"credit_note": {
"serie": "NC"
}
}
},
"tax_id": "EMP800101ABC",
"tax_system": "601",
"support_email": "support@empresa.com",
"support_phone": "+52 55 1234 5678",
"owner": "user_1234567890",
"created_at": 1677651234,
"sat": {
"completed": true,
"connected_at": 1677651234,
"csd_expires_at": 1924991999
},
"members": [
{
"id": "user_1234567890",
"email": "member@empresa.com",
"role": "admin",
"is_owner": true,
"permissions": {
"invoices": "editor",
"receipts": "editor",
"payments": "editor",
"services": "editor",
"expenses": "editor"
}
}
],
"integrations": {
"stripe": {
"completed": false,
"category": "payments"
},
"mercadopago": {
"completed": false,
"category": "payments"
},
"clip": {
"completed": false,
"category": "payments"
},
"whmcs": {
"completed": false,
"category": "payments"
},
"paypal": {
"completed": false,
"category": "payments"
},
"openpay": {
"completed": false,
"category": "payments"
},
"conekta": {
"completed": false,
"category": "payments"
},
"bank": {
"completed": false,
"category": "payments"
},
"shopify": {
"completed": false,
"category": "payments"
},
"zapier": {
"completed": false,
"category": "payments"
},
"airtable": {
"completed": false,
"category": "payments"
},
"google_sheets": {
"completed": false,
"category": "payments"
},
"hilos": {
"completed": false,
"category": "messaging"
}
},
"credit_limit": 1000,
"used_credits": 250,
"credit_period_start": 1677651234000,
"metadata": {
"custom_field": "value"
},
"status": "active",
"scheduled_deletion": {
"date": "<unknown>",
"flagged_at": 123,
"flagged_by": "<string>"
},
"deactivated": false,
"deactivated_at": null
},
"message": "<string>"
}{
"success": false,
"error": {
"code": "invalid_request_body",
"message": "An error occurred"
},
"timestamp": 1767225600000
}{
"success": false,
"error": {
"code": "invalid_request_body",
"message": "An error occurred"
},
"timestamp": 1767225600000
}{
"success": false,
"error": {
"code": "invalid_request_body",
"message": "An error occurred"
},
"timestamp": 1767225600000
}Authorizations
Authentication Method: HTTP Bearer token.
The runtime requires the literal Bearer prefix — a bare token in the
Authorization header is rejected with 401 unauthorized.
Header Format: Authorization: Bearer YOUR_API_KEY
Your API key is a JWT. Live keys operate on live data (livemode: true);
test keys operate on isolated test data (livemode: false).
Get your key at: app.gigstack.pro/settings?tab=api
Errors: credential failures are answered by the authentication layer with a raw
{ "message": … } body, not the standardized envelope — 401 for a missing, malformed or
expired token, 403 for a revoked key or a plan without API access. See the Unauthorized
and AuthForbidden responses.
Path Parameters
Query Parameters
gigstack Connect: Target team ID for multi-team access.
Requires gigstack Connect enabled on your team and shared billing account.
Also requires the multipleIssuerAccounts feature on your plan. Requests targeting a
team other than the one your API key belongs to return 403 without it.
Only API keys can use it: an OAuth access token sent with another team's id is rejected with
403 Team mismatch with OAuth token.
Optional — omit it entirely unless you are acting on another team. It deliberately
carries no example value so generated snippets do not emit ?team=undefined; when the
parameter is absent, the team is derived from your API key.
Example: ?team=team_xyz789