ReferenceReference by module

Help center API

Every Help center action (8) and data model (2): endpoints, scopes, input, preconditions, events and examples.

Help articles in categories, for your customers and your support team.

Module code help_center · 8 actions · 2 data models · 7 events. A key or token never does more here than the person behind it can; row-level security applies exactly as in the app. Scopes: help_center (everything), help_center:read (read only) or help_center:<capability>.

Resources

ResourceTableList and readPOSTPATCHDELETE
help_articleshelp_article/api/v1/help_articles
help_categorieshelp_category/api/v1/help_categories

Lists take limit (up to 200), cursor, order (e.g. -created_at), fields and q; every other query parameter is a column filter: ?status=paid, ?total[gte]=100, ?id[in]=a,b, ?x=null.

Actions

ActionNeedsWhat it does
help_center.archive_articlehelp_center:writeArchive
help_center.create_articlehelp_center:writeDraft an article
help_center.delete_articlehelp_center:manageDelete an article
help_center.delete_categoryhelp_center:manageDelete a category
help_center.publish_articlehelp_center:writePublish
help_center.save_categoryhelp_center:manageSave a category
help_center.unpublish_articlehelp_center:writeBack to draft
help_center.update_articlehelp_center:writeEdit an article

help_center.archive_article

Archive — Retires an article without deleting it.

Needs help_center:write · reaches outside (sends, publishes or charges) · asks a person to confirm when Era runs it

POSThttps://app.getera.io/api/v1/help_articles/{id}/actions/archive_article
API key or OAuth token · help_center:write
  • Canonical address: POST /api/v1/actions/help_center.archive_article

Input

FieldTypeRequiredNotes
iduuidyesFilled from the path {id} · Article · id of help_article

Preconditions

The action is refused with 409 and one of these codes:

CodeRefused when
help_article_not_foundThe article must exist.
help_article_already_in_stateThe article must not already be in that state.

Events it publishes: help_center.article_archived

What it writes: help_article (update) — Marks it archived

curl -X POST https://app.getera.io/api/v1/help_articles/HELP_ARTICLE_ID/actions/archive_article \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
Response
{
  "ok": true,
  "result": "…",
  "events": [
    "help_center.article_archived"
  ]
}
import { createEra } from "@getera/sdk"

const era = createEra({ apiKey: process.env.ERA_API_KEY })
const res = await era.helpArticles.archiveArticle("HELP_ARTICLE_ID")
era help_articles archive_article HELP_ARTICLE_ID
tools/call
{
  "name": "era__help_center__archive_article",
  "arguments": {
    "id": "HELP_ARTICLE_ID"
  }
}

Errors: 401 no or expired credential · 403 the credential does not hold help_center:write · 404 the record or module is outside what it may reach · 422 invalid input (problems[]) · 409 help_article_not_found, help_article_already_in_state · 429 slow down

help_center.create_article

Draft an article — A new help article, as a draft.

Needs help_center:write · changes data

POSThttps://app.getera.io/api/v1/help_articles/actions/create_article
API key or OAuth token · help_center:write
  • Canonical address: POST /api/v1/actions/help_center.create_article

Input

FieldTypeRequiredNotes
titlestringyesTitle · max 300
descriptionstringSummary · max 1000
contentstringContent · max 200000
categoryIduuidCategory · id of help_category
localestringLanguage · max 10
positionnumberPosition
metaTitlestringSearch title · max 255
metaDescriptionstringSearch description · max 1000
metaTagsobject / arrayTags

Preconditions

The action is refused with 409 and one of these codes:

CodeRefused when
help_category_not_foundA named category must exist.
help_article_invalid_tagsTags are a list of at most 30 words.

Events it publishes: help_center.article_created

What it writes: help_article (insert) — Writes the draft

curl -X POST https://app.getera.io/api/v1/help_articles/actions/create_article \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"title":"Title"}'
Response
{
  "ok": true,
  "result": "…",
  "events": [
    "help_center.article_created"
  ]
}
import { createEra } from "@getera/sdk"

const era = createEra({ apiKey: process.env.ERA_API_KEY })
const res = await era.helpArticles.createArticle({
  title: "Title"
})
era help_articles create_article \
  --title "Title"
tools/call
{
  "name": "era__help_center__create_article",
  "arguments": {
    "title": "Title"
  }
}

