Skip to content

Read an email template's draft, published version and history

Returns the draft, the published version and every version of one message's template at one scope and language. A message with no override at that scope answers with no versions and inherits its wording.

Quire permissions

Required capability: email_template/edit.

Credential scopes: email:read.

The acting subject must also be allowed to perform this action in the organisation.

GET
https://your-organisation.quirelms.com/api/v1/email_templates/{message_key}/versions

Authorisation

  • apiKeyoptionalHTTP
  • oauth2optionalOAuth 2.0

Path parameters

  • message_keystringrequired

Query parameters

  • languagestringrequired

    The BCP 47 language of the template, for example en or fr-CA.

    maxLength: 35, minLength: 1, pattern: ^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$
  • leveloptionaltenantorcategoryorcourseoractivity

    Where the override applies. Defaults to tenant.

  • scope_idoptionalstring

    The category, course or activity the override applies to. Required unless level is tenant, and refused when it is.

    format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Header parameters

  • Quire-Versionoptionalstring

    The dated API revision to serve this request at. Omitted, the request is served at the revision the credential was issued against. The response echoes the revision actually applied.

    format: date

Returns

200

Success.

JSON
  • message_keystringrequired
  • titlestringrequired
  • descriptionstringrequired
  • categorystringrequired
  • criticalbooleanrequired
  • scopeobjectrequired
    3 properties
    • leveltenantorcategoryorcourseoractivityrequired
    • scope_idstringornullrequired
      2 variants

      One of the following:

      • string
      • null
    • languagestringrequired
  • template_idstringornullrequired
    2 variants

    One of the following:

    • string
    • null
  • draftobjectornullrequired
    2 variants

    One of the following:

    • object
    • null
  • publishedobjectornullrequired
    2 variants

    One of the following:

    • object
    • null
  • versionsarray ofobjectrequired
    12 properties
    • idstringrequired
      format: uuid, pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
    • versionintegerrequired
      maximum: 9007199254740991, minimum: -9007199254740991
    • statedraftorpublishedorarchivedrequired
    • subjectstring | nullrequired
    • preheaderstring | nullrequired
    • from_namestring | nullrequired
    • reply_tostring | nullrequired
    • variable_refsarray ofstringrequired
    • text_partstring | nullrequired
    • bodystring | nullrequired

      The block document or MJML source as JSON text, or null to inherit.

    • created_atstringrequired
      format: date-time, pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • published_atstringornullrequired
      2 variants

      One of the following:

      • string
      • null
  • may_edit_sourcebooleanrequired

401

The credential is missing, malformed, expired or revoked.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null

403

The credential lacks the scope this operation requires, or the acting subject lacks the capability.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null

404

No such resource, or none this credential is permitted to know about.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null

422

The request was understood and its content is not valid. errors names each field.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null

429

A rate limit or a concurrency cap was reached. Retry-After says when to try again.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null

500

Something failed at our end. Quote request_id when reporting it.

JSON
  • typestringrequired
    format: uri
  • titlestringrequired
  • statusintegerrequired
  • codestringrequired
  • categoryvalidationorauthenticationorauthorizationornot_foundorconflictorprecondition+4 morerequired
  • detailstringrequired
  • request_idstringrequired
  • docs_urlstringrequired
    format: uri
  • errorsoptionalarray ofobject
    3 properties
    • pathstringrequired

      RFC 6901 JSON Pointer into the request body.

    • codestringrequired
    • detailstringrequired
  • retry_afteroptionalinteger | null
Navigation

Type to search…

↑↓ navigate↵ selectEsc close