Ricky logorickyDocs

Get the field mappings of a template

GET
/templates/{template_id}/field-mappings

The template’s variables, read live from Meta, and the contact field that fills each one when Ricky sends the template to a contact, as in broadcasts.

Scope: templates:read.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An organization API key, rky_live_…, created in Settings → API. Send it only from a server.

template_id*string

Template ID.

Match^[0-9]{1,32}$

Response Body

Success.

application/json
  1. response
data*

The contact fields that fill a template’s variables when Ricky sends it to a contact. They apply to the template’s name and language in its business account.

curl -X GET 'https://getricky.ai/api/v1/templates/string/field-mappings'
{  "data": {    "template_id": "1234567890123456",    "variables": [      {        "component": "body",        "key": "1",        "name": "{{1}}"      }    ],    "mappings": [      {        "component": "body",        "key": "1",        "source": {          "kind": "native",          "field": "first_name"        }      }    ]  }}