canonical: https://jentic.com/apis/spendesk.com/spendesk

# Spendesk API

Spendesk public API for managing spend data, suppliers, users, purchase orders, analytical fields, webhooks, and accounting exports. The API exposes 42 endpoints secured with bearer, oauth2 authentication.

## For AI agents

Programmatically create access token, retrieve settlement records. Covers 42 operations with bearer, oauth2 authentication.

## Scope

Does not handle payments, communications, or crm - use for developer tools only.

## Capabilities

- Create access token
- Retrieve settlement records
- Update settlement status
- Get a specific payable by ID
- Monitor Spendesk API operational status and events

## Use cases

### Developer Tools Operations

Use the Spendesk API to perform developer tools operations programmatically. The API provides 42 endpoints covering core functionality including create access token, retrieve settlement records, update settlement status.

Example prompt: Call POST `/auth/token` to create access token

### Automated Authentication Management

Automate authentication operations by combining multiple Spendesk API endpoints. Agents can retrieve settlement records and then update settlement status in a single workflow.

Example prompt: Call GET /settlements to retrieve settlement records, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Spendesk API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle bearer, oauth2 tokens manually.

Example prompt: Search Jentic for 'create access token', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/auth/token` | Create access token |
| GET | `/settlements` | Retrieve settlement records |
| PUT | `/settlements/state` | Update settlement status |
| GET | `/bank-fees` | Retrieve bank fee data |
| POST | `/snapshots/payables` | Create a payables snapshot |
| GET | `/snapshots/payables` | Retrieve a payables snapshot |
| GET | `/payables/{id}` | Get a specific payable by ID |
| GET | `/payables/{id}/attachments` | Retrieve payable attachments |

## Key resources

- **Authentication** — OAuth2 token management
- **Spend Data** — Payables, settlements, wallet, and bank fees
- **Analytical** — Analytical fields, expense categories, and cost centers
- **Suppliers** — Supplier management
- **Users** — User management

## Why Jentic

- **Setup:** Wiring Spendesk by hand means running its OAuth2 token flow, carrying the bearer token on every request, and routing across settlements, payables, suppliers, and webhooks yourself. Through Jentic you install once, import the Spendesk API from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** Spendesk puts resource ids in the URL path (`/payables/{id}`, `/suppliers/{id}`, `/purchase-orders/{id}`), so a rule can pin your agent to one payable or supplier: it reads that resource and nothing else. You choose the operations it may call, so ones like deleting a cost center or closing a purchase order are not included unless you add them.
- **Credential handling:** Your Spendesk credentials are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get a payable' or 'list suppliers', and Jentic returns the matching Spendesk operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Github** — Alternative developer tools API
- **Gitlab** — Alternative developer tools API

## FAQ

### What authentication does the Spendesk API use?

The Spendesk API uses bearer, oauth2 authentication. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I create access token with the Spendesk API?

Yes. Use the POST `/auth/token` endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Spendesk API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I create access token through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'create access token'. Jentic returns the matching Spendesk API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Spendesk API have?

The Spendesk API exposes 42 endpoints covering authentication, spend data, analytical operations.

### Can I limit what my agent is allowed to do with the Spendesk API?

Yes. Because you run Jentic One yourself, your own rules decide which Spendesk operations and credentials the agent may use. Spendesk carries resource ids in the URL path, such as `/payables/{id}`, `/suppliers/{id}`, and `/purchase-orders/{id}`, so a rule can pin the agent to a single payable or supplier and let it read that resource and nothing else. You also choose the operations it may call, so actions like deleting a cost center or closing a purchase order stay out of reach unless you add them.
