Create an expense for the authenticated employee
Changed onCreates a new expense record for the current employee.
Authentication
This endpoint accepts any one of the following token types:
- Employee-scoped access token (OAuth2Assertion) — obtained through the urn:ietf:params:oauth:grant-type:jwt-bearer grant. See OAuth Assertion.
- Company-scoped access token (OAuth2AuthorizationCode) — obtained by the employee through the Authorization Code flow or the Refresh Token flow. See Authentication for partners.
Scopes
Any one of the scopes in a token type's row is enough. all:write works too.
| Token type | Category | Read only Scope | Write only Scope (read access implicit) |
|---|---|---|---|
| Employee-scoped access token | Manage expenses (employment_payments) | - | - |
| Company-scoped access token | Manage expenses (employment_payments) | - | Manage expenses (expense:write) |
Request
- Base URLhttps://gateway.remote.com
- Auth
- OAuth 2Client credentialsToken URL/auth/oauth2/tokenScopesemployment_payments
- or OAuth 2Client credentialsToken URL/auth/oauth2/tokenScopesall:write
- or OAuth 2Authorization code/auth/oauth2/authorizeToken URL/auth/oauth2/tokenScopeshttps://gateway.remote.com/employment.manage
- or OAuth 2Authorization code/auth/oauth2/authorizeToken URL/auth/oauth2/tokenScopesexpense:write
- or OAuth 2Authorization code/auth/oauth2/authorizeToken URL/auth/oauth2/tokenScopesall:write
Request body
Params for creating an expense as the authenticated employee.
The employment is implied by the access token, so employment_id is not accepted. reviewer_id and reviewed_at are also omitted — they only apply to manager-created expenses.
Category selection mirrors the company endpoint: use either category (legacy enum, deprecated but supported) or expense_category_slug (recommended). When both are provided, expense_category_slug wins.
expense_category_slug must be the slug of a category listed for the employee by GET /v1/employee/expense-categories. Slugs differ between sandbox and production, so read them from that endpoint instead of storing them. A slug that isn't listed is refused, unless category is also sent: then category is used.
The expense amount in the specified currency, in cents.
Categories allowed for an expense (legacy, deprecated).<br/> Note: coworking, home_office, phone_utilities, travel are deprecated and will be removed in the future.
The three-letter code for the expense currency.<br/> Examples: "USD", "EUR", "CAD"
Slug of a category listed by GET /v1/employee/expense-categories for the employee (recommended). Takes precedence over legacy category field.
Date of the purchase, which must be in the past
All the params needed upload a base64 file.
The tax portion of the expense amount, in cents. Use 0 if no tax applies.
A short description of the expense (e.g., "New keyboard", "Team dinner").
Example request
{
"amount": 8000,
"currency": "EUR",
"expense_category_slug": "uuid-tech-equipment-slug",
"expense_date": "2020-12-11",
"receipt": {
"content": "UGVyaW9kIEVuZCBEYXRlLFBheSBEYXRlLEVtcG...5jZSBPZiBSZXNpZGVuYdXJyZW50LEFsbG93",
"name": "receipt.pdf"
},
"tax_amount": 0,
"timezone": "Etc/UTC",
"title": "new keyboard"
}Response
Created
A generic success response returned by operations that don't produce a specific resource (e.g., updates, deletes).
Example response
{
"data": {
"status": "ok"
}
}Changes
- info
the security scope
employment_paymentswas added to the endpoint's security schemeOAuth2Assertion - info
the security scope
https://gateway.remote.com/employment.managewas added to the endpoint's security schemeOAuth2AuthorizationCode - info
the security scope
all:writewas removed from the endpoint's security schemeOAuth2Assertion
1 more change in this revision
- info