Errors: 401 no or expired credential · 403 the credential does not hold help_center:write · 404 the record or module is outside what it may reach · 422 invalid input (problems[]) · 409 help_category_not_found, help_article_invalid_tags · 429 slow down

help_center.delete_article

Delete an article — Removes an article for good. Archive it instead to keep it.

Needs help_center:manage · removes or cannot be undone · asks a person to confirm when Era runs it

POSThttps://app.getera.io/api/v1/help_articles/{id}/actions/delete_article
API key or OAuth token · help_center:manage
  • Canonical address: POST /api/v1/actions/help_center.delete_article

Input

FieldTypeRequiredNotes
iduuidyesFilled from the path {id} · Article · id of help_article

Preconditions

The action is refused with 409 and one of these codes:

CodeRefused when
help_article_not_foundThe article must exist.

Events it publishes: help_center.article_deleted

What it writes: help_article (delete) — Deletes the article

curl -X POST https://app.getera.io/api/v1/help_articles/HELP_ARTICLE_ID/actions/delete_article \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
Response
{
  "ok": true,
  "result": "…",
  "events": [
    "help_center.article_deleted"
  ]
}
import { createEra } from "@getera/sdk"

const era = createEra({ apiKey: process.env.ERA_API_KEY })
const res = await era.helpArticles.deleteArticle("HELP_ARTICLE_ID")
era help_articles delete_article HELP_ARTICLE_ID
tools/call
{
  "name": "era__help_center__delete_article",
  "arguments": {
    "id": "HELP_ARTICLE_ID"
  }
}

Errors: 401 no or expired credential · 403 the credential does not hold help_center:manage · 404 the record or module is outside what it may reach · 422 invalid input (problems[]) · 409 help_article_not_found · 429 slow down

help_center.delete_category

Delete a category — Removes an empty category.

Needs help_center:manage · removes or cannot be undone · asks a person to confirm when Era runs it

POSThttps://app.getera.io/api/v1/help_categories/{id}/actions/delete_category
API key or OAuth token · help_center:manage
  • Canonical address: POST /api/v1/actions/help_center.delete_category

Input

FieldTypeRequiredNotes
iduuidyesFilled from the path {id} · Category · id of help_category

Preconditions

The action is refused with 409 and one of these codes:

CodeRefused when
help_category_not_foundA named category must exist.
help_category_in_useA category with live articles stays.

Events it publishes: help_center.category_changed

What it writes: help_category (delete) — Deletes the category

curl -X POST https://app.getera.io/api/v1/help_categories/HELP_CATEGORY_ID/actions/delete_category \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
Response
{
  "ok": true,
  "result": "…",
  "events": [
    "help_center.category_changed"
  ]
}
import { createEra } from "@getera/sdk"

const era = createEra({ apiKey: process.env.ERA_API_KEY })
const res = await era.helpCategories.deleteCategory("HELP_CATEGORY_ID")
era help_categories delete_category HELP_CATEGORY_ID
tools/call
{
  "name": "era__help_center__delete_category",
  "arguments": {
    "id": "HELP_CATEGORY_ID"
  }
}

Errors: 401 no or expired credential · 403 the credential does not hold help_center:manage · 404 the record or module is outside what it may reach · 422 invalid input (problems[]) · 409 help_category_not_found, help_category_in_use · 429 slow down

help_center.publish_article

Publish — Makes the article public — Chatwoot’s published state, content required.

Needs help_center:write · reaches outside (sends, publishes or charges)

POSThttps://app.getera.io/api/v1/help_articles/{id}/actions/publish_article
API key or OAuth token · help_center:write
  • Canonical address: POST /api/v1/actions/help_center.publish_article

Input

FieldTypeRequiredNotes
iduuidyesFilled from the path {id} · Article · id of help_article

Preconditions

The action is refused with 409 and one of these codes:

CodeRefused when
help_article_not_foundThe article must exist.
help_article_already_in_stateThe article must not already be in that state.
help_article_needs_contentA published article has content.

Events it publishes: help_center.article_published

What it writes: help_article (update) — Marks it published

curl -X POST https://app.getera.io/api/v1/help_articles/HELP_ARTICLE_ID/actions/publish_article \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
Response
{
  "ok": true,
  "result": "…",
  "events": [
    "help_center.article_published"
  ]
}
import { createEra } from "@getera/sdk"

