跳到内容
Esc
↑↓导航↵打开⌘J预览

Retrieve a template

GET/templates/{id}
授权
AuthorizationBearer 令牌 · header必填

A BillionSend API key (bs_…).

路径参数
idstring必填

Template id or alias

最小长度 1
响应
200

Template by id or alias. Every save through the API is live and publishes a new version, so status is always published. The dashboard editor keeps a working copy and publishes on request, with a version history. from, reply_to and variables are not supported and read as null, null and [].

idstring<uuid>必填
namestring必填
aliasstring | null必填
statusstring必填
允许值:published
published_atstring必填
created_atstring必填
updated_atstring必填
objectstring必填
允许值:template
current_version_idstring<uuid>必填
fromnull必填
subjectstring | null必填
reply_tonull必填
htmlstring必填
textstring | null必填
variablesany[]必填

Always empty

has_unpublished_versionsboolean必填
允许值:false
401

Missing, malformed, unknown or revoked API key

statusCodenumber必填
namestring必填
messagestring必填
404

Not found

statusCodenumber必填
namestring必填
messagestring必填
429

Over the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumber必填
namestring必填
messagestring必填
试一试
服务器
授权
参数
请求
curl -X GET 'https://api.billionsend.com/templates/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
响应
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "alias": "string",
  "status": "published",
  "published_at": "string",
  "created_at": "string",
  "updated_at": "string",
  "object": "template",
  "current_version_id": "158beffb-f9de-457f-bbee-873740e72504",
  "from": null,
  "subject": "string",
  "reply_to": null,
  "html": "string",
  "text": "string",
  "variables": [
    null
  ],
  "has_unpublished_versions": false
}

这个页面有帮助吗?