# Send a document as an e-invoice through the connection of the workspace

`POST /accounting/e-invoice/{id}/send` · Rivier · accounting

Send a document as an e-invoice through the connection of the workspace; a test workspace sends through the test provider.

- Scope: accounting:write
- Sdk: accounting.einvoice.send
- Cli: accounting einvoice send

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "invoice",
        "credit_note"
      ],
      "default": "invoice"
    },
    "provider": {
      "type": "string",
      "pattern": "^[a-z0-9-]{1,40}$"
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/accounting/e-invoice/{id}/send' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "kind": "invoice",
  "provider": "string"
}'
```
