DevelopersYour tokens
Reference

You

Who holds the token, and the family or business the call landed in.

#

Who holds this token

GETapi.thawed.app/v1/identity

Start here. The person behind the token, the token itself (its kind, scopes and when it runs out), and every family or business it could name in the Thaw-Account header. Nothing here changes with that header; where a call landed is GET /account.

Responses
200
The person, the token, and every family or business it could name.
401
No token, a token that has ended, or one issued for the other door. WWW-Authenticate names the resource metadata document.
403
The token, the role or the plan does not allow it. A missing scope is named in scope and in the WWW-Authenticate header as insufficient_scope; a plan that does not come with it says which one does.
200 answer
userobject
idstring
namestring or null
emailstring
tokenobject
A personal or app token (kind, name, label, scopes, expires_at) or a connection (kind "connection", the app's name, scopes).
accountsarray of object
Every family or business a personal token may name in the Thaw-Account header, most recently used first; a connection lists the one it was made for.
idstring
namestring
kindstring
familybusiness
rolestring
ownermemberviewervieweditupload_only
guestboolean
headerstring
apistring
The versioned base every URL in the answers hangs off.
Request
curl "https://api.thawed.app/v1/identity" \
  -H "Authorization: Bearer $THAW_TOKEN"
Response 200
{
  "user": {
    "id": "019958a0-3e60-7f5c-9d41-5b2e4c80af33",
    "name": "Marisol Alvarez",
    "email": "marisol@example.com"
  },
  "token": {},
  "accounts": [
    {
      "id": "019958a0-2d5f-7e4b-8c30-4a1d3b7f9e22",
      "name": "The Alvarez family",
      "kind": "family",
      "role": "owner",
      "guest": false
    }
  ],
  "header": "Thaw-Account",
  "api": "https://api.thawed.app/v1"
}
#

Where this call landed

GETapi.thawed.app/v1/account

The family or business the Thaw-Account header named (else the first one you belong to), your role there, its plan, the one bundle a guest was let in on, and whether a change would go through here once the role, the plan and the token have all had their say. Every other call acts in this account.

Responses
200
The family or business this call acts in.
401
No token, a token that has ended, or one issued for the other door. WWW-Authenticate names the resource metadata document.
403
The token, the role or the plan does not allow it. A missing scope is named in scope and in the WWW-Authenticate header as insufficient_scope; a plan that does not come with it says which one does.
200 answer
idstring
namestring
kindstring
familybusiness
rolestring
ownermemberviewervieweditupload_only
bundlestring or null
The one bundle a guest was let in on, when that is all they may see.
family_or_businessobject
idstring
namestring
kindstring
planobject
namestring
labelstring
canobject
changeboolean
Whether a change would be allowed here (the role, the plan and the token all agreeing).
identifiersboolean
Whether account, policy and license numbers come back.
Request
curl "https://api.thawed.app/v1/account" \
  -H "Authorization: Bearer $THAW_TOKEN"
Response 200
{
  "id": "019958a0-3e60-7f5c-9d41-5b2e4c80af33",
  "name": "Marisol Alvarez",
  "kind": "family",
  "role": "owner",
  "bundle": null,
  "family_or_business": {
    "id": "019958a0-2d5f-7e4b-8c30-4a1d3b7f9e22",
    "name": "The Alvarez family",
    "kind": "family"
  },
  "plan": {
    "name": "family",
    "label": "Family"
  },
  "can": {
    "change": true,
    "identifiers": false
  }
}
#

What is on file, in numbers

GETapi.thawed.app/v1/overview

The family or business in one look - documents by category and by type, the people & things by kind, the Checkup's counts, the plan's room - and the URLs of the four places.

Responses
200
The overview.
401
No token, a token that has ended, or one issued for the other door. WWW-Authenticate names the resource metadata document.
200 answer
family_or_businessobject
namestring
kindstring
youobject
Your name and role, and the token or connection the call came on.
documentsobject
currentinteger
including_replacedinteger
needs_a_lookinteger
being_readinteger
arrived_last_7_daysinteger
yearsobject
categoriesarray of object
namestring
slugstring
documentsinteger
typesarray of object
namestring
slugstring
documentsinteger
people_and_thingsarray of object
kindstring
labelstring
countinteger
checkupobject
openinteger
past_due_or_urgentinteger
snoozedinteger
handledinteger
planobject
labelstring
questions_leftinteger or null
full_reads_leftinteger or null
ways_instring
urlsobject
Request
curl "https://api.thawed.app/v1/overview" \
  -H "Authorization: Bearer $THAW_TOKEN"
Response 200
{
  "family_or_business": {
    "name": "The Alvarez family",
    "kind": "family"
  },
  "you": {},
  "documents": {
    "current": 1,
    "including_replaced": 3,
    "needs_a_look": 3,
    "being_read": 3,
    "arrived_last_7_days": 3,
    "years": {}
  },
  "categories": [
    {
      "name": "Marisol Alvarez",
      "slug": "utilities/electric-bill",
      "documents": 412
    }
  ],
  "types": [
    {
      "name": "Electric bill",
      "slug": "utilities/electric-bill",
      "documents": 412
    }
  ],
  "people_and_things": [
    {
      "kind": "document",
      "label": "Amount due",
      "count": 412
    }
  ],
  "checkup": {
    "open": 3,
    "past_due_or_urgent": 3,
    "snoozed": 3,
    "handled": 3
  },
  "plan": {
    "label": "Family",
    "questions_left": 8,
    "full_reads_left": 8
  },
  "ways_in": "email, drive, camera",
  "urls": {}
}