Skip to content
Shortcut: /, ⌘K or Ctrl+K

Templates

View as Markdown

The template object

Attributes

  • idstring (uuid)required

    Identifier for this resource.

  • createdAtintegerrequiredmin0formatint64

    Unix timestamp in milliseconds when this resource was created.

  • namestringrequiredlength1–512

    Human-readable name for this resource.

  • categorystringrequired

    Specifies category for this management management template.

  • languagestringrequired

    Language or locale code used for this content.

  • statusstringrequired

    Current status of this resource or operation.

  • kindstringrequired

    Kind discriminator for this object.

  • definitionobjectrequirednullable

    Structured definition for this resource.

  • sampleValuesobjectrequirednullable

    Example values used to preview this template field.

  • cloudLinksarray of objectrequired

    Cloud links associated with this management management template.

  • updatedAtintegerrequiredmin0formatint64

    Unix timestamp in milliseconds when this resource was last updated.

The template object
{
  "id": "00000000-0000-4000-8000-000000000000",
  "createdAt": 0,
  "name": "string",
  "category": "string",
  "language": "string",
  "status": "string",
  "kind": "string",
  "definition": {},
  "sampleValues": {},
  "cloudLinks": [
    {}
  ],
  "updatedAt": 0
}

The Messaging API template object

Attributes

  • idstringrequired

    Identifier for this resource.

  • namestringrequired

    Human-readable name for this resource.

  • categorystringrequired

    Specifies category for this native message template.

  • languagestringrequired

    Language or locale code used for this content.

  • statusstringrequired

    Current status of this resource or operation.

  • kindstringrequired

    Kind discriminator for this object.

  • definitionany

    Structured definition for this resource.

  • sampleValuesany

    Example values used to preview this template field.

  • cloudLinksarray of anyrequired

    Cloud links associated with this native message template.

  • createdAtnumberrequired

    Unix timestamp in milliseconds when this resource was created.

  • updatedAtnumberrequired

    Unix timestamp in milliseconds when this resource was last updated.

The Messaging API template object
{
  "id": "string",
  "name": "string",
  "category": "string",
  "language": "string",
  "status": "string",
  "kind": "string",
  "definition": null,
  "sampleValues": null,
  "cloudLinks": [
    null
  ],
  "createdAt": 0,
  "updatedAt": 0
}

Create project template

POST/messaging/projects/{projectSlug}/templatesMessaging API
Base URL
https://api.polymorfa.com
Required permission
templates:manage

Path parameters

  • projectSlugstringrequired

    Specifies project slug for this path parameter.

Body

  • namestringrequiredmin length1pattern^[a-z0-9_]+$

    Human-readable name for this resource.

  • definitionobjectrequired

    Structured definition for this resource.

  • sampleValuesobject

    Example values used to preview this template field.

Responses

  • 201Created
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataobjectrequired

      Structured data carried by this object.

      Show 11 child fields
    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 500Internal server error
POST /messaging/projects/{projectSlug}/templatescURL
Not available with the Test key. Use a team key or project token.
curl -X POST "https://api.polymorfa.com/messaging/projects/<projectSlug>/templates" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "definition": {}
}'
Response
{
  "success": true,
  "data": {
    "id": "string",
    "name": "string",
    "category": "string",
    "language": "string",
    "status": "string",
    "kind": "string",
    "cloudLinks": [
      null
    ],
    "createdAt": 0,
    "updatedAt": 0
  }
}

Create message template

POST/platform/templatesPlatform API
Base URL
https://api.polymorfa.com
Required permission
templates:manage

Creates an incomplete or complete message-template draft in one project.

Requires templates:manage. Project tokens only access resources in their own project.

Body

  • projectIdstring (uuid)required

    Identifier of the Polymorfa project that owns this resource.

  • draftIdstring (uuid)

    Identifier of the saved draft.

  • namestringrequiredlength1–512

    Human-readable name for this resource.

  • definitionobjectrequired

    Structured definition for this resource.

  • sampleValuesobjectnullable

    Example values used to preview this template field.

Responses

  • 200Success
    • datastring (uuid)required

      Structured data carried by this object.

    Show 3 headers
  • 400A path, query, or request-body value did not pass validation.
  • 401Missing/invalid credential for this audience.
  • 403Authenticated but lacks the required scope/role/audience.
  • 404The requested resource was not found inside the authenticated team or project scope.