const era = createEra({ apiKey: process.env.ERA_API_KEY })
const res = await era.helpArticles.publishArticle("HELP_ARTICLE_ID")
era help_articles publish_article HELP_ARTICLE_ID
tools/call
{
  "name": "era__help_center__publish_article",
  "arguments": {
    "id": "HELP_ARTICLE_ID"
  }
}

Errors: 401 no or expired credential · 403 the credential does not hold help_center:write · 404 the record or module is outside what it may reach · 422 invalid input (problems[]) · 409 help_article_not_found, help_article_already_in_state, help_article_needs_content · 429 slow down

help_center.save_category

Save a category — Creates a help category, or renames and moves one.

Needs help_center:manage · changes data

POSThttps://app.getera.io/api/v1/help_categories/{id}/actions/save_category
API key or OAuth token · help_center:manage
  • Canonical address: POST /api/v1/actions/help_center.save_category

Input

FieldTypeRequiredNotes
iduuidFilled from the path {id} · Category · id of help_category
namestringName · max 200
descriptionstringDescription · max 2000
parentIduuidInside · id of help_category
localestringLanguage · max 10
iconstringIcon · max 40
positionnumberPosition

Preconditions

The action is refused with 409 and one of these codes:

CodeRefused when
help_category_not_foundA named category must exist.

Events it publishes: help_center.category_changed

What it writes: help_category (upsert) — Writes the category

curl -X POST https://app.getera.io/api/v1/help_categories/HELP_CATEGORY_ID/actions/save_category \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"name":"Name"}'
Response
{
  "ok": true,
  "result": "…",
  "events": [
    "help_center.category_changed"
  ]
}
import { createEra } from "@getera/sdk"

const era = createEra({ apiKey: process.env.ERA_API_KEY })
const res = await era.helpCategories.saveCategory("HELP_CATEGORY_ID", {
  name: "Name"
})
era help_categories save_category HELP_CATEGORY_ID \
  --name "Name"
tools/call
{
  "name": "era__help_center__save_category",
  "arguments": {
    "id": "HELP_CATEGORY_ID",
    "name": "Name"
  }
}

Errors: 401 no or expired credential · 403 the credential does not hold help_center:manage · 404 the record or module is outside what it may reach · 422 invalid input (problems[]) · 409 help_category_not_found · 429 slow down

help_center.unpublish_article

Back to draft — Takes a published or archived article back to a draft.

Needs help_center:write · reaches outside (sends, publishes or charges)

POSThttps://app.getera.io/api/v1/help_articles/{id}/actions/unpublish_article
API key or OAuth token · help_center:write
  • Canonical address: POST /api/v1/actions/help_center.unpublish_article

Input

FieldTypeRequiredNotes
iduuidyesFilled from the path {id} · Article · id of help_article

Preconditions

The action is refused with 409 and one of these codes:

CodeRefused when
help_article_not_foundThe article must exist.
help_article_already_in_stateThe article must not already be in that state.

Events it publishes: help_center.article_unpublished

What it writes: help_article (update) — Marks it a draft

curl -X POST https://app.getera.io/api/v1/help_articles/HELP_ARTICLE_ID/actions/unpublish_article \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
Response
{
  "ok": true,
  "result": "…",
  "events": [
    "help_center.article_unpublished"
  ]
}
import { createEra } from "@getera/sdk"

const era = createEra({ apiKey: process.env.ERA_API_KEY })
const res = await era.helpArticles.unpublishArticle("HELP_ARTICLE_ID")
era help_articles unpublish_article HELP_ARTICLE_ID
tools/call
{
  "name": "era__help_center__unpublish_article",
  "arguments": {
    "id": "HELP_ARTICLE_ID"
  }
}

Errors: 401 no or expired credential · 403 the credential does not hold help_center:write · 404 the record or module is outside what it may reach · 422 invalid input (problems[]) · 409 help_article_not_found, help_article_already_in_state · 429 slow down

help_center.update_article

Edit an article — Changes an article’s title, summary, content or category.

Needs help_center:write · changes data

POSThttps://app.getera.io/api/v1/help_articles/{id}/actions/update_article
API key or OAuth token · help_center:write
  • Canonical address: POST /api/v1/actions/help_center.update_article

Input

