Authentication
Manage API keys and verify identity.
All auth endpoints support session authentication (browser cookie) with API key fallback. This means you can call these endpoints from the browser (using your Meteor login session) or from scripts and external clients (using a valid API key in the X-API-Key header).
An API key needs the credentials:read scope to list your keys and the apps signed in as you, and credentials:write to create, rotate, revoke or delete a key or to sign an app out. Only the developer bundle includes them; name them on any other key that should manage your keys. See Scopes.
POST /api/v1/me/api-keys
Create a new API key
Returns the raw key value once -- store it securely.
Authentication: Session (browser cookie) or API key
Request Body:
{
"name": "My CI/CD Key",
"scopes": ["apps:read", "apps:deploy", "workflows:execute"],
"expiresInDays": 90
}
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable key name (non-empty) |
scopes | string[] | Yes | Permission scopes (non-empty array; see Scopes) |
expiresInDays | integer | No | Days until expiration. Omit for no expiration |
Response: 201 Created
{
"data": {
"id": "67a1b2c3d4e5f6a7b8c9d0e1",
"key": "sk-prod-a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"name": "My CI/CD Key",
"keyPrefix": "sk-prod-a1b2",
"scopes": ["apps:read", "apps:deploy", "workflows:execute"],
"expiresAt": "2025-05-07T00:00:00.000Z",
"createdAt": "2025-02-07T00:00:00.000Z"
},
"meta": { "requestId": "req_abc123" }
}
| Field | Type | Description |
|---|---|---|
id | string | MongoDB document ID |
key | string | The raw API key (only returned once) |
name | string | Key name |
keyPrefix | string | First 12 characters of the key |
scopes | string[] | Assigned permission scopes |
expiresAt | string | null | ISO-8601 expiration date, or null if no expiration |
createdAt | string | ISO-8601 creation date |
The key field is only returned once at creation time. Store it securely -- it cannot be retrieved later.
GET /api/v1/me/api-keys
List API keys for the current user
Authentication: Session (browser cookie) or API key
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
status | query | string | No | Filter by status: active, revoked, expired |
limit | query | integer | No | Max results (default: 50, max: 200) |
cursor | query | string | No | meta.nextCursor of the previous page; omit for the first page |
sort | query | string | No | Sort field (default: -createdAt) |
Response: 200 OK (paginated)
{
"data": [
{
"_id": "67a1b2c3d4e5f6a7b8c9d0e1",
"keyPrefix": "sk-prod-a1b2",
"name": "My CI/CD Key",
"userId": "user123",
"organizationId": "org-abc",
"scopes": ["apps:read", "apps:deploy"],
"status": "active",
"expiresAt": "2025-05-07T00:00:00.000Z",
"lastUsedAt": "2025-02-06T10:30:00.000Z",
"lastUsedIp": "192.168.1.1",
"createdAt": "2025-02-07T00:00:00.000Z",
"revokedAt": null,
"revokedBy": null,
"metadata": null
}
],
"meta": { "total": 3, "limit": 50, "nextCursor": null, "requestId": "req_abc123" }
}
| Field | Type | Description |
|---|---|---|
_id | string | MongoDB document ID |
keyPrefix | string | First 12 characters of the key |
name | string | Key name |
userId | string | Owning user ID |
organizationId | string | null | Bound organization |
scopes | string[] | Permission scopes |
status | string | active, revoked, or expired (a key past its expiresAt is expired) |
expiresAt | string | null | Expiration date |
lastUsedAt | string | null | Last request timestamp |
lastUsedIp | string | null | Last request IP address |
createdAt | string | Creation timestamp |
revokedAt | string | null | Revocation timestamp (if revoked) |
revokedBy | string | null | User who revoked (if revoked) |
metadata | object | null | Optional metadata (userAgent, description) |
GET /api/v1/me/api-keys/:id
Get a single API key
Authentication: Session (browser cookie) or API key
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | API key ID (_id from list response) |
Response: 200 OK
{
"data": {
"_id": "67a1b2c3d4e5f6a7b8c9d0e1",
"keyPrefix": "sk-prod-a1b2",
"name": "My CI/CD Key",
"userId": "user123",
"organizationId": "org-abc",
"scopes": ["apps:read", "apps:deploy"],
"status": "active",
"expiresAt": "2025-05-07T00:00:00.000Z",
"lastUsedAt": "2025-02-06T10:30:00.000Z",
"lastUsedIp": "192.168.1.1",
"createdAt": "2025-02-07T00:00:00.000Z",
"revokedAt": null,
"revokedBy": null,
"metadata": null
},
"meta": { "requestId": "req_abc123" }
}
Returns the same fields as the list endpoint for a single key.
POST /api/v1/me/api-keys/:id/revoke
Revoke an API key
The key stops working at once and stays in your list as revoked. This cannot be undone. A key already revoked is refused (409).
Authentication: Session (browser cookie) or API key
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | API key ID |
Response: 200 OK with the key, as GET /me/api-keys/:id shows it.
DELETE /api/v1/me/api-keys/:id
Delete an API key that no longer works
Deletes a revoked or expired key: it leaves your list. A key that still works is refused (409): revoke it first.
Authentication: Session (browser cookie) or API key
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | API key ID |
Response: 204 No Content
POST /api/v1/me/api-keys/:id/rotate
Rotate an API key
Revokes the old key and creates a new one with the same name, scopes, and expiration. For Default Platform Keys, also updates profile.stronglyApiKey on the user document.
Authentication: Session (browser cookie) or API key
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | API key ID |
Response: 201 Created
{
"data": {
"id": "67b2c3d4e5f6a7b8c9d0e1f2",
"key": "sk-prod-q1w2e3r4t5y6u7i8o9p0a1s2d3f4g5h6",
"name": "My CI/CD Key",
"keyPrefix": "sk-prod-q1w2",
"scopes": ["apps:read", "apps:deploy"],
"expiresAt": "2025-05-07T00:00:00.000Z",
"createdAt": "2025-02-08T00:00:00.000Z"
},
"meta": { "requestId": "req_abc123" }
}
Returns the same fields as the create endpoint, including the new raw key.
The new key is only returned once. Store it securely -- the old key is immediately revoked and cannot be used.
GET /api/v1/me/app-sign-ins
The apps signed in as you
Each install of the Strongly iPhone app, and of a connected app (an app's own native app signing in through the app's sign-in), that holds a credential of yours, most recently used first. Each install has its own credential: signing in on one never signs out another app, device or browser. Browsers are not listed. STAN tool: list_app_sign_ins.
Authentication: Session (browser cookie) or API key
Parameters: limit (default 50, max 200) and cursor (meta.nextCursor of the previous page).
Response: 200 OK
{
"data": [
{
"_id": "6F1C2D3E-4A5B-4C6D-8E7F-90A1B2C3D4E5",
"clientId": "strongly-ios",
"appId": null,
"appName": "Strongly",
"deviceName": "iPhone",
"platform": "iOS 26.1",
"signedInAt": "2026-10-25T14:02:11.000Z",
"lastUsedAt": "2026-10-25T16:40:03.000Z",
"expiresAt": "2026-11-24T16:40:03.000Z"
}
],
"meta": { "total": 1, "limit": 50, "nextCursor": null, "requestId": "req_abc123" }
}
_id is the install. clientId is strongly-ios for the Strongly app, or the connected app's id (appId). expiresAt is when the install signs out unless it is used before: 30 days after its last use, renewed on each use. A Strongly app key from before per-install sign-ins (one that names no install) is signed out on its next use: the request gets the 401 any ended key gets, the key is revoked, and the app signs in again as an install.
DELETE /api/v1/me/app-sign-ins/:id
Sign one app install out
The install's key and sessions stop working at once; every other app, device and browser stays signed in. The app signs in again to be used. The Strongly app calls it for itself when you sign out. STAN tool: remove_app_sign_in.
Authentication: Session (browser cookie) or API key
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The install (_id from GET /me/app-sign-ins) |
Response: 204 No Content. An install with nothing signed in answers 404.
POST /api/v1/me/app-sign-ins/:id/web-sessions
The Strongly app install's web session
The Strongly app keeps one credential, its install's key. When it opens an app or a workspace in its web view it takes the browser session that needs here, with that key, and keeps it while it works. An app user's install holds no key (app users never hold API keys): its one credential is its sign-in's own session, which opens their apps, so it takes none here. cookieName is the platform's login cookie the token goes in (__Host-meteor_login_token on a platform with an apps domain, meteor_login_token otherwise). The session is the install's app session: Remove, sign-out, a password change or reset, and deactivation end it, and a new one replaces the install's earlier one. Only a Strongly app install's own key takes one, for itself (a personal API key or another install's key is refused with 403); an install takes at most 10 a minute (429 past that); each one is recorded in the security log.
Authentication: the install's API key
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The install (its install id) |
Response: 201 Created
{ "data": { "_id": "sess_abc", "loginToken": "…", "cookieName": "__Host-meteor_login_token", "expiresAt": "2026-11-24T12:00:00.000Z" }, "meta": { "requestId": "req_abc123" } }
GET /api/v1/me
Who you are authenticated as
Your user, your organization, and the API key the call used. Documented with your account under Users; it needs no scope, so it is the simplest way to check a key works.
Credentials
A request presents one credential, and the first of these it sends decides:
| Credential | Header | Who sends it |
|---|---|---|
| API key | X-API-Key: sk-prod-... | Code outside the platform (a laptop, CI, an external system) |
| Bearer token | Authorization: Bearer <token> | Code inside the platform: the pod's auth-proxy adds its owner's token |
A credential that does not verify is refused with 401 and the reason in detail (for example The API key has expired or The bearer token does not verify: jwt expired); the request is never tried with another header instead.
X-Strongly-User-Token names the signed-in user of an app. It travels with the app's bearer token (an app forwards it to act for its user on the agent routes: see Agent Clones) and is not a credential on its own: a request that sends only it is refused. A user token that does not verify, has expired, or names a user who no longer exists, or is archived or deactivated, is refused with 401; the call is never made as the app's owner instead.
Troubleshooting 401 Errors
If you receive a 401 Unauthorized response when using an API key, check the following:
1. Verify the header format
The key must be sent in the X-API-Key header:
curl -H "X-API-Key: sk-prod-your-key-here" \
https://<your-instance>/api/v1/me
2. Verify the key prefix
All API keys start with sk-prod-. If your key does not start with this prefix, it is not a valid Strongly API key.
3. Check key status
Your key may have been revoked or expired. List your keys via the UI (Profile > Security > API Keys) or via session auth:
# List keys using session auth (from browser dev tools, copy your meteor_login_token cookie)
curl -b "meteor_login_token=your-session-token" \
https://<your-instance>/api/v1/me/api-keys?status=active
4. Confirm there are no extra characters
Ensure no whitespace, newlines, or quotes are included in the key value. Copy-paste errors are common.
5. Test with GET /me
GET /api/v1/me is the simplest way to verify your key works:
curl -v -H "X-API-Key: sk-prod-your-key-here" \
https://<your-instance>/api/v1/me
A successful response returns you, your organization and the key's details. A 401 response means the key is invalid, expired, or revoked.
Default Platform Key
When a developer or admin account is created (or an account is given one of those roles, or brought back from deactivated or archived), a Default Platform Key is automatically provisioned with * (wildcard) scopes. App users (platform role app) never hold an API key: they use the platform only through their app, an app user cannot create one, and a user who becomes an app user loses every key they held. This key is:
- Stored in
profile.stronglyApiKeyon the user document for workspace injection - Marked as the default platform key in the API Keys list in the UI (Profile > Security > API Keys); the REST key list and get do not return that flag
- Cannot be revoked -- use rotate instead to replace it
- Automatically rotated when you rotate it via the API or UI, keeping
profile.stronglyApiKeyin sync
Workspaces use this key as their STRONGLY_API_KEY environment variable, so rotating it will require restarting running workspaces to pick up the new key.