Skip to Content

Submit a template registration

Submit a template registration. Request: POST /v1/templates/{id}/registrations. Scope: templates:update.

POST
/v1/templates/{id}/registrations

Submits the template's current publication for the provider's review: for WhatsApp, as a message template on the business account of the named number, or of the default number. A first submission creates the provider template; a later one resubmits the newer publication's content to the same template.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json
  1. body
provider*"whatsapp"
Value in"whatsapp"
businessAccountId?WhatsAppBusinessAccountId
Match^waba_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

TemplateRegistration

application/json
  1. response
id*TemplateRegistrationId
Match^treg_[0-9a-hjkmnp-tv-z]{16,24}$
templateId*TemplateId
Match^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$
publicationId*TemplatePublicationId
Match^tpub_[0-9a-hjkmnp-tv-z]{16,24}$
target*|
name*string
language*string
status*string
Value in"draft""submitted""approved""rejected""paused""disabled"
category*string
Value in"marketing""utility""authentication""transactional""service_implicit""service_explicit""promotional"
providerCategory*|null
providerTemplateId*string|null
reason*string|null
submittedAt*string|null
statusChangedAt*string
createdAt*string
updatedAt*string
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.templateRegistrations.submit({
  "id": "example",
  "provider": "whatsapp"
});
Example Response
{
  "id": "string",
  "templateId": "string",
  "publicationId": "string",
  "target": {
    "provider": "whatsapp",
    "wabaId": "string"
  },
  "name": "string",
  "language": "string",
  "status": "draft",
  "category": "marketing",
  "providerCategory": "marketing",
  "providerTemplateId": "string",
  "reason": "string",
  "submittedAt": "string",
  "statusChangedAt": "string",
  "createdAt": "string",
  "updatedAt": "string"
}

Related documentation