Skip to main content

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.

info

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

  1. Log into Mesh as an administrator and go to the API Users tab on the administration page. Then click the Create API User button on the table header.

Administration API Keys Create

  1. Enter a display name for the API User and select one or more roles (for the coming example to work select at least the IAM Viewer Role). These roles will be assigned to the API User in the group that will own it - the top level group of the client that you are logged in as. Select Create API user to complete the creation.

Create API User Dialog

Create API User Dialog Add Roles

info

See Resource Hierarchy Structure for more information on group structures in Mesh.

  1. 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.

Download API User Credentials

danger

Keep your API credentials file secure! Never commit this credentials file to version control!

  1. 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.

Create API User Dialog

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
info

For more information about authentication see API Access.

3. SDK Installation

Install the SDK for your preferred language:

go get github.com/meshtrade/api/go

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:

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)
}
note

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

🏢 Group Ownership Structure

Learn how groups provide ownership and isolation boundaries for your resources.

👉 Resource Hierarchy Guide - Understand multi-tenancy, resource isolation, and group management

🔐 Permissions Structure

Discover our schema-driven authorization system and role-based access control.

👉 Roles & Permissions Guide - Master RBAC, roles, and permission management

📚 Additional Resources