Skip to main content
POST
Create template

Request contract

  • Method and path: POST /apis/v1/social/messaging/whatsapp/templates
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/social/messaging/whatsapp/templates
  • connectionId: query; required
Complete OpenAPI definition Effective request declaration (including authentication and referenced schemas):

Cost and request rules

No additional charge for this operation.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

connectionId
string
required

Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.

Pattern: ^msc_[0-9A-Za-z]+$

Body

application/json
category
enum<string>
required

Template category

Available options:
AUTHENTICATION,
MARKETING,
UTILITY
language
string
required

Template language code (e.g., en_US)

name
string
required

Template name (lowercase, letters/numbers/underscores, must start with a letter)

Pattern: ^[a-z][a-z0-9_]*$
components
object[]

Template components (header, body, footer, buttons, carousel, limited_time_offer). Required for custom templates, omit when using library_template_name.

Minimum array length: 1
connectionId
string

The connection, when not sent as the connectionId query parameter.

Pattern: ^msc_[0-9A-Za-z]+$
library_template_body_inputs
object

Optional body customizations for library templates. Available options depend on the template (e.g., add_contact_number, add_learn_more_link, add_security_recommendation, add_track_package_link, code_expiration_minutes).

library_template_button_inputs
object[]

Optional button customizations for library templates. Each item specifies button type and configuration (e.g., URL, phone number, quick reply).

library_template_name
string

Name of a pre-built template from Meta's template library (e.g., "appointment_reminder", "auto_pay_reminder_1", "address_update"). When provided, the template is pre-approved by Meta with no review wait. Omit components when using this field.

message_send_ttl_seconds
integer

Delivery validity window in seconds: a message not delivered within it is dropped. Range by category:

  • AUTHENTICATION: 30 to 900. - UTILITY: 30 to 43200 (12h). - MARKETING: 43200 to 2592000 (30 days).

-1 (create only) keeps the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check).

parameter_format
enum<string>

Variable style: POSITIONAL ({{1}}, the default) or NAMED ({{customer_name}}). Named templates provide examples via body_text_named_params / header_text_named_params. Inferred as NAMED when omitted but a named-params example is present.

Available options:
POSITIONAL,
NAMED,
positional,
named

Response

Success

success
boolean
template
object