Introduction
The Mesh API Documentation - integrate with Mesh's trading infrastructure.
What is Mesh API?
The Mesh API provides programmatic access to Mesh's trading platform. Build trading applications, manage client portfolios, automate compliance workflows, and integrate financial services into your platform.
To jump to the complete list of available services go to API Reference.
Quick Start
Get started with the Mesh API using the API User Service.
1. Create an API User and Credentials
- Log in to Mesh and select API Users from the user drop down menu on the main task bar to get to the API User Management Screen.

- Select the 'Create API User' button in the top right of the table to open the API User Creation dialog.

- Enter a display name for the API User and select one or more groups in which roles are to be granted to the new API User.


- Then select roles to Assign to the API User in the selected group(s) (for the coming example to work select at least the IAM Viewer Role).
- Select Create API user to complete the creation.


See Access Control for more information on group, roles access control in Mesh.
- On successful creation a dialog opens with the new API User's credentials. Download or copy them. They are required to authenticate SDKs to use the Mesh API.

Keep your API credentials file secure! Never commit this credentials file to version control!
- The new API User is inactive on creation. Select its row in the table and click on the Activate button in the table header to activate it so that it is ready for use.

2. Credentials Setup
Mesh API SDKs are configured to automatically discover your credentials.
For this to work, create a mesh subdirectory in your platform's application data/configuration directory and
place your credentials.json file inside it.
The application data/configuration directory differs by platform:
- Linux:
~/.config/mesh/credentials.json - macOS:
~/Library/Application Support/mesh/credentials.json - Windows:
C:\Users\<user>\AppData\Roaming\mesh\credentials.json
Credential file location can also be indicated by environment variable:
export MESH_API_CREDENTIALS=/path/to/your/credentials.json
For more information about authentication see Access Control.
3. SDK Installation
Install the SDK for your preferred language:
- Go
- Python
- Java
go get github.com/meshtrade/api/go
pip install meshtrade
To include this SDK in your Maven project, add the following dependency to your pom.xml file:
<dependency>
<groupId>co.meshtrade</groupId>
<artifactId>api</artifactId>
<version>LATEST</version>
</dependency>
Important: Always use a specific version number (e.g., 1.2.3) instead of LATEST to ensure your build is stable and reproducible. You can find the latest version on the co.meshtrade.api Maven Central repository page.
4. Your First API Request
As a first API request to confirm that everything is working call the SearchApiUsers API to retrieve your new API Key:
- Go
- Python
- Java
package main
import (
"context"
"log"
api_userv1 "github.com/meshtrade/api/go/iam/api_user/v1"
)
func main() {
// 1. Construct API User Service
service, err := api_userv1.NewAPIUserService()
if err != nil {
log.Fatalf("Failed to create service: %v", err)
}
defer service.Close()
// 2. Call Search API Users Method
response, err := service.SearchAPIUsers(
context.Background(),
&api_userv1.SearchAPIUsersRequest{DisplayName: "New Key"},
)
if err != nil {
log.Fatalf("SearchAPIUsers failed: %v", err)
}
// 3. Use response
log.Printf("SearchAPIUsers successful: %+v", response)
}
from meshtrade.iam.api_user.v1 import (
ApiUserService,
SearchApiUsersRequest,
)
def main():
# 1. Construct API User Service
service = ApiUserService()
# 2. Call Search API Users Method
with service:
response = service.search_api_users(SearchApiUsersRequest(display_name="New Key"))
# 3. Use response
print("SearchApiUsers successful:", response)
if __name__ == "__main__":
main()
import co.meshtrade.api.iam.api_user.v1.ApiUserService;
import co.meshtrade.api.iam.api_user.v1.Service.SearchApiUsersRequest;
import co.meshtrade.api.iam.api_user.v1.Service.SearchApiUsersResponse;
import java.util.Optional;
public class Example {
public static void main(String[] args) {
// 1. Construct API User Service
try (ApiUserService service = new ApiUserService()) {
// 2. Call Search API Users Method
SearchApiUsersResponse response = service.searchApiUsers(
SearchApiUsersRequest.newBuilder().setDisplayName("New Key").build(),
Optional.empty());
// 3. Use response
System.out.println("SearchApiUsers successful: " + response);
} catch (Exception e) {
System.err.println("SearchApiUsers failed: " + e.getMessage());
e.printStackTrace();
}
}
}
This will only work if:
- Either IAM Admin or IAM Viewer role was assigned to the API User on creation
- The API User is Active
- API Credentials are discoverable
Next Steps
After setting up your API connection, review these core concepts before integrating.
📋 Learn About Service Structure
Understand how our APIs are organized and the common patterns used across all services.
👉 Service Structure Guide - Learn about resource-oriented design, standard verbs, and API patterns
🔐 Access Control
Understand authentication, authorisation, group hierarchy, and role-based access control.
👉 Access Control Guide - Authentication, RBAC, resource ownership, and scoping
📚 Additional Resources
- API Reference - Complete API documentation
- Roadmap - Upcoming features and improvements