> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Anvil

> Integrate your application with the Anvil API

## 🚀 Quickstart

Connect to Anvil with Nango and see data flow in 2 minutes.

**1. Create the integration**

In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Anvil*.

**2. Authorize Anvil**

Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then enter your Anvil API key. Later, you'll let your users do the same directly from your app.

**3. Call the Anvil API**

Let's generate a PDF from Markdown as your first request. Replace the placeholders below with your [Environment API key](https://nango.dev/docs/reference/backend/http-api/api-keys.md), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

> [tab] cURL
>
> ```bash theme={null}
> curl -X POST "https://api.nango.dev/proxy/api/v1/generate-pdf" \
>   -H "Authorization: Bearer <NANGO-API-KEY>" \
>   -H "Provider-Config-Key: <INTEGRATION-ID>" \
>   -H "Connection-Id: <CONNECTION-ID>" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "title": "Example Invoice",
>     "type": "markdown",
>     "data": [
>       { "label": "Name", "content": "Sally Smith" },
>       { "content": "Lorem **ipsum** dolor sit _amet_...", "fontSize": 12, "textColor": "#616161" }
>     ],
>     "fontSize": 16,
>     "textColor": "#171717"
>   }' \
>   --output invoice.pdf
> ```
>
> The response is binary PDF bytes — use `--output` to save it as a file.

> [tab] Node
>
> Install Nango's backend SDK with `npm i @nangohq/node`. Then run:
>
> ```typescript theme={null}
> import fs from 'fs';
> import { Nango } from '@nangohq/node';
>
> const nango = new Nango({ apiKey: '<NANGO-API-KEY>' });
>
> const res = await nango.post({
>     endpoint: '/api/v1/generate-pdf',
>     providerConfigKey: '<INTEGRATION-ID>',
>     connectionId: '<CONNECTION-ID>',
>     data: {
>         title: 'Example Invoice',
>         type: 'markdown',
>         data: [
>             { label: 'Name', content: 'Sally Smith' },
>             { content: 'Lorem **ipsum** dolor sit _amet_...', fontSize: 12, textColor: '#616161' },
>             {
>                 table: {
>                     rows: [
>                         ['Description', 'Quantity', 'Price'],
>                         ['4x Large Widgets', '4', '$40.00'],
>                         ['10x Medium Sized Widgets in dark blue', '10', '$100.00'],
>                         ['6x Small Widgets in white', '6', '$60.00']
>                     ],
>                     columnOptions: [
>                         { align: 'left', width: '60%' },
>                         { align: 'center', width: '100px' },
>                         { align: 'right' }
>                     ],
>                     firstRowHeaders: true,
>                     rowGridlines: true,
>                     columnGridlines: true,
>                     verticalAlign: 'center'
>                 }
>             }
>         ],
>         page: {
>             width: '612px',
>             height: '792px',
>             marginTop: '30px',
>             marginBottom: '30px',
>             marginLeft: '60px',
>             marginRight: '60px',
>             pageCount: 'bottomCenter'
>         },
>         fontSize: 16,
>         textColor: '#171717',
>         includeTimestamp: true,
>         logo: {
>             src: 'https://example.com/mtnlogo.png',
>             maxWidth: 200,
>             maxHeight: 200
>         }
>     },
>     responseType: 'arraybuffer'
> });
>
> // Response is binary PDF bytes — save as binary
> fs.writeFileSync('invoice.pdf', Buffer.from(res.data), { encoding: null });
> ```

Or fetch credentials with the [Node SDK](https://nango.dev/docs/reference/backend/backend-sdk/node.md#get-a-connection-with-credentials) or [API](https://nango.dev/docs/reference/backend/http-api/connections/get.md).

You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.

**4. Implement Nango in your app**

Follow our [Auth implementation guide](https://nango.dev/docs/guides/primitives/auth.md) to integrate Nango in your app.

To obtain your own API key, follow the setup guide linked below.

## 📚 Anvil integration guides

Nango-maintained guides for common use cases.

* [How do I link my account?](https://nango.dev/docs/api-integrations/anvil/connect)\
  Connect your Anvil account using your API key

Official docs: [Anvil API documentation](https://www.useanvil.com/docs/api/getting-started)

## 🧩 Pre-built syncs & tools for Anvil

Explore Nango-provided tools in your dashboard. Extend and customize them to fit your needs.

*No pre-built syncs or tools available yet.*

> [!TIP]
>
> Not seeing the integration you need? [Build your own](https://nango.dev/docs/guides/functions/functions-guide.md) independently.

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.