Download OpenAPI specification:Download
Public API reference for the Latch Vector SSO / identity service. Operator-only internal and platform endpoints are intentionally excluded.
Register and list machine-to-machine clients (the client_credentials grant). Requires the CLIENT_MANAGE permission on a user token.
Creates a machine client for an organization. The response carries the plaintext secret EXACTLY ONCE — it is stored only as a hash and cannot be retrieved again. The client then authenticates at POST /oauth2/token.
| name required | string non-empty |
| orgId required | integer <int64> |
| applicationId | integer <int64> |
| scopes | Array of strings |
{- "name": "string",
- "orgId": 0,
- "applicationId": 0,
- "scopes": [
- "string"
]
}| organizationId required | integer <int64> |
| applicationId required | integer <int64> |
| url required | string non-empty |
| eventTypes | Array of strings |
{- "organizationId": 0,
- "applicationId": 0,
- "url": "string",
- "eventTypes": [
- "string"
]
}| organizationId required | integer <int64> |
| email required | string non-empty |
| fullName required | string non-empty |
| password | string |
| roleId | integer <int64> |
{- "organizationId": 0,
- "email": "string",
- "fullName": "string",
- "password": "string",
- "roleId": 0
}| roleId required | integer <int64> |
| permissionCodes | Array of strings |
| permissionIds | Array of integers <int64> [ items <int64 > ] |
{- "permissionCodes": [
- "string"
], - "permissionIds": [
- 0
]
}| organizationId | integer <int64> |
| name required | string non-empty |
| description | string |
| permissionCodes | Array of strings |
| permissionIds | Array of integers <int64> [ items <int64 > ] |
| scope | string |
{- "organizationId": 0,
- "name": "string",
- "description": "string",
- "permissionCodes": [
- "string"
], - "permissionIds": [
- 0
], - "scope": "string"
}| applicationId required | integer <int64> |
| name required | string non-empty |
| webRefreshTtlDays | integer <int32> [ 1 .. 180 ] |
| deviceRefreshTtlDays | integer <int32> [ 1 .. 180 ] |
{- "name": "string",
- "webRefreshTtlDays": 1,
- "deviceRefreshTtlDays": 1
}| organizationId required | integer <int64> |
| identifier required | string non-empty |
| name required | string non-empty |
| webRefreshTtlDays | integer <int32> [ 1 .. 180 ] |
| deviceRefreshTtlDays | integer <int32> [ 1 .. 180 ] |
{- "organizationId": 0,
- "identifier": "string",
- "name": "string",
- "webRefreshTtlDays": 1,
- "deviceRefreshTtlDays": 1
}| rootParentOrgId | integer <int64> |
object (NewTenant) | |
Array of objects (Org) | |
Array of objects (App) | |
Array of objects (Perm) | |
Array of objects (RoleDef) | |
Array of objects (UserDef) | |
Array of objects (Assignment) |
{- "rootParentOrgId": 0,
- "rootTenant": {
- "orgName": "string",
- "slug": "string"
}, - "organizations": [
- {
- "externalId": "string",
- "name": "string",
- "slug": "string",
- "type": "string",
- "parentExternalId": "string"
}
], - "applications": [
- {
- "externalId": "string",
- "orgExternalId": "string",
- "identifier": "string",
- "name": "string"
}
], - "permissions": [
- {
- "externalId": "string",
- "appExternalId": "string",
- "code": "string",
- "description": "string"
}
], - "roles": [
- {
- "externalId": "string",
- "orgExternalId": "string",
- "name": "string",
- "description": "string",
- "scope": "string",
- "permissionCodes": [
- "string"
], - "permissionExternalIds": [
- "string"
]
}
], - "users": [
- {
- "externalId": "string",
- "orgExternalId": "string",
- "email": "string",
- "fullName": "string",
- "passwordBcrypt": "string"
}
], - "assignments": [
- {
- "userExternalId": "string",
- "roleExternalId": "string",
- "orgExternalId": "string"
}
]
}| rootParentOrgId | integer <int64> |
object (NewTenant) | |
Array of objects (Org) | |
Array of objects (App) | |
Array of objects (Perm) | |
Array of objects (RoleDef) | |
Array of objects (UserDef) | |
Array of objects (Assignment) |
{- "rootParentOrgId": 0,
- "rootTenant": {
- "orgName": "string",
- "slug": "string"
}, - "organizations": [
- {
- "externalId": "string",
- "name": "string",
- "slug": "string",
- "type": "string",
- "parentExternalId": "string"
}
], - "applications": [
- {
- "externalId": "string",
- "orgExternalId": "string",
- "identifier": "string",
- "name": "string"
}
], - "permissions": [
- {
- "externalId": "string",
- "appExternalId": "string",
- "code": "string",
- "description": "string"
}
], - "roles": [
- {
- "externalId": "string",
- "orgExternalId": "string",
- "name": "string",
- "description": "string",
- "scope": "string",
- "permissionCodes": [
- "string"
], - "permissionExternalIds": [
- "string"
]
}
], - "users": [
- {
- "externalId": "string",
- "orgExternalId": "string",
- "email": "string",
- "fullName": "string",
- "passwordBcrypt": "string"
}
], - "assignments": [
- {
- "userExternalId": "string",
- "roleExternalId": "string",
- "orgExternalId": "string"
}
]
}| web | boolean Default: false |
| pendingToken required | string non-empty |
| code required | string non-empty |
| audience | string |
object (DeviceInfo) |
{- "pendingToken": "string",
- "code": "string",
- "audience": "string",
- "device": {
- "deviceId": "string",
- "name": "string",
- "platform": "string"
}
}| web | boolean Default: false |
| email required | string non-empty |
| password required | string non-empty |
| audience | string |
object (DeviceInfo) |
{- "email": "string",
- "password": "string",
- "audience": "string",
- "device": {
- "deviceId": "string",
- "name": "string",
- "platform": "string"
}
}The client_credentials grant. Authenticate with HTTP Basic using the
clientId as username and the client secret as password, and post
grant_type=client_credentials. Returns a short-lived access token whose
sub/aud is the client id and which carries the client's org_id and
tenant_id. No uid, no user permissions.
| grant_type required | string Default: "client_credentials" Must be |
| scope | string Optional. Space-separated, a subset of the client's registered scopes. Omit to receive all of them. |
{- "access_token": "string",
- "token_type": "Bearer",
- "expires_in": 0,
- "scope": "string"
}