Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Yokoy User API

Users in Yokoy reflect the fundamental roles of submitter, approver, and finance user. Mandatory user information depends on the specific organization requirements and Yokoy features enabled.Email addresses must be unique for the organization. You cannot create two users with the same email address. If the email address provided already exists in the organization, the API returns an error.Bank information can be provided as part of POST, PUT, and PATCH requests, however, the response does not return this information for security reasons.**Note**: You can‘t use the User endpoints to determine the roles and permissions assigned to a user. You can only use the endpoints to create a new user.Roles and permissions are granted to a user in Yokoy (**Admin > Finance/HR roles**). You must have previously created the user before assigning roles and permissions.- **Booking strategy**: You can export expenses based on the user selected currency (instead of the company currency or the original expense currency). If you choose this option, you need to provide the user's currency.- **Approval strategy**: If you plan to approve expenses using a line manager approval strategy, then you need to enter a line manager for each user.- **Expense accounting**: If expenses are to be posted via the employee vendor account, the field `employeeId` should reflect employee vendor account number. If you want to track the employee number, you should set up a custom field to add this information.- **User policy**: You can assign rank-specific expense policies to certain users and user groups to determine applicable expense rules, per diem and mileage rates, as well as expense categories. If you choose this option, then you need to enter the policy ID.For any unrecognized IDs, Yokoy creates or updates the user attribute with the value `null`. For example, if you pass `Y6cp2G30M` as the `lineManagerId` and no user exists for that ID, Yokoy updates the line manager ID attribute as `null`.To guarantee spend data traceability, when you delete a user via the Yokoy API, the email is changed to an email address with the format: `deleted_user_` + user ID. For example, `deleted_user_lK6jo1GmSkXJzSyZSA2f@localhost.invalid`. The user is still displayed in **HR > User management** with a deleted tag and can’t be re-activated or edited. The user can still be retrieved via the Yokoy API using the Yokoy user ID. However, the user is not returned if you retrieve all users using a GET method. Deleted users can’t be re-activated in any way.

Yokoy User API is one of 22 APIs that Yokoy publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include User. The published artifact set on APIs.io includes an OpenAPI specification and authentication docs.

This API exposes 6 operations across 2 paths, and defines 3 schemas. It is described by OpenAPI 3.0.0, at version 1.41.0.

Requests are made against 2 base URLs: https://api.yokoy.ai/v1/organizations/{organizationId}, https://api.test.yokoy.ai/v1/organizations/{organizationId}.

6 operations 2 paths 3 schemas 1 DELETE2 GET1 PATCH1 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
API Version
1.41.0
Base URL
https://api.yokoy.ai/v1/organizations/{organizationId}
Authentication
OAuth 2.0
Resource Areas
1

Authentication & Security 1

Yokoy User API declares 1 security scheme for authenticating requests. It supports OAuth 2.0 (OAuth2) using the clientCredentials flow.

  • OAuth2 — Authentication to the Yokoy API relies on the standard OAuth2 client credentials flow. 1. Obtain an access token Perform a POST request to https://accounts.yok…

Paths & Operations 6

Across 2 paths, the API surfaces 6 operations — 1 DELETE, 2 GET, 1 PATCH, 1 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

User 6

Users in Yokoy reflect the fundamental roles of submitter, approver, and finance user. Mandatory user information depends on the specific organization requirements and Yokoy featu…

GET
/users
List all users for the organization
listUsers 5 params → 200400401403429500502503
POST
/users
Create a user
createUser 2 params body → 201400401403429500502503
DELETE
/users/{userId}
Delete a user
deleteUser 3 params → 204401403404429500502503
GET
/users/{userId}
Get a user by ID
getUser 3 params → 200401403404429500502503
PATCH
/users/{userId}
Modify a user
modifyUser 3 params body → 200400401403404429500502
PUT
/users/{userId}
Update a user
updateUser 3 params body → 200400401403404429500502

Schemas 3

The contract defines 3 schemas that model the data the API accepts and returns. The most detailed are User (20 properties), UserBankInformation (3 properties), Error (2 properties). Each schema is shown below with its type and property counts.

UserBankInformation
object
3 properties
User
object
20 properties 6 required
Error
object
2 properties 2 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

yokoy-user-api-openapi.yml Raw ↑

Other APIs Yokoy publishes across the network.

Yokoy Card account API
Yokoy Company card API
Yokoy Cost center API
Yokoy Daily statement API
Yokoy Expense API
Yokoy Expense category API
Yokoy External invoice API
Yokoy Finance export API
Yokoy FX rates API
Yokoy Goods receipt API
Yokoy Invoice API
Yokoy Invoice category API