X callback url Scheme documentation
Bear implements the x-callback-url protocol, which allow iOS and Mac developers to expose and document the methods they make available to other apps and return useful data.
Bear URL Scheme actions look like this:
bear://x-callback-url/[action]?[action parameters]&[x-callback parameters]
with x-success and x-error as available x-callback parameters.
Actions
/open-note
Open a note identified by its title or id and return its content.
parameters
- id optional note unique identifier.
- title optional note title.
x-success
- note note text.
- identifier note unique identifier.
- title note title.
example
bear://x-callback-url/open-note?id=7E4B681B
/open-tag
Show all the notes which have a selected tag in bear.
parameters
- name required tag name.
example
bear://x-callback-url/open-tag?name=work
bear://x-callback-url/open-tag?name=todo%2Fwork
/create
Create a new note and return its unique identifier. Empty notes are not allowed.
parameters
- title optional note title.
- text optional note body.
- tags optional a comma separated list of tags.
- file optional base64 representation of a file
- filename optional file name with extension. Both file and filename are required to successfully add a file.
x-success
- identifier note unique identifier.
- title note title.
example
bear://x-callback-url/create?title=My%20Note%20Title&text=First%20line&tags=home,home%2Fgroceries
notes
The base64 file parameter have to be encoded when passed as an url parameter.
/add-text
append or prepent text to a note identified by its title or id.
parameters
- id optional note unique identifier.
- title optional title of the note
- text required text to add.
- mode optional the allowed values are
prepend,appendandreplace.
x-success
- note note text.
- title note title.
example
bear://x-callback-url/add-text?text=new%20line&id=4EDAF0D1&mode=append
/add-file
append or prepend a file to a note identified by its title or id.
parameters
- id optional note unique identifier
- title optional note title
- file required base64 representation of a file
- filename required file name with extension. Both file and filename are required to successfully add a file.
- mode optional the allowed values are
prepend,appendandreplace.
x-success
- note note text
example
bear://x-callback-url/add-file?filename=test.gif&id=4EDAF0D1-2EFF-4190-BC1D-67D9BAE49BA9-28433-000187BAA3D182EF&mode=append&file=R0lGODlhAQABAIAAAP%2F%2F%2F%2F%2F%2F%2FyH5BAEKAAEALAAAAAABAAEAAAICTAEAOw%3D%3D
notes
The base64 file parameter have to be encoded when passed as an url parameter.
/trash
Move a note to bear trash.
parameters
- id required note unique identifier.
example
bear://x-callback-url/trash?id=7E4B681B
/search
Show search results in Bear for all notes or for a specific tag.
parameters
- term optional string to search.
- tag optional tag to search into.
example
bear://x-callback-url/search?term=nemo&tag=movies
/grab-url
Create a new note with the content of a web page.
parameters
- url required url to grab.
- images optional grab or not the page images.
- tags optional a comma separated list of tags.
x-success
- identifier note unique identifier.
- title note title.
available values
yes no
example
bear://x-callback-url/grab-url?url=http://www.bear-writer.com
/change-theme
Change the selected Bear theme. Some themes may require a Bear Pro subscription.
parameters
- theme required.
available values
Red Graphite Charcoal Solarized Light Solarized Dark Panic Mode Dracula Gotham Toothpaste Cobalt
example
bear://x-callback-url/change-theme?theme=Solarized%20Dark
/change-font
Change the selected Bear Font.
parameters
- font required.
available values
Avenir Next System Helvetica Neue Menlo Georgia Courier Open Dyslexic
example
bear://x-callback-url/change-font?font=Helvetica%20Neue
Support
To discuss URL scheme improvements or reporting bugs please use our Support Forum or Bear's subreddit.