POST /platform/templatescURL
Not available with the Test key. Use a team key or project token.
curl -X POST "https://api.polymorfa.com/platform/templates" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "00000000-0000-4000-8000-000000000000",
  "name": "string",
  "definition": {}
}'
Response
{
  "data": "00000000-0000-4000-8000-000000000000"
}

List project templates

GET/messaging/projects/{projectSlug}/templatesMessaging API
Base URL
https://api.polymorfa.com
Required permission
templates:read

Path parameters

  • projectSlugstringrequired

    Specifies project slug for this path parameter.

Responses

  • 200Templates
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataarray of objectrequired

      Structured data carried by this object.

      Show 11 child fields
    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 500Internal server error
GET /messaging/projects/{projectSlug}/templatescURL
Not available with the Test key. Use a team key or project token.
curl "https://api.polymorfa.com/messaging/projects/<projectSlug>/templates" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22"
Response
{
  "success": true,
  "data": [
    {
      "id": "string",
      "name": "string",
      "category": "string",
      "language": "string",
      "status": "string",
      "kind": "string",
      "cloudLinks": [
        null
      ],
      "createdAt": 0,
      "updatedAt": 0
    }
  ]
}

List message templates

GET/platform/templatesPlatform API
Base URL
https://api.polymorfa.com
Required permission
templates:read

Lists the message-template drafts in one project.

Requires templates:read. Project tokens only access resources in their own project.

Query parameters

  • projectIdstringrequired

    Identifier of the Polymorfa project that owns this resource.

Responses

  • 200Success
    • dataarray of objectrequiredmax items500

      Structured data carried by this object.

      Show 11 child fields
    Show 3 headers
  • 400A path, query, or request-body value did not pass validation.
  • 401Missing/invalid credential for this audience.
  • 403Authenticated but lacks the required scope/role/audience.
  • 404The requested resource was not found inside the authenticated team or project scope.
GET /platform/templatescURL
Not available with the Test key. Use a team key or project token.
curl "https://api.polymorfa.com/platform/templates?projectId=<projectId>" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22"
Response
{
  "data": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "createdAt": 0,
      "name": "string",
      "category": "string",
      "language": "string",
      "status": "string",
      "kind": "string",
      "definition": {},
      "sampleValues": {},
      "cloudLinks": [
        {}
      ],
      "updatedAt": 0
    }
  ]
}

Get project template

GET/messaging/projects/{projectSlug}/templates/{id}Messaging API
Base URL
https://api.polymorfa.com
Required permission
templates:read

Path parameters

  • projectSlugstringrequired

    Specifies project slug for this path parameter.

  • idstringrequired

    Identifier for this resource.

Responses

  • 200Template
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataobjectrequired

      Structured data carried by this object.

      Show 11 child fields
    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 500Internal server error
GET /messaging/projects/{projectSlug}/templates/{id}cURL
Not available with the Test key. Use a team key or project token.
curl "https://api.polymorfa.com/messaging/projects/<projectSlug>/templates/<id>" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22"
Response
{
  "success": true,
  "data": {
    "id": "string",
    "name": "string",
    "category": "string",
    "language": "string",
    "status": "string",
    "kind": "string",
    "cloudLinks": [
      null
    ],
    "createdAt": 0,
    "updatedAt": 0
  }
}

Get message template

GET/platform/templates/{templateId}Platform API
Base URL
https://api.polymorfa.com
Required permission
templates:read

Gets one message-template draft from the specified project.

Requires templates:read. Project tokens only access resources in their own project.

Path parameters

  • templateIdstringrequired

    Identifier of the message template.

Query parameters

  • projectIdstringrequired

    Identifier of the Polymorfa project that owns this resource.

Responses

  • 200Success
    • dataobjectrequirednullable

      Structured data carried by this object.

      Show 11 child fields
    Show 3 headers
  • 400A path, query, or request-body value did not pass validation.
  • 401Missing/invalid credential for this audience.
  • 403Authenticated but lacks the required scope/role/audience.
  • 404The requested resource was not found inside the authenticated team or project scope.
