thing/add

Description

add a new thing for the authenticated user

HTTP Method

POST

Parameters

NameTypeRequiredDescription
titlestringyesthis can also be a URL
tagsstringno(space separated)
datenumber (unix time)nounixtime when the thing was created
urlstring (URI)nothis should only be specified if also a text title is given
htmlstringnothe html resp. note of the thing
archivedbooleannoif set to "true" then thing is marked as archived
todoStatusbooleannoonly has an effect if the thing is a todo

Returns

{
  "_id": "alphanumeric id of the thing",
  "title": "title of the thing",
  "tags": "space separated tags of the thing",
  "date": "unixtime when the thing was created",
  "url": "url of the thing, only included if it is set",
  "html": "the html resp. note of the thing, only included if it is set",
  "archived": "true, only set when it is an archived thing",
  "todoStatus": "true or false, only if thing is a todo (through a special tag)"
}

Example

POST /v1/thing/add HTTP/1.1
Host: api.thinkery.me
Authorization: access-token=the-token-you-received
Content-Type: application/x-www-form-urlencoded
Content-Length: 15

title=new thing (this would be urlencoded)

{
  "_id": "newly-assigned-id",
  "title": "new thing",
  "date": 1526961820,
  "tags": [
    
  ]
}