Navigation (menus, bookmarks, pages, filters)Bookmark a page

Bookmark a page

Adds a page to the caller's own bookmarks; the server names the bookmark and stores the URL relative to the Referer's origin.

Bookmarks a page for the CALLER (the owner is always the current user — there is no user parameter). The caller sends the page GUID, the page's absolute URL and, for entity pages, the entity ID. The server checks that the URL starts with the origin of the request's Referer header, stores the URL relative to that origin, and names the bookmark itself: the page's name in the caller's language, or for entity pages "<page name>: <entity name>" (project, customer, contact, CRM event / opportunity, employee) or "<prefix> <number>" (invoice, voucher, credit note, reminder). If the caller already has a bookmark for the same page (non-entity pages) or a URL ending with the same path, nothing is created. The response is null — re-list to obtain the new bookmark's ID.

Use it to:

  • "Bookmark this page" in the web app's page header

Not for:

  • Bookmarking a page for another user — not possible
  • Server-to-server use — a Referer header matching the page's origin is mandatory

Rules across fields:

  • R1: Url must start with the scheme+host(+port) of the Referer header (ordinal string prefix).

Behaviour:

  • Not idempotent.
  • A repeat with the same page (non-entity pages) or a Url ending with an existing bookmark's stored URL creates nothing and still answers 200 null.
  • Safe to retry.
  • Duplicates: Server-side duplicate check against the caller's own bookmarks: same page for non-entity pages, or stored URL is a case-insensitive suffix of the new Url (query strings ignored).
  • Changes are visible to the next read immediately.

Call first: GET /v2/pages/design-seven, GET /v2/menus/main

Next: GET /v2/bookmarks

See also: DELETE /v2/bookmarks/{bookmarkId}

Not yet documented: examples.

curl -X POST "https://app3.timelog.com/your-account/api/v2/bookmarks" \
  -H "Content-Type: application/json" \
  -H "Referer: example_string" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "PageId": "123e4567-e89b-12d3-a456-426614174000",
  "Url": "example_string",
  "EntityId": "null"
}'
"null"
POST
/v2/bookmarks
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp). The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user. > Not yet documented: how to obtain a token. > Not yet documented: token lifetime.

OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp). The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user. > Not yet documented: how to obtain a token. > Not yet documented: token lifetime.
Content-Typestring
Required

The media type of the request body

Options: application/json
header
Refererstring
Required

The page the request comes from. Its scheme+host(+port) must prefix the body's Url; that origin is stripped from Url before storing. Missing → 400 Code 400 "Missing referer in header.".

Format: uri
PageIdstring
Required

GUID of the page to bookmark — PageRead.PageId or MenuRead.PageId. Refers to PageRead.PageId. Look up valid values with GET /v2/pages/design-seven. - missing or the empty GUID — 400 Code 200 ("'Page Id' must not be empty.", "PageId of the page to bookmark must be set.") — captured. - a GUID that is not a page — 500 Code 100: the page lookup returns null and the manager dereferences it.

Format: uuid
Urlstring
Required

The page's ABSOLUTE URL as the browser shows it. It must start with the scheme+host(+port) of the request's Referer header. The server stores only the part after that origin (leading '/' trimmed) and rebuilds the absolute URL when listing. Also used to detect an existing bookmark for the same page. - missing or empty — 400 Code 200 "Url of the page to bookmark must be set." (captured). - does not start with the Referer origin — 400 Code 400 "Url and the referer do not match." (rest.navigation.bookmark-url-referer-mismatch). - ends with (query string ignored, case-insensitive) the URL of one of the caller's existing bookmarks — Treated as already bookmarked: 200, nothing created.

Format: uri
EntityIdintegernull

For entity pages, the ID of the record the page shows (project, customer, contact, CRM event or opportunity, invoice, voucher, credit note, reminder, employee). Used ONLY to compose the bookmark's name (e.g. "<page name>: <project name>"); it is not stored and does not affect the URL. Default: null — the bookmark is named after the page, in the caller's language. - page is any other page — Name = the page's name resource in the caller's language. - ID of a record that does not exist (entity page) — 500 expected from the entity lookup.

Format: int32
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).

The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.

Not yet documented: how to obtain a token.

Not yet documented: token lifetime.

Headers

Refererstring
Required

The page the request comes from. Its scheme+host(+port) must prefix the body's Url; that origin is stripped from Url before storing. Missing → 400 Code 400 "Missing referer in header.".

Body

application/json
PageIdstring
Required

GUID of the page to bookmark — PageRead.PageId or MenuRead.PageId.

Refers to PageRead.PageId. Look up valid values with GET /v2/pages/design-seven.

  • missing or the empty GUID — 400 Code 200 ("'Page Id' must not be empty.", "PageId of the page to bookmark must be set.") — captured.

  • a GUID that is not a page — 500 Code 100: the page lookup returns null and the manager dereferences it.

Urlstring
Required

The page's ABSOLUTE URL as the browser shows it. It must start with the scheme+host(+port) of the request's Referer header. The server stores only the part after that origin (leading '/' trimmed) and rebuilds the absolute URL when listing. Also used to detect an existing bookmark for the same page.

  • missing or empty — 400 Code 200 "Url of the page to bookmark must be set." (captured).

  • does not start with the Referer origin — 400 Code 400 "Url and the referer do not match." (rest.navigation.bookmark-url-referer-mismatch).

  • ends with (query string ignored, case-insensitive) the URL of one of the caller's existing bookmarks — Treated as already bookmarked: 200, nothing created.

EntityIdinteger,null

For entity pages, the ID of the record the page shows (project, customer, contact, CRM event or opportunity, invoice, voucher, credit note, reminder, employee). Used ONLY to compose the bookmark's name (e.g. "<page name>: <project name>"); it is not stored and does not affect the URL.

Default: null — the bookmark is named after the page, in the caller's language.

  • page is any other page — Name = the page's name resource in the caller's language.

  • ID of a record that does not exist (entity page) — 500 expected from the entity lookup.

Responses

*Success without content: HTTP 200 with the literal JSON body null. Literal JSON null (TafSuccessResult) — both when a bookmark was created and when it already existed. No ID is returned.

Order: none

Empty result: none*