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

# Fax a form to the IRS with an AI assistant

> A worked example: the AI assistant prepares the fax with the HTTP call, and the person pays through the link.

This guide is a worked example for an AI assistant that can make HTTP calls.
The person has a signed IRS form (for example Form 2848, Power of Attorney)
and needs to fax it to the IRS. The assistant prepares the fax; the person
adds the signed form on the web form and pays.

The main-site page for this case is
[payperfax.com/send-fax-to/fax-irs/](https://payperfax.com/send-fax-to/fax-irs/).
The service is described on
[payperfax.com/pay-per-fax-api/](https://payperfax.com/pay-per-fax-api/).

## Before you start

<Steps>
  <Step title="Get the fax number from irs.gov">
    IRS fax numbers depend on the form and the person's state. Look up the
    number for the form on [irs.gov](https://www.irs.gov/), on the form's
    own instructions page. Show the source to the person before you send.

    Do not guess the number and do not use one from a third-party directory.
    The person's own IRS notice is also a valid source.
  </Step>

  <Step title="Ask for the person's email">
    The confirmation and the receipt go there. Ask the person for the
    address. Do not guess it.
  </Step>

  <Step title="Do not retype the signed form">
    The signed form is a file. Do not retype it as text. A typed copy of a
    signed form is not the form.
  </Step>
</Steps>

## Prepare the fax

The person has the signed form on their own device. You do not have the
file. So you call the create endpoint with `file_expected=true`: the answer
is a link to the web form, with the fax number already filled in. The person
adds the file there.

```bash theme={null}
curl https://fax.payperfax.com/api/fax \
  -F "to=+18559220842" \
  -F "email=person@example.com" \
  -F "file_expected=true"
```

<Note>
  The number above is an example. Use the number from
  [irs.gov](https://www.irs.gov/) for the form the person is sending.
</Note>

The answer is `200` with only `url`:

```json theme={null}
{
  "url": "https://fax.payperfax.com/fax/start/Jq3kV0c2mXb7RtY9pLs4HnW1eZa6UdG8fQi5oKjT"
}
```

Give `url` to the person. The link opens the web form with the IRS fax
number already filled in and a notice that the AI assistant prepared the
fax. The person uploads the signed form, sees the preview with the price,
and pays. The link is good for 24 hours.

## If you also wrote a cover letter

If the person needs a short cover letter (for example "Attached: Form 2848
for tax year 2025, signed 2026-04-15, from Jane Doe, SSN XXX-XX-1234"),
write it as Markdown and send it in the same call. The letter becomes
`letter.md`, the first document of the fax; the signed form is added by the
person on the web form and goes after it.

```bash theme={null}
curl https://fax.payperfax.com/api/fax \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+18559220842",
    "email": "person@example.com",
    "markdown": "# Form 2848 cover letter\n\nFrom: Jane Doe\nDate: 2026-04-15\n\nAttached: Form 2848 (Power of Attorney) for tax year 2025, signed 2026-04-15.\n\nPlease process at your earliest convenience.\n\nJane Doe",
    "file_expected": true
  }'
```

A fax has no cover page unless you ask for one. So the letter must carry
its own names, date and address block at the top.

## The same call over MCP

If the AI app has the [PayPerFax MCP server](/fax-mcp) connected, the same call
is the tool `create_fax`, with the same fields. Set `to` to the IRS fax
number for the form, `email` to the person's address, `file_expected` to
`true` for a signed form, and `markdown` for the cover letter. The answer is
the same `url`. MCP has no file transfer, so a signed form is always added by
the person on the web form.

```json theme={null}
{
  "to": "+18559220842",
  "email": "person@example.com",
  "file_expected": true,
  "markdown": "# Form 2848 cover letter\n\nFrom: Jane Doe\nDate: 2026-04-15\n\nAttached: Form 2848 (Power of Attorney) for tax year 2025, signed 2026-04-15.\n\nPlease process at your earliest convenience.\n\nJane Doe",
  "country": "US"
}
```

Set `country` on the MCP call for the currency of the price shown on the
preview. The HTTP call picks the currency from the caller's IP by default;
the MCP call reaches us from the AI app's server, so without `country` it
defaults to USD.

## After the person pays

Once the person pays, the fax enters `sending`. Poll the status endpoint
every 15 seconds and stop when `is_terminal` is `true`. The person is not
charged if the fax fails to deliver.

See [Check the status](/api/check-status) for the full list of fields and
the polling rules.

## What to tell the person

* The link opens the web form. You add the signed form there.
* Nothing is sent and nothing is charged before you pay.
* A failed fax is not charged. If the IRS line is busy, you can try again.
* The link is good for 24 hours.

## Related

<CardGroup cols={2}>
  <Card title="Send a fax" icon="paper-plane" href="/api/send-a-fax">
    Create call reference
  </Card>

  <Card title="Check the status" icon="magnifying-glass" href="/api/check-status">
    Status values and polling
  </Card>

  <Card title="Page for AI assistants" icon="robot" href="/agents">
    The rules in plain language
  </Card>

  <Card title="Fax the IRS" icon="building-columns" href="https://payperfax.com/send-fax-to/fax-irs/">
    Main-site page for faxing the IRS
  </Card>
</CardGroup>


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