GET /platform/templates/{templateId}cURL
Not available with the Test key. Use a team key or project token.
curl "https://api.polymorfa.com/platform/templates/<templateId>?projectId=<projectId>" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22"
Response
{
  "data": {
    "id": "00000000-0000-4000-8000-000000000000",
    "createdAt": 0,
    "name": "string",
    "category": "string",
    "language": "string",
    "status": "string",
    "kind": "string",
    "definition": {},
    "sampleValues": {},
    "cloudLinks": [
      {}
    ],
    "updatedAt": 0
  }
}

Update project template

PATCH/messaging/projects/{projectSlug}/templates/{id}Messaging API
Base URL
https://api.polymorfa.com
Required permission
templates:manage

Path parameters

  • projectSlugstringrequired

    Specifies project slug for this path parameter.

  • idstringrequired

    Identifier for this resource.

Body

  • namestringmin length1

    Human-readable name for this resource.

  • statusstring

    Status value to assign to this resource.

  • definitionobject

    Structured definition for this resource.

  • sampleValuesobject

    Example values used to preview this template field.

Responses

  • 200Updated
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataobjectrequired

      Structured data carried by this object.

      Show 11 child fields
    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 500Internal server error
PATCH /messaging/projects/{projectSlug}/templates/{id}cURL
Not available with the Test key. Use a team key or project token.
curl -X PATCH "https://api.polymorfa.com/messaging/projects/<projectSlug>/templates/<id>" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "status": "string",
  "definition": {},
  "sampleValues": {}
}'
Response
{
  "success": true,
  "data": {
    "id": "string",
    "name": "string",
    "category": "string",
    "language": "string",
    "status": "string",
    "kind": "string",
    "cloudLinks": [
      null
    ],
    "createdAt": 0,
    "updatedAt": 0
  }
}

Update message template

PATCH/platform/templates/{templateId}Platform API
Base URL
https://api.polymorfa.com
Required permission
templates:manage

Updates one message-template draft in the project supplied in the request body.

Requires templates:manage. Project tokens only access resources in their own project.

Path parameters

  • templateIdstringrequired

    Identifier of the message template.

Body

  • projectIdstring (uuid)required

    Identifier of the Polymorfa project that owns this resource.

  • namestringlength1–512

    Human-readable name for this resource.

  • statusstring

    Status value to assign to this resource.

  • definitionobject

    Structured definition for this resource.

  • sampleValuesobjectnullable

    Example values used to preview this template field.

Responses

  • 200Success
    • dataobjectrequired

      Structured data carried by this object.

      Show 11 child fields
    Show 3 headers
  • 400A path, query, or request-body value did not pass validation.
  • 401Missing/invalid credential for this audience.
  • 403Authenticated but lacks the required scope/role/audience.
  • 404The requested resource was not found inside the authenticated team or project scope.
PATCH /platform/templates/{templateId}cURL
Not available with the Test key. Use a team key or project token.
curl -X PATCH "https://api.polymorfa.com/platform/templates/<templateId>" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "00000000-0000-4000-8000-000000000000"
}'
Response
{
  "data": {
    "id": "00000000-0000-4000-8000-000000000000",
    "createdAt": 0,
    "name": "string",
    "category": "string",
    "language": "string",
    "status": "string",
    "kind": "string",
    "definition": {},
    "sampleValues": {},
    "cloudLinks": [
      {}
    ],
    "updatedAt": 0
  }
}

Preview project template

POST/messaging/projects/{projectSlug}/templates/{id}/previewMessaging API
Base URL
https://api.polymorfa.com
Required permission
templates:read

Path parameters

  • projectSlugstringrequired

    Specifies project slug for this path parameter.

  • idstringrequired

    Identifier for this resource.

Body

  • valuesobject

    Structured values values for this native preview message template request.

  • surfacestring

    Specifies surface for this native preview message template request.

    Allowed valuescloudwhatsmeowsandbox

Responses

  • 200Rendered
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataobjectrequired

      Structured data carried by this object.

    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 500Internal server error
