# F-sąskaita Developers > Public API dokumentacija integruotojams ir AI agentams. ## Puslapiai - [F-sąskaita API](https://docs.fsaskaita.lt/llms.mdx/lt/index/content.md): Programiškai kurkite ir tvarkykite Lietuvos verslo sąskaitas faktūras ir išlaidas. REST, JSON, bearer prieigos raktai, webhook pranešimai. - [Integracija AI agentams](https://docs.fsaskaita.lt/llms.mdx/lt/agents/content.md): Glaustas, agentams skirtas F-sąskaita API aprašymas. Bazinis URL, autentifikacija, specifikacijos vieta, puslapiavimas, klaidų apdorojimas ir taisyklės, padedančios išvengti dažnų klaidų. - [Pakeitimų žurnalas](https://docs.fsaskaita.lt/llms.mdx/lt/changelog/content.md): Public API ir integracijų pakeitimai. - [Autentifikacija](https://docs.fsaskaita.lt/llms.mdx/lt/guides/authentication/content.md): Sukurkite verslo prieigos raktą programėlėje, siųskite jį kaip bearer prieigos raktą ir supraskite jo apimtį bei galiojimą. - [Konvencijos, klaidos ir užklausų limitai](https://docs.fsaskaita.lt/llms.mdx/lt/guides/conventions/content.md): Užklausų ir atsakymų formatai, puslapiavimas, identifikatoriai, datos ir pinigų sumos, HTTP būsenos kodai ir 60 užklausų per minutę limitas. - [Išlaidos](https://docs.fsaskaita.lt/llms.mdx/lt/guides/expenses/content.md): Registruokite pirkimo dokumentus su jų failu, atnaujinkite juos, pakeiskite failą ir atsisiųskite originalą. - [Sąskaitos faktūros](https://docs.fsaskaita.lt/llms.mdx/lt/guides/invoices/content.md): Sąskaitos faktūros modelis, sąskaitų tipai, numeracija ir serijos, kūrimo ir atnaujinimo užklausos bei PDF atsisiuntimas. - [Webhook pranešimai](https://docs.fsaskaita.lt/llms.mdx/lt/guides/webhooks/content.md): Užprenumeruokite HTTPS galinį tašką sąskaitų faktūrų ir išlaidų įvykiams, tikrinkite HMAC-SHA256 parašą ir tvarkykite pakartotinius siuntimus. - [Žinynas](https://docs.fsaskaita.lt/llms.mdx/lt/reference/content.md): Visos Public API operacijos, užklausos ir atsakymai vienoje vietoje. - [List currencies](https://docs.fsaskaita.lt/llms.mdx/lt/reference/currencies/listCurrencies/content.md): Returns every accepted currency code. Not paginated. - [Create an expense](https://docs.fsaskaita.lt/llms.mdx/lt/reference/expenses/createExpense/content.md): Creates an expense from a multipart/form-data body. file is required and must have one of the extensions jpeg, jpg, bmp, gif, pdf, png, tiff, xlsx, xls, doc, docx or odf. vat, invoice_number and the file are stored but not returned; fetch the file with the download endpoint. Fires the expense.created webhook. - [Delete an expense](https://docs.fsaskaita.lt/llms.mdx/lt/reference/expenses/deleteExpense/content.md): Deletes the expense and its file. Fires the expense.deleted webhook. - [Download the expense file](https://docs.fsaskaita.lt/llms.mdx/lt/reference/expenses/downloadExpenseFile/content.md): Streams the stored file under its original name. Content-Length is not sent. - [Get an expense](https://docs.fsaskaita.lt/llms.mdx/lt/reference/expenses/getExpense/content.md): - [List expenses](https://docs.fsaskaita.lt/llms.mdx/lt/reference/expenses/listExpenses/content.md): Returns the business's expenses, newest first, 50 per page. Use ?page= to paginate; the page size cannot be changed. - [Replace the expense file](https://docs.fsaskaita.lt/llms.mdx/lt/reference/expenses/replaceExpenseFile/content.md): Replaces only the stored file; every other field is kept. Fires the expense.updated webhook. - [Replace an expense](https://docs.fsaskaita.lt/llms.mdx/lt/reference/expenses/updateExpense/content.md): Replaces every field of the expense with the multipart/form-data body. file is optional here; when present it replaces the stored file. Fires the expense.updated webhook. - [expense.created](https://docs.fsaskaita.lt/llms.mdx/lt/reference/expenses/webhookExpenseCreated/content.md): Sent when an expense is created through the API or the app. Each event is attempted up to 3 times: the first delivery, then retries after 10 s and 100 s; only a 2xx response counts as success. The request times out after 10 seconds. - [expense.deleted](https://docs.fsaskaita.lt/llms.mdx/lt/reference/expenses/webhookExpenseDeleted/content.md): Sent when an expense is deleted through the API or the app. The payload contains only the id of the deleted expense. Each event is attempted up to 3 times: the first delivery, then retries after 10 s and 100 s; only a 2xx response counts as success. The request times out after 10 seconds. - [expense.updated](https://docs.fsaskaita.lt/llms.mdx/lt/reference/expenses/webhookExpenseUpdated/content.md): Sent when an expense is replaced or its file is swapped. Each event is attempted up to 3 times: the first delivery, then retries after 10 s and 100 s; only a 2xx response counts as success. The request times out after 10 seconds. - [Create an invoice](https://docs.fsaskaita.lt/llms.mdx/lt/reference/invoices/createInvoice/content.md): Creates a finalized invoice and queues its PDF. Fires the invoice.created webhook. - [Delete an invoice](https://docs.fsaskaita.lt/llms.mdx/lt/reference/invoices/deleteInvoice/content.md): Deletes the invoice together with its PDF, items, payment options and e-mail logs, and recalculates the series counter. Fires the invoice.deleted webhook. - [Download the invoice PDF](https://docs.fsaskaita.lt/llms.mdx/lt/reference/invoices/downloadInvoicePdf/content.md): Streams the invoice PDF. The PDF is rendered asynchronously after create and update; if it does not exist yet the request waits for it for up to 20 seconds and then fails with 500. Content-Length is not sent. - [Get an invoice](https://docs.fsaskaita.lt/llms.mdx/lt/reference/invoices/getInvoice/content.md): - [List invoices](https://docs.fsaskaita.lt/llms.mdx/lt/reference/invoices/listInvoices/content.md): Returns the business's finalized invoices, newest first, 50 per page. Use ?page= to paginate; the page size cannot be changed. Drafts made in the app are never included. - [Replace an invoice](https://docs.fsaskaita.lt/llms.mdx/lt/reference/invoices/updateInvoice/content.md): Replaces every field of the invoice with the request body, under the same rules as create. Always resend the current invoice_number: when it is omitted the invoice is renumbered from the series counter. Items, payment options and custom fields are rewritten, totals recalculated and the PDF regenerated. Fires the invoice.updated webhook. - [invoice.created](https://docs.fsaskaita.lt/llms.mdx/lt/reference/invoices/webhookInvoiceCreated/content.md): Sent when a finalized invoice is created, whether through the API, the app or a recurring invoice. The PDF is rendered asynchronously, so it may not exist yet when this event arrives; GET /invoices/{invoice}/download waits for it. Each event is attempted up to 3 times: the first delivery, then retries after 10 s and 100 s; only a 2xx response counts as success. The request times out after 10 seconds. - [invoice.deleted](https://docs.fsaskaita.lt/llms.mdx/lt/reference/invoices/webhookInvoiceDeleted/content.md): Sent when a finalized invoice is deleted. The payload contains only the id of the deleted invoice. Each event is attempted up to 3 times: the first delivery, then retries after 10 s and 100 s; only a 2xx response counts as success. The request times out after 10 seconds. - [invoice.updated](https://docs.fsaskaita.lt/llms.mdx/lt/reference/invoices/webhookInvoiceUpdated/content.md): Sent when an invoice is replaced, when its payment status changes (including a Stripe payment), or after any other save. Each event is attempted up to 3 times: the first delivery, then retries after 10 s and 100 s; only a 2xx response counts as success. The request times out after 10 seconds. - [Get the business profile](https://docs.fsaskaita.lt/llms.mdx/lt/reference/profile/getProfile/content.md): Returns the business the token is scoped to. Companies include company_name and company_code; individual activities include first_name, last_name and individual_activity_id. ## Spec - [OpenAPI](https://docs.fsaskaita.lt/openapi.json): F-sąskaita API OpenAPI specifikacija. ## Instrukcijos - [Instrukcijos agentui](https://docs.fsaskaita.lt/agents/prompt.md): Paruoštos instrukcijos programavimo agentui, kaip integruoti sąskaitų faktūrų išrašymą.