Skip to content
Spendesk logo

Connectors / Finance · HTTP Connector

Automate Spendesk with Tray.ai

Create a supplier and create a purchase order in Spendesk, and start a workflow when Spendesk sends “Payable created”.

What can you do with Spendesk on Tray.ai?

Spendesk is a spend management platform covering company cards, supplier invoices, purchase orders, expense reimbursements and the accounting exports that follow them. Tray.ai connects to Spendesk through the HTTP Connector, so your workflows can call the Spendesk API alongside the rest of your stack. API access comes through Spendesk's partner program or API plan, so you need approved credentials first.

  • When Spendesk sends “Payable prepared”, post the entry to your accounting system.
  • Create a supplier in Spendesk when a vendor is approved in your procurement system.
  • Deactivate a user in Spendesk when an employee leaves, based on your HR system.
  • When Spendesk sends “Settlement created”, match the payment in your accounting system.
Connects through
HTTP Connector
Authentication
Basic authentication or a bearer token or OAuth 2.0
Base URL
https://public-api.spendesk.com

Set it up

Connect Spendesk to Tray.ai

Each step uses Spendesk's own API details, from its documentation.

Step 1

Save Spendesk's username and password

Ask Spendesk for API access. Once it's approved, save the credentials Spendesk gives you as a Tray.ai authentication. The HTTP Client sends them as basic auth. They stay out of the workflow and out of the logs.

Step 2

Point the HTTP Client at the API

Add an HTTP Client step and use https://public-api.spendesk.com as the base URL. Or paste a cURL example from Spendesk's API docs, and Tray.ai fills in the method, URL, and headers.

Step 3

Start with “Search payables”

It's one of 15 documented actions, under Payables. The response comes back as data the next step can map into your other apps.

Step 4

Start workflows from Spendesk events

Give Spendesk the URL of a Tray.ai webhook trigger. “Payable created” can then start a workflow, and so can 2 other events.

Workflows to build with Spendesk

Each one uses actions and events from Spendesk's own API documentation.

Create NetSuite bills from prepared Spendesk payables

When

Payable prepared

Then

  1. Get a payable
  2. Create a bill in NetSuite

With NetSuite

Add new Xero suppliers to Spendesk

When

A contact is created in Xero

Then

  1. List suppliers in Spendesk to check for a match
  2. Create a supplier if none is found

With Xero

Deactivate Spendesk users when employees leave BambooHR

When

An employee is terminated in BambooHR

Then

  1. List users in Spendesk to find the employee
  2. Deactivate a user

With BambooHR

Apps you can build on Spendesk data

Internal tools your team can build with an AI assistant, each one using Spendesk calls from its API documentation.

Payables review board

Lists payables as they are created or prepared and shows the supplier for each one.

Purchase order tracker

Lists purchase orders and lets a budget owner close or cancel ones that are done.

Supplier request form

Lets a requester add a new supplier and shows existing ones to avoid duplicates.

Give your AI agents Spendesk tools

Build an MCP server on Spendesk in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works

  • Search payables
  • List suppliers
  • List users
  • List purchase orders
  • List invoices
  • Get a payable
  • Create a supplier
  • Update a supplier

What the Spendesk API covers

5 resources and 15 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Spendesk gives API access on request, so approved credentials come first. Connecting it takes a few clicks: here's how.

Payables

  • Search payables
  • Get a payable

Suppliers

  • List suppliers
  • Create a supplier
  • Update a supplier
  • Archive a supplier

Users

  • List users
  • Update a user
  • Deactivate a user

Purchase orders

  • List purchase orders
  • Create a purchase order
  • Cancel a purchase order
  • Close a purchase order

Invoices

  • List invoices
  • Get an invoice

Events Spendesk can send to a Tray.ai webhook trigger

  • Payable created
  • Payable prepared
  • Settlement created

Checked against Spendesk's own documentation on 2026-11-07

developer.spendesk.com

Frequently asked questions

What can a Tray.ai workflow do in Spendesk?

+

The Spendesk API documents 15 actions across 5 resources (Payables, Suppliers, Users, Purchase orders, Invoices). For example: Search payables; List suppliers; List users. A workflow can make any documented call through the HTTP Connector.

How does Tray.ai authenticate with Spendesk?

+

The Spendesk API uses basic authentication, a bearer token, and OAuth 2.0. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.

Which Spendesk events can start a Tray.ai workflow?

+

Spendesk sends 3 events to a webhook URL, for example: Payable created; Payable prepared; Settlement created. A Tray.ai webhook trigger receives them and starts a workflow.

Do I need special access to the Spendesk API?

+

Yes. Spendesk gives API access on request, so you need approved credentials before a Tray.ai workflow can call it.

See Spendesk working against your stack.

We'll walk through a tailored demo with your systems plugged in.

Great — a couple more details

This helps us connect you with the right person. Optional, and you can skip it.