We recently released a limited public API in beta. API access and keys are only available on our paid plans.

API Key and Team ID

To generate or view your API key visit the 'Integrations' section of your user settings page. The API key is unique to your user and team and has the same permissions as your user. Your team_id  is also available on this page.

Endpoints

Create Page

Publishes a new Tettra page from the given HTML content. 

URL: https://app.tettra.co/api/teams/{{team_id}}/pages
HTTP Method: POST
Arguments:

  • api_key - required - your API key; this determines the author of the page 
  • title - required - the title of the page
  • body - required - the body of the page formatted as HTML
  • category_id - optional - the category to publish the page to

Example

curl -X POST \
     -H 'Content-Type: application/json' \
     --data '{"api_key":"xxxxxxxxxxxxxxxxxx1234567890", \
              "title":"My Awesome Page", \
              "body":"<h1>Hello World!</h1>", \
              "category_id":2}' \
     https://app.tettra.co/api/teams/2/pages

Suggest a New Page

Creates a new page suggestion.

URL: https://app.tettra.co/api/teams/{{team_id}}/suggestions
HTTP Method: POST
Arguments:

  • api_key - required - your API key; this determines the creator of the suggestion 
  • title  - required - title of suggestion
  • description  - optional - more context about the suggested page
  • category - optional - the category to publish the page to
  • assignable_id - optional - the id of the user to assign the suggestion

Example

curl -X POST  -H 'Content-Type: application/json'   \
     --data '{"api_key":"xxxxxxxxxxxxxxxxxx1234567890",  \
         "title":"A new page about something I want to know", \
         "description":"A question that should be documented",  \
         "category":2   \
         "assignable_id":22}'  \
     https://app.tettra.co/api/teams/2/suggestions

Suggest Page Update

Creates a new suggestion to update an existing page.

URL: https://app.tettra.co/api/teams/{{team_id}}/suggestions
HTTP Method: POST
Arguments:

  • api_key - required - your API key; this determines the creator of the suggestion 
  • update - required - (boolean) indicates this is a suggestion for an update to an existing page (instead of a new page)
  • page_id - required - the id of the page that needs updating
  • description - optional - more context about the suggested change
  • assignable_id - optional - the id of the user to assign the suggestion

Example

curl -X POST  -H 'Content-Type: application/json'   \
     --data '{"api_key":"xxxxxxxxxxxxxxxxxx1234567890",  \
         "update":true, \
         "description":"Update this outdated page",  \
         "page_id":2,  \
         "assignable_id":22}'  \
     https://app.tettra.co/api/teams/2/suggestions 


If you have a good use case or idea for other API capabilities, or would like to collaborate, send us a message. We also support integrations via Zapier.

Note that our API is still experimental, and we may make breaking, non-backwards-compatible changes.  

Did this answer your question?