LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request PUT "$LAGO_URL/api/v1/organizations" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"organization": {
"webhook_url": "https://webhook.brex.com",
"country": "US",
"address_line1": "100 Brex Street",
"address_line2": null,
"state": "NYC",
"zipcode": "10000",
"email": "brex@brex.com",
"city": "New York",
"legal_name": null,
"legal_number": null,
"net_payment_term": 30,
"tax_identification_number": "US123456789",
"timezone": "America/New_York",
"default_currency": "USD",
"document_numbering": "per_customer",
"document_number_prefix": "LAGO-INV",
"email_settings": [
"invoice.finalized",
"credit_note.created"
],
"billing_configuration": {
"invoice_footer": "This is my customer footer",
"invoice_grace_period": 3,
"document_locale": "en",
"vat_rate": 12.5
}
}
}'
from lago_python_client.client import Client
from lago_python_client.exceptions import LagoApiError
from lago_python_client.models import Organization, OrganizationBillingConfiguration
client = Client(api_key='__YOUR_API_KEY__')
params = Organization(
timezone="America/New_York",
webhook_url="https://webhook.brex.com",
email_settings=["invoice.finalized"],
tax_identification_number="US123456789",
default_currency="USD",
document_numbering= "per_customer",
document_number_prefix= "LAGO-INV",
billing_configuration=OrganizationBillingConfiguration(
invoice_footer="This is my customer footer",
invoice_grace_period=3,
document_locale="en",
vat_rate=12.5
)
)
try:
client.organizations.update(params)
except LagoApiError as e:
repair_broken_state(e) # do something on error or raise your own exception
require 'lago-ruby-client'
client = Lago::Api::Client.new(api_key: '__YOUR_API_KEY__')
update_params = {
timezone: 'America/New_York',
webhook_url: 'https://webhook.brex.com',
email_settings: ['invoice.finalized'],
tax_identification_number: "US123456789",
default_currency: "USD",
document_numbering: 'per_customer',
document_number_prefix: 'LAGO-INV',
billing_configuration: {
invoice_footer="This is my customer footer",
invoice_grace_period=3,
document_locale: "en",
vat_rate: 12.5
}
}
client.organizations.update(update_params)
await client.organizations.updateOrganization({
organization: {
timezone: "America/New_York",
webhook_url: "https://webhook.brex.com",
email_settings: ["invoice.finalized"],
tax_identification_number: "US123456789",
default_currency: "USD",
document_numbering: "per_customer",
document_number_prefix: "LAGO-INV",
billing_configuration: {
invoice_footer: "This is my customer footer",
invoice_grace_period: 3,
document_locale: "en",
vat_rate: 12.5,
},
},
});
import "fmt"
import "github.com/getlago/lago-go-client"
func main() {
lagoClient := lago.New().
SetApiKey("__YOUR_API_KEY__")
organizationInput := &lago.OrganizationInput{
LegalName: "Legal Name",
Timezone: "America/New_York",
EmailSettings: ["invoice.finalized"],
TaxIdentificationNumber: "US123456789",
DefaultCurrency: "USD",
BillingConfiguration: &OrganizationBillingConfigurationInput{
InvoiceFooter: "This is my customer foote",
InvoiceGracePeriod: 3,
DocumentLocale: "en",
VatRate: 12.5,
}
}
organization, err := lagoClient.Organization().Update(organizationInput)
if err != nil {
// Error is *lago.Error
panic(err)
}
// organization is *lago.Organization
fmt.Println(organization)
}
{
"organization": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Name1",
"created_at": "2022-05-02T13:04:09Z",
"document_numbering": "per_customer",
"document_number_prefix": "ORG-1234",
"billing_configuration": {
"invoice_footer": "This is my customer footer",
"invoice_grace_period": 3,
"document_locale": "en"
},
"webhook_url": "https://webhook.brex.com",
"webhook_urls": [
"https://webhook.brex.com",
"https://webhook2.brex.com"
],
"country": "US",
"default_currency": "USD",
"address_line1": "100 Brex Street",
"address_line2": null,
"state": "NYC",
"zipcode": "10000",
"email": "brex@brex.com",
"city": "New York",
"legal_name": null,
"legal_number": null,
"net_payment_term": 30,
"tax_identification_number": "US123456789",
"timezone": "America/New_York",
"taxes": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "TVA",
"code": "french_standard_vat",
"rate": 20,
"applied_to_organization": true,
"created_at": "2023-07-06T14:35:58Z",
"description": "French standard VAT"
}
],
"finalize_zero_amount_invoice": false,
"events_store": "clickhouse"
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Organizations
Update organization (deprecated)
This endpoint is used to update your own organization’s settings.
PUT
/
organizations
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request PUT "$LAGO_URL/api/v1/organizations" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"organization": {
"webhook_url": "https://webhook.brex.com",
"country": "US",
"address_line1": "100 Brex Street",
"address_line2": null,
"state": "NYC",
"zipcode": "10000",
"email": "brex@brex.com",
"city": "New York",
"legal_name": null,
"legal_number": null,
"net_payment_term": 30,
"tax_identification_number": "US123456789",
"timezone": "America/New_York",
"default_currency": "USD",
"document_numbering": "per_customer",
"document_number_prefix": "LAGO-INV",
"email_settings": [
"invoice.finalized",
"credit_note.created"
],
"billing_configuration": {
"invoice_footer": "This is my customer footer",
"invoice_grace_period": 3,
"document_locale": "en",
"vat_rate": 12.5
}
}
}'
from lago_python_client.client import Client
from lago_python_client.exceptions import LagoApiError
from lago_python_client.models import Organization, OrganizationBillingConfiguration
client = Client(api_key='__YOUR_API_KEY__')
params = Organization(
timezone="America/New_York",
webhook_url="https://webhook.brex.com",
email_settings=["invoice.finalized"],
tax_identification_number="US123456789",
default_currency="USD",
document_numbering= "per_customer",
document_number_prefix= "LAGO-INV",
billing_configuration=OrganizationBillingConfiguration(
invoice_footer="This is my customer footer",
invoice_grace_period=3,
document_locale="en",
vat_rate=12.5
)
)
try:
client.organizations.update(params)
except LagoApiError as e:
repair_broken_state(e) # do something on error or raise your own exception
require 'lago-ruby-client'
client = Lago::Api::Client.new(api_key: '__YOUR_API_KEY__')
update_params = {
timezone: 'America/New_York',
webhook_url: 'https://webhook.brex.com',
email_settings: ['invoice.finalized'],
tax_identification_number: "US123456789",
default_currency: "USD",
document_numbering: 'per_customer',
document_number_prefix: 'LAGO-INV',
billing_configuration: {
invoice_footer="This is my customer footer",
invoice_grace_period=3,
document_locale: "en",
vat_rate: 12.5
}
}
client.organizations.update(update_params)
await client.organizations.updateOrganization({
organization: {
timezone: "America/New_York",
webhook_url: "https://webhook.brex.com",
email_settings: ["invoice.finalized"],
tax_identification_number: "US123456789",
default_currency: "USD",
document_numbering: "per_customer",
document_number_prefix: "LAGO-INV",
billing_configuration: {
invoice_footer: "This is my customer footer",
invoice_grace_period: 3,
document_locale: "en",
vat_rate: 12.5,
},
},
});
import "fmt"
import "github.com/getlago/lago-go-client"
func main() {
lagoClient := lago.New().
SetApiKey("__YOUR_API_KEY__")
organizationInput := &lago.OrganizationInput{
LegalName: "Legal Name",
Timezone: "America/New_York",
EmailSettings: ["invoice.finalized"],
TaxIdentificationNumber: "US123456789",
DefaultCurrency: "USD",
BillingConfiguration: &OrganizationBillingConfigurationInput{
InvoiceFooter: "This is my customer foote",
InvoiceGracePeriod: 3,
DocumentLocale: "en",
VatRate: 12.5,
}
}
organization, err := lagoClient.Organization().Update(organizationInput)
if err != nil {
// Error is *lago.Error
panic(err)
}
// organization is *lago.Organization
fmt.Println(organization)
}
{
"organization": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Name1",
"created_at": "2022-05-02T13:04:09Z",
"document_numbering": "per_customer",
"document_number_prefix": "ORG-1234",
"billing_configuration": {
"invoice_footer": "This is my customer footer",
"invoice_grace_period": 3,
"document_locale": "en"
},
"webhook_url": "https://webhook.brex.com",
"webhook_urls": [
"https://webhook.brex.com",
"https://webhook2.brex.com"
],
"country": "US",
"default_currency": "USD",
"address_line1": "100 Brex Street",
"address_line2": null,
"state": "NYC",
"zipcode": "10000",
"email": "brex@brex.com",
"city": "New York",
"legal_name": null,
"legal_number": null,
"net_payment_term": 30,
"tax_identification_number": "US123456789",
"timezone": "America/New_York",
"taxes": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "TVA",
"code": "french_standard_vat",
"rate": 20,
"applied_to_organization": true,
"created_at": "2023-07-06T14:35:58Z",
"description": "French standard VAT"
}
],
"finalize_zero_amount_invoice": false,
"events_store": "clickhouse"
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request PUT "$LAGO_URL/api/v1/organizations" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"organization": {
"webhook_url": "https://webhook.brex.com",
"country": "US",
"address_line1": "100 Brex Street",
"address_line2": null,
"state": "NYC",
"zipcode": "10000",
"email": "brex@brex.com",
"city": "New York",
"legal_name": null,
"legal_number": null,
"net_payment_term": 30,
"tax_identification_number": "US123456789",
"timezone": "America/New_York",
"default_currency": "USD",
"document_numbering": "per_customer",
"document_number_prefix": "LAGO-INV",
"email_settings": [
"invoice.finalized",
"credit_note.created"
],
"billing_configuration": {
"invoice_footer": "This is my customer footer",
"invoice_grace_period": 3,
"document_locale": "en",
"vat_rate": 12.5
}
}
}'
from lago_python_client.client import Client
from lago_python_client.exceptions import LagoApiError
from lago_python_client.models import Organization, OrganizationBillingConfiguration
client = Client(api_key='__YOUR_API_KEY__')
params = Organization(
timezone="America/New_York",
webhook_url="https://webhook.brex.com",
email_settings=["invoice.finalized"],
tax_identification_number="US123456789",
default_currency="USD",
document_numbering= "per_customer",
document_number_prefix= "LAGO-INV",
billing_configuration=OrganizationBillingConfiguration(
invoice_footer="This is my customer footer",
invoice_grace_period=3,
document_locale="en",
vat_rate=12.5
)
)
try:
client.organizations.update(params)
except LagoApiError as e:
repair_broken_state(e) # do something on error or raise your own exception
require 'lago-ruby-client'
client = Lago::Api::Client.new(api_key: '__YOUR_API_KEY__')
update_params = {
timezone: 'America/New_York',
webhook_url: 'https://webhook.brex.com',
email_settings: ['invoice.finalized'],
tax_identification_number: "US123456789",
default_currency: "USD",
document_numbering: 'per_customer',
document_number_prefix: 'LAGO-INV',
billing_configuration: {
invoice_footer="This is my customer footer",
invoice_grace_period=3,
document_locale: "en",
vat_rate: 12.5
}
}
client.organizations.update(update_params)
await client.organizations.updateOrganization({
organization: {
timezone: "America/New_York",
webhook_url: "https://webhook.brex.com",
email_settings: ["invoice.finalized"],
tax_identification_number: "US123456789",
default_currency: "USD",
document_numbering: "per_customer",
document_number_prefix: "LAGO-INV",
billing_configuration: {
invoice_footer: "This is my customer footer",
invoice_grace_period: 3,
document_locale: "en",
vat_rate: 12.5,
},
},
});
import "fmt"
import "github.com/getlago/lago-go-client"
func main() {
lagoClient := lago.New().
SetApiKey("__YOUR_API_KEY__")
organizationInput := &lago.OrganizationInput{
LegalName: "Legal Name",
Timezone: "America/New_York",
EmailSettings: ["invoice.finalized"],
TaxIdentificationNumber: "US123456789",
DefaultCurrency: "USD",
BillingConfiguration: &OrganizationBillingConfigurationInput{
InvoiceFooter: "This is my customer foote",
InvoiceGracePeriod: 3,
DocumentLocale: "en",
VatRate: 12.5,
}
}
organization, err := lagoClient.Organization().Update(organizationInput)
if err != nil {
// Error is *lago.Error
panic(err)
}
// organization is *lago.Organization
fmt.Println(organization)
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Update an existing organization
Show child attributes
Show child attributes
Response
Successful response
Show child attributes
Show child attributes
⌘I