POST /messaging/projects/{projectSlug}/templates/{id}/previewcURL
Not available with the Test key. Use a team key or project token.
curl -X POST "https://api.polymorfa.com/messaging/projects/<projectSlug>/templates/<id>/preview" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22" \
  -H "Content-Type: application/json" \
  -d '{
  "values": {},
  "surface": "cloud"
}'
Response
{
  "success": true,
  "data": {}
}

Submit project template for approval

POST/messaging/projects/{projectSlug}/templates/{id}/submitMessaging API
Base URL
https://api.polymorfa.com
Required permission
templates:manage

Accepts any number, so one integration handles both connection types; check submission in the response. A Cloud API number needs Meta approval: the template is rendered into a Meta create-template payload, submitted through that number, recorded as a per-number approval pointer (cloudLinks), and returned with submission.status PENDING. Read the Number's template catalog for Meta's review result. Any other number needs no review: nothing is sent to Meta and the template is returned with submission.status APPROVED and submission.autoApproved true. Incomplete or invalid definitions return 400 for every number; passing local validation does not guarantee Meta approval.

Path parameters

  • projectSlugstringrequired

    Specifies project slug for this path parameter.

  • idstringrequired

    Identifier for this resource.

Body

  • sessionstringrequiredmin length1

    Identifier of the connected Polymorfa session.

Responses

  • 200Submitted to Meta (Cloud API number) or approved automatically (any other number)
    • successbooleanrequired

      Whether the request succeeded.

      Allowed valuestrue
    • dataobjectrequired

      Structured data carried by this object.

      Show 12 child fields
    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 500Internal server error
POST /messaging/projects/{projectSlug}/templates/{id}/submitcURL
Not available with the Test key. Use a team key or project token.
curl -X POST "https://api.polymorfa.com/messaging/projects/<projectSlug>/templates/<id>/submit" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22" \
  -H "Content-Type: application/json" \
  -d '{
  "session": "string"
}'
Response
{
  "success": true,
  "data": {
    "id": "string",
    "name": "string",
    "category": "string",
    "language": "string",
    "status": "string",
    "kind": "string",
    "cloudLinks": [
      null
    ],
    "createdAt": 0,
    "updatedAt": 0,
    "submission": {
      "session": "string",
      "status": "PENDING",
      "autoApproved": true,
      "metaTemplateId": "string"
    }
  }
}

Delete project template

DELETE/messaging/projects/{projectSlug}/templates/{id}Messaging API
Base URL
https://api.polymorfa.com
Required permission
templates:manage

Path parameters

  • projectSlugstringrequired

    Specifies project slug for this path parameter.

  • idstringrequired

    Identifier for this resource.

Responses

  • 200Deleted
    • successbooleanrequired

      Whether the request succeeded.

    • messagestring

      Human-readable message associated with this result.

    Show 3 headers
  • 400Bad request — request body or params failed validation
  • 401Missing or invalid authentication token
  • 403Authenticated but not permitted (missing scope or rule violation)
  • 404Resource not found
  • 500Internal server error
DELETE /messaging/projects/{projectSlug}/templates/{id}cURL
Not available with the Test key. Use a team key or project token.
curl -X DELETE "https://api.polymorfa.com/messaging/projects/<projectSlug>/templates/<id>" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22"
Response
{
  "success": true
}

Delete message template

DELETE/platform/templates/{templateId}Platform API
Base URL
https://api.polymorfa.com
Required permission
templates:manage

Deletes one message-template draft from the specified project.

Requires templates:manage. Project tokens only access resources in their own project.

Path parameters

  • templateIdstringrequired

    Identifier of the message template.

Query parameters

  • projectIdstringrequired

    Identifier of the Polymorfa project that owns this resource.

Responses

  • 200Success
    • dataobjectrequired

      Structured data carried by this object.

      Show 1 child field
    Show 3 headers
  • 400A path, query, or request-body value did not pass validation.
  • 401Missing/invalid credential for this audience.
  • 403Authenticated but lacks the required scope/role/audience.
  • 404The requested resource was not found inside the authenticated team or project scope.
DELETE /platform/templates/{templateId}cURL
Not available with the Test key. Use a team key or project token.
curl -X DELETE "https://api.polymorfa.com/platform/templates/<templateId>?projectId=<projectId>" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Polymorfa-Version: 2026-09-22"
Response
{
  "data": {
    "ok": true
  }
}