API reference

Templates

Content templates and the inputs each template expects. Use them to generate documents.

List templates

GET api.app.typetone.ai/public/v1/template

Authorization

  • X-API-Keyheaderrequired

    Your workspace API key.

Response · 200

  • idstringrequired

    Unique ID.

  • keystringrequired

    Machine-readable name.

  • commandsarray of TemplateCommandsRelationshiprequired

    The template's generation steps.

  • templateMetasarray of TemplateTemplateMetaRelationshiprequired

    The template per language, with the input form it expects.

Errors

  • 401 Missing or invalid API key.
  • 403 The workspace is not on a plan with API access.
  • 404 The resource does not exist in this workspace.
curl "https://api.app.typetone.ai/public/v1/template" \
  -H "X-API-Key: $TYPETONE_API_KEY"
Response · 200
[
  {
    "id": "cmuf2k8x10001ab12cd34ef56",
    "key": "professional",
    "commands": [
      {
        "id": "cmuf2k8x10001ab12cd34ef56",
        "languageKey": "NL"
      }
    ],
    "templateMetas": [
      {
        "id": "cmuf2k8x10001ab12cd34ef56",
        "languageKey": "NL",
        "form": [
          {}
        ]
      }
    ]
  }
]

Get a template

GET api.app.typetone.ai/public/v1/template/{id}

Authorization

  • X-API-Keyheaderrequired

    Your workspace API key.

Path parameters

  • idstringrequired

    Unique ID.

Response · 200

  • idstringrequired

    Unique ID.

  • keystringrequired

    Machine-readable name.

  • commandsarray of TemplateCommandsRelationshiprequired

    The template's generation steps.

  • templateMetasarray of TemplateTemplateMetaRelationshiprequired

    The template per language, with the input form it expects.

Errors

  • 401 Missing or invalid API key.
  • 403 The workspace is not on a plan with API access.
  • 404 The resource does not exist in this workspace.
  • 422 A parameter or the request body is invalid. detail says which.
curl "https://api.app.typetone.ai/public/v1/template/cmuf2k8x10001ab12cd34ef56" \
  -H "X-API-Key: $TYPETONE_API_KEY"
Response · 200
{
  "id": "cmuf2k8x10001ab12cd34ef56",
  "key": "professional",
  "commands": [
    {
      "id": "cmuf2k8x10001ab12cd34ef56",
      "languageKey": "NL"
    }
  ],
  "templateMetas": [
    {
      "id": "cmuf2k8x10001ab12cd34ef56",
      "languageKey": "NL",
      "form": [
        {}
      ]
    }
  ]
}

Something unclear or missing? Tell us and we'll improve this page.

Developers
Esc