Skip to main content
POST
Create a bill

Authorizations

X-API-Key
string
header
required

User API key authentication. Create a key under Settings → API keys in the Slash dashboard (https://app.slash.com/global-settings/api-keys) and send the x-legal-entity header naming the legal entity to act on with every request. Keys scoped to a legal entity are rejected with 403 user_api_key_required.

Headers

X-Idempotency-Key
string
required

Unique caller-generated key for one create request. Once an authenticated, schema-valid request reaches the operation, the key is permanently consumed for that operation and legal entity whether the operation succeeds or fails. Reusing it in that scope returns 409 and never replays a response, unlike API v1, which replays the original response for a matching key.

Required string length: 1 - 255

The legal entity to act on. Required on every request; a user API key can act on any legal entity its user has access to.

Pattern: ^le_[a-zA-Z0-9]+$

Body

application/json

A new bill in draft. Every money field must use the same currency.

lineItems
BillLineItemCreate · object[]
required

At least one line. The bill's currency is the lines' currency, and the total is the sum of line totals plus tax minus discount.

Minimum array length: 1
vendorContactId
string

The vendor: any contact on the legal entity that isn't archived, usually one with recipientType: vendor. Create one with POST /v2/contacts.

Example:

"le_c_2rj4l7hmrrrcv"

destinationId
string

The destination the bill should be paid to. Must belong to vendorContactId when both are given.

Example:

"le_contact_destination_2rj4l7hmrrrcv"

ownerUserId
string

The user responsible for the bill. Defaults to the user behind the API key.

Example:

"u_2rj4l7hmrrrcv"

invoiceNumber
string

The vendor's invoice number.

Maximum string length: 255
Example:

"INV-4471"

invoiceDate
string<date>

Invoice date as YYYY-MM-DD.

Example:

"2026-09-01"

dueDate
string<date>

Due date as YYYY-MM-DD.

Example:

"2026-10-01"

tax
object

Tax added to the line totals, in the bill's currency.

discount
object

Discount taken off the line totals, in the bill's currency.

documentIds
string[]

Documents uploaded with purpose bill_invoice.

Maximum array length: 20
notes
string

Free-text notes visible to your organization.

Maximum string length: 5000

Response

The created bill.

Money your legal entity owes a vendor. status and amounts.outstanding are derived from the bill's payments and cannot be set directly.

id
string
required

Bill id with the bill_ prefix.

Example:

"bill_2rj4l7hmrrrcv"

status
enum<string>
required

Derived from the bill's payments. draft until a payment exists; pending_approval while a payment awaits approval; rejected when the latest approval was rejected; scheduled when a payment is scheduled; payment_pending while a payment is in flight; partially_paid when settled payments cover part of the total; paid when they cover all of it; payment_failed when the latest payment failed or was returned.

Available options:
draft,
pending_approval,
rejected,
scheduled,
payment_pending,
paid,
payment_failed,
partially_paid
source
enum<string>
required

How the bill entered Slash. api for bills created through this API, manual for the dashboard, email for the accounts-payable inbox, carrier_account for bills pulled from a connected carrier portal. Carrier bills are read-only over the API.

Available options:
manual,
email,
carrier_account,
api
currency
string
required

Uppercase ISO 4217 currency code shared by every amount on the bill.

Pattern: ^[A-Z]{3}$
Example:

"USD"

amounts
object
required

Every amount is in currency, in minor units.

lineItems
BillLineItem · object[]
required

Line items in display order.

documentIds
string[]
required

Documents attached to the bill, readable at GET /v2/documents/{documentId}.

payments
BillPayment · object[]
required

Payments linked to the bill, oldest first.

createdAt
string<date-time>
required

When the bill was created.

vendorContactId
string

The vendor contact, readable at GET /v2/contacts/{contactId}.

Example:

"le_c_2rj4l7hmrrrcv"

destinationId
string

The destination the bill is expected to be paid to, readable at GET /v2/destinations/{destinationId}.

Example:

"le_contact_destination_2rj4l7hmrrrcv"

ownerUserId
string

The user responsible for the bill. Absent for bills that arrived by email and have not been assigned.

Example:

"u_2rj4l7hmrrrcv"

invoiceNumber
string

The vendor's invoice number.

Example:

"INV-4471"

invoiceDate
string<date>

Invoice date as YYYY-MM-DD.

Example:

"2026-09-01"

dueDate
string<date>

Due date as YYYY-MM-DD.

Example:

"2026-10-01"

notes
string

Free-text notes visible to your organization.