Admin guide
API
Getting started

Getting started

The Seamless REST API allows you to integrate Seamless governance and lifecycle features for Microsoft 365 directly into your own systems and processes.

The Seamless API Explorer lets you explore and test the Seamless API using your Microsoft 365 tenant.
Seamless API Explorer ↗︎ (opens in a new tab)

To get started with the Seamless API, follow the steps below:

1. Create API key

An API key is required to authenticate your requests and securely access the Seamless API.

Where to start

To generate a new API key, navigate to the API keys section in the Seamless Admin Center.
This is where you can create and manage the credentials needed to authenticate with the Seamless REST API.

Click on “Add API key” to start the process of creating a new key.

Generate new API key

Enter a descriptive name for your API key — this helps you identify its purpose later.

Click on "Generate"

Copy key and save in secure location

After clicking generate, the secret will be displayed.

⚠️

The secret is displayed only once. Be sure to copy it and save it in a secure location.


2. Get access token

To make authenticated requests to the Seamless API, you first need to exchange your API credentials for a bearer token.

Use your Microsoft 365 Tenant ID, along with the keyId and secret generated in the Seamless Admin Center. These credentials will be used to request a secure API token, which is then included in all subsequent API calls.

Find your tenant id

You can find your Tenant ID in the URL of the Seamless Admin Center. It appears directly after the base URL.

https://admin.seamlesswork.com/{YourTenantID}/...

The Key and Secret were created in the Create API key step. You should have saved the secret securely.

You can find the Key ID in the API Key section in the Seamless Admin Portal.

Request access token

We recommend using the integrated client in our Seamless API Explorer ↗︎ (opens in a new tab) to run the request. Alternatively, you can use any API client of your choice or simply execute the request using a cURL command in your terminal.

POST https://sml-api.io/token
Content-Type: application/json
 
{
  "tenantId": "********-****-****-****-************",
  "keyId": "********-****-****-****-************",
  "secret": "************************"
}
 

Response

HTTP/1.1 200 OK
Content-type: application/json
{
  "accessToken": "*******************************",
  "tenantId": "********-****-****-****-************",
  "expiresAt": "2025-04-09T17:28:24.1122861Z"
}

Copy the accessToken from the response. Use this bearer token to authenticate API request.

Bearer Token Lifetime ⏳
For security reasons, the generated bearer token expires after 24 hours. Depending on your solution, we recommend either securely storing the token for reuse or generating a new one each time you call the API.