# API reference index

# Reference index

Below you can find a reference index of endpoints available on the Trusted Twin environment. Click on a category for a list of endpoints by category.

Path Category POST GET PATCH DELETE
/twins twin create_twin
/twins/{twin} twin get_twin update_twin terminate_twin
/twins/{twin}/identities identity create_twin_identity get_twin_identities
/twins/{twin}/identities/{identity} identity get_twin_identity update_twin_identity delete_twin_identity
/resolve/{identity} identity resolve_twin_identity
/twins/{twin}/ledgers/{ledger} ledger add_twin_ledger_entry get_twin_ledger_entry update_twin_ledger_entry
/twins/{twin}/ledgers/personal ledger add_twin_ledger_entry get_twin_ledger_entry update_twin_ledger_entry delete_twin_ledger_entry
/twins/{twin}/ledgers/owner ledger get_twin_ledger_entry
/twins/{twin}/ledgers/creator ledger get_twin_ledger_entry
/twins/{twin}/ledgers/{ledger}/history history get_twin_ledger_entry_history
/twins/{twin}/ledgers/personal/history history get_twin_ledger_entry_history
/twins/{twin}/ledgers/owner/history history get_twin_ledger_entry_history
/cache doc create_upload_url
/cache/{handler} doc invalidate_upload_url
/twins/{twin}/docs doc attach_twin_doc get_twin_docs delete_twin_docs
/twins/{twin}/docs/{doc_name} doc get_twin_doc update_twin_doc delete_twin_doc
/roles role create_user_role get_user_roles
/roles/{role} role get_user_role update_user_role delete_user_role
/users user create_user
/users/{user} user get_user update_user delete_user
/secrets/{account}/{pin} user authentication create_user_secret
/users/{user}/secrets user authentication create_user_secret_pin get_user_secret update_user_secret delete_user_secret
/account/services/timeseries timeseries* create_timeseries_table get_timeseries_tables update_timeseries_access
/account/services/timeseries/{timeseries} timeseries* get_timeseries_table update_timeseries_table delete_timeseries_table
/account/services/timeseries/{timeseries}/data timeseries* truncate_timeseries_table
/account/services/indexes indexes** create_indexes_table get_indexes_tables update_indexes_access
/account/services/indexes/{index} indexes** get_indexes_table update_indexes_table delete_indexes_table
/account/services/indexes/{index}/data indexes** truncate_indexes_table
/notifications/webhooks notifications webhook_subscribe
/notifications/webhooks/{account} notifications webhook_confirm_subscription webhook_refresh_subscription webhook_unsubscribe
/whoami who am i who_am_i
/log log get_log
/usage usage get_account_usage
/usage/{user} usage get_user_usage

*

The Timeseries service needs to be enabled for your Account. Please contact hello@trustedtwin.com for more details.

**

The Indexes service needs to be enabled for your Account. Please contact hello@trustedtwin.com for more details.

# Endpoints

Below you can find a breakdown of endpoints by category. Click on the operation name for comprehensive information about the endpoint.

# Twin

Method Path Operation
POST /twins create_twin
GET /twins/{twin} get_twin
PATCH /twins/{twin} update_twin
DELETE /twins/{twin} terminate_twin

# Identity

Method Path Operation
POST /twins/{twin}/identities create_twin_identity
GET /twins/{twin}/identities/{identity} get_twin_identity
GET /twins/{twin}/identities get_twin_identities
PATCH /twins/{twin}/identities/{identity} update_twin_identity
DELETE /twins/{twin}/identities/{identity} delete_twin_identity
GET /resolve/{identity} resolve_twin_identity

# Ledger

Method Path Operation
POST /twins/{twin}/ledgers/personal add_twin_ledger_entry
POST /twins/{twin}/ledgers/{ledger} add_twin_ledger_entry
GET /twins/{twin}/ledgers/personal get_twin_ledger_entry
GET /twins/{twin}/ledgers/owner get_twin_ledger_entry
GET /twins/{twin}/ledgers/creator get_twin_ledger_entry
GET /twins/{twin}/ledgers/{ledger} get_twin_ledger_entry
PATCH /twins/{twin}/ledgers/personal update_twin_ledger_entry
PATCH /twins/{twin}/ledgers/{ledger} update_twin_ledger_entry
DELETE /twins/{twin}/ledgers/personal delete_twin_ledger_entry

# Doc

Method Path Operation
POST /cache create_upload_url
DELETE /cache/{handler} invalidate_upload_url
POST /twins/{twin}/docs attach_twin_doc
GET /twins/{twin}/docs/{doc_name} get_twin_doc
GET /twins/{twin}/docs get_twin_docs
PATCH /twins/{twin}/docs/{doc_name} update_twin_doc
DELETE /twins/{twin}/docs/{doc_name} delete_twin_doc
DELETE /twins/{twin}/docs delete_twin_docs

# History

Method Path Operation
GET /twins/{twin}/ledgers/personal/history get_twin_ledger_entry_history
GET /twins/{twin}/ledgers/owner/history get_twin_ledger_entry_history
GET /twins/{twin}/ledgers/{ledger}/history get_twin_ledger_entry_history

# Timeseries*

Method Path Operation*
PATCH /account/services/timeseries update_timeseries_access
POST /account/services/timeseries create_timeseries_table
GET /account/services/timeseries/{timeseries} get_timeseries_table
GET /account/services/timeseries get_timeseries_tables
PATCH /account/services/timeseries/{timeseries} update_timeseries_table
DELETE /account/services/timeseries/{timeseries}/data truncate_timeseries_table
DELETE /account/services/timeseries/{timeseries} delete_timeseries_table

*

The Timeseries service needs to be enabled for your Account. Please contact hello@trustedtwin.com for more details.

# Indexes*

Method Path Operation
PATCH /account/services/indexes update_indexes_access
POST /account/services/indexes create_indexes_table
GET /account/services/indexes/{index} get_indexes_table
GET /account/services/indexes get_indexes_tables
PATCH /account/services/indexes/{index} update_indexes_table
DELETE /account/services/indexes/{index}/data truncate_indexes_table
DELETE /account/services/indexes/{index} delete_indexes_table

*

The Indexes service needs to be enabled for your Account. Please contact hello@trustedtwin.com for more details.

# Notifications

Method Path Operation*
POST /notifications/webhooks webhook_subscribe
GET /notifications/webhooks/{account}?token={token} webhook_confirm_subscription
PATCH /notifications/webhooks/{account}?token={token} webhook_refresh_subscription
DELETE /notifications/webhooks/{account}?token={token} webhook_unsubscribe

# Role

Method Path Operation
POST /roles create_user_role
GET /roles/{role} get_user_role
GET /roles/ get_user_roles
PATCH /roles/{role} update_user_role
DELETE /roles/{role} delete_user_role

# User

Method Path Operation
POST /users create_user
GET /users/{user} get_user
PATCH /users/{user} update_user
DELETE /users/{user} delete_user

# User authentication

Method Path Operation
POST /users/{user}/secrets create_user_secret_pin
POST /secrets/{account}/{pin} create_user_secret
GET /users/{user}/secrets get_user_secret
PATCH /users/{user}/secrets update_user_secret
DELETE /users/{user}/secrets delete_user_secret

# Who am I

Method Path Operation*
GET /whoami who_am_i

# Log

Method Path Operation
GET /log get_log

# Usage

Method Path Operation*
GET /usage get_account_usage
GET /usage/{usage} get_user_usage