Skip to main content

API Reference (1.0)

Review our API Introduction to get started.

Organizations

An Organization is the highest level of hierarchy in Turnkey. It can contain many Users, Private Keys, and Policies managed by a Root Quorum. The Root Quorum consists of a set of Users with a consensus threshold. This consensus threshold must be reached by Quorum members in order for any actions to take place.

See Root Quorum for more information

Get Suborgs

Get all suborg IDs associated given a parent org ID and an optional filter.

Authorizations:
ApiKeyAuthAuthenticatorAuth
Request Body schema: application/json
organizationId
required
string

Unique identifier for the parent Organization. This is used to find sub-organizations within it.

filterType
string

Specifies the type of filter to apply, i.e 'CREDENTIAL_ID', 'NAME', 'USERNAME', 'EMAIL' or 'PUBLIC_KEY'

filterValue
string

The value of the filter to apply for the specified type. For example, a specific email or name string.

object (Pagination)

Responses

Request samples

Content type
application/json
{
  • "organizationId": "string",
  • "filterType": "string",
  • "filterValue": "string",
  • "paginationOptions": {
    }
}

Response samples

Content type
application/json
{
  • "organizationIds": [
    ]
}

Create Sub-Organization

Create a new Sub-Organization

Authorizations:
ApiKeyAuthAuthenticatorAuth
Request Body schema: application/json
type
required
string
Value: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4"
timestampMs
required
string

Timestamp (in milliseconds) of the request, used to verify liveness of user requests.

organizationId
required
string

Unique identifier for a given Organization.

required
object (CreateSubOrganizationIntentV4)

Responses

Request samples

Content type
application/json
{
  • "type": "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4",
  • "timestampMs": "string",
  • "organizationId": "string",
  • "parameters": {
    }
}

Response samples

Content type
application/json
{
  • "activity": {
    }
}

Update Root Quorum

Set the threshold and members of the root quorum. This must be approved by the current root quorum.

Authorizations:
ApiKeyAuthAuthenticatorAuth
Request Body schema: application/json
type
required
string
Value: "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM"
timestampMs
required
string

Timestamp (in milliseconds) of the request, used to verify liveness of user requests.

organizationId
required
string

Unique identifier for a given Organization.

required
object (UpdateRootQuorumIntent)

Responses

Request samples

Content type
application/json
{
  • "type": "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM",
  • "timestampMs": "string",
  • "organizationId": "string",
  • "parameters": {
    }
}

Response samples

Content type
application/json
{
  • "activity": {
    }
}

Invitations

Invitations allow you to invite Users into your Organization via email. Alternatively, Users can be added directly without an Invitation if their ApiKey or Authenticator credentials are known ahead of time.

See Users for more information

Create Invitations

Create Invitations to join an existing Organization

Authorizations:
ApiKeyAuthAuthenticatorAuth
Request Body schema: application/json
type
required
string
Value: "ACTIVITY_TYPE_CREATE_INVITATIONS"
timestampMs
required
string

Timestamp (in milliseconds) of the request, used to verify liveness of user requests.

organizationId
required
string

Unique identifier for a given Organization.

required
object (CreateInvitationsIntent)

Responses

Request samples

Content type
application/json
{
  • "type": "ACTIVITY_TYPE_CREATE_INVITATIONS",
  • "timestampMs": "string",
  • "organizationId": "string",
  • "parameters": {
    }
}

Response samples

Content type
application/json
{
  • "activity": {
    }
}

Delete Invitation

Delete an existing Invitation

Authorizations:
ApiKeyAuthAuthenticatorAuth
Request Body schema: application/json
type
required
string
Value: "ACTIVITY_TYPE_DELETE_INVITATION"
timestampMs
required
string

Timestamp (in milliseconds) of the request, used to verify liveness of user requests.

organizationId
required
string

Unique identifier for a given Organization.

required
object (DeleteInvitationIntent)

Responses

Request samples

Content type
application/json
{
  • "type": "ACTIVITY_TYPE_DELETE_INVITATION",
  • "timestampMs": "string",
  • "organizationId": "string",
  • "parameters": {
    }
}

Response samples

Content type
application/json
{
  • "activity": {
    }
}

Policies

Policies allow for deep customization of the security of your Organization. They can be used to grant permissions or restrict usage of Users and Private Keys. The Policy Engine analyzes all of your Policies on each request to determine whether an Activity is allowed.

See Policy Overview for more information

Get Policy

Get details about a Policy

Authorizations:
ApiKeyAuthAuthenticatorAuth
Request Body schema: application/json
organizationId
required
string

Unique identifier for a given Organization.

policyId
required
string

Unique identifier for a given Policy.

Responses

Request samples

Content type
application/json
{
  • "organizationId": "string",
  • "policyId": "string"
}

Response samples

Content type
application/json
{
  • "policy": {
    }
}

List Policies

List all Policies within an Organization

Authorizations:
ApiKeyAuthAuthenticatorAuth
Request Body schema: application/json
organizationId
required
string

Unique identifier for a given Organization.

Responses

Request samples

Content type
application/json
{
  • "organizationId": "string"
}

Response samples

Content type
application/json
{
  • "policies": [
    ]
}

Create Policies

Create new Policies

Authorizations:
ApiKeyAuthAuthenticatorAuth
Request Body schema: application/json
type
required
string
Value: "ACTIVITY_TYPE_CREATE_POLICIES"
timestampMs
required
string

Timestamp (in milliseconds) of the request, used to verify liveness of user requests.

organizationId
required
string

Unique identifier for a given Organization.

required
object (CreatePoliciesIntent)

Responses

Request samples

Content type
application/json
{
  • "type": "ACTIVITY_TYPE_CREATE_POLICIES",
  • "timestampMs": "string",
  • "organizationId": "string",
  • "parameters": {
    }
}

Response samples

Content type
application/json
{
  • "activity": {