FieldTypeRequiredNotes
iduuidyesFilled from the path {id} · Article · id of help_article
titlestringTitle · max 300
descriptionstringSummary · max 1000
contentstringContent · max 200000
categoryIduuidCategory · id of help_category
positionnumberPosition
metaTitlestringSearch title · max 255
metaDescriptionstringSearch description · max 1000
metaTagsobject / arrayTags

Preconditions

The action is refused with 409 and one of these codes:

CodeRefused when
help_article_not_foundThe article must exist.
help_category_not_foundA named category must exist.
help_article_needs_contentA published article keeps its content.
help_article_invalid_tagsTags are a list of at most 30 words.

Events it publishes: help_center.article_updated

What it writes: help_article (update) — Rewrites the article

curl -X POST https://app.getera.io/api/v1/help_articles/HELP_ARTICLE_ID/actions/update_article \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"title":"Title"}'
Response
{
  "ok": true,
  "result": "…",
  "events": [
    "help_center.article_updated"
  ]
}
import { createEra } from "@getera/sdk"

const era = createEra({ apiKey: process.env.ERA_API_KEY })
const res = await era.helpArticles.updateArticle("HELP_ARTICLE_ID", {
  title: "Title"
})
era help_articles update_article HELP_ARTICLE_ID \
  --title "Title"
tools/call
{
  "name": "era__help_center__update_article",
  "arguments": {
    "id": "HELP_ARTICLE_ID",
    "title": "Title"
  }
}

Errors: 401 no or expired credential · 403 the credential does not hold help_center:write · 404 the record or module is outside what it may reach · 422 invalid input (problems[]) · 409 help_article_not_found, help_category_not_found, help_article_needs_content, help_article_invalid_tags · 429 slow down

Data models

HelpArticle

Table help_article · Resource help_articles

  • GET /api/v1/help_articles
  • GET /api/v1/help_articles/{id}
ColumnTypeNullableAllowed valuesReferences
idstring (uuid) · uuid
organization_idstring (uuid) · uuidorganization
workspace_idstring (uuid) · uuidworkspace
category_idstring (uuid) · uuidyeshelp_category
titlestring · text
descriptionstring · textyes
contentstring · text
statusstring · textdraft, published, archived
slugstring · text
localestring · text
positioninteger · int4
viewsinteger · int4
author_user_idstring (uuid) · uuidyesapp_user
published_atstring (date-time) · timestamptzyes
created_atstring (date-time) · timestamptz
updated_atstring (date-time) · timestamptz
meta_titlestring · textyes
meta_descriptionstring · textyes
meta_tagsstring[] · text[]

Primary key: id

Unique: workspace_id, locale, slug

Checks:

  • CHECK ((cardinality(meta_tags) <= 30))
  • CHECK (((meta_title IS NULL) OR (length(meta_title) <= 255)))
  • CHECK (((status <> 'published'::text) OR (length(TRIM(BOTH FROM content)) > 0)))
  • CHECK ((slug ~ '^[a-z0-9]+(-[a-z0-9]+)*$'::text))
  • CHECK ((length(TRIM(BOTH FROM title)) > 0))

HelpCategory

Table help_category · Resource help_categories

  • GET /api/v1/help_categories
  • GET /api/v1/help_categories/{id}
ColumnTypeNullableAllowed valuesReferences
idstring (uuid) · uuid
organization_idstring (uuid) · uuidorganization
workspace_idstring (uuid) · uuidworkspace
parent_category_idstring (uuid) · uuidyeshelp_category
namestring · text
descriptionstring · textyes
slugstring · text
localestring · text
iconstring · textyes
positioninteger · int4
created_atstring (date-time) · timestamptz
updated_atstring (date-time) · timestamptz
is_publicboolean · bool

Primary key: id

Unique: workspace_id, locale, slug

Checks:

  • CHECK ((length(TRIM(BOTH FROM name)) > 0))
  • CHECK ((slug ~ '^[a-z0-9]+(-[a-z0-9]+)*$'::text))

Events

Workflows and webhooks react to these events.

EventWhat happensPayload
help_center.article_archivedA help article was archived.id
help_center.article_createdA help article was drafted.id, ownerUserId
help_center.article_deletedA help article was deleted.id
help_center.article_publishedA help article was published.id
help_center.article_unpublishedA help article went back to draft.id
help_center.article_updatedA help article was edited.id
help_center.category_changedA help category was created, changed or deleted.id