Facebook

Set Messenger Profile

Sets the ice breakers and persistent menu of a Facebook Page's Messenger. You can send up to 4 ice breakers and up to 3 menu items.

POST
/v1/connections/{id}/stats

Authorization

headerx-api-key<token>

Workspace API key, sent in the x-api-key header. Keys start with op_ and are created in the dashboard.

Path Parameters

id*string
Length1 <= length

Request Body

application/json
  1. body
iceBreakers?array<>
Itemsitems <= 4
persistentMenu?array<>
Itemsitems <= 3

Response Body

Updated Messenger profile

application/json
  1. response
accountId*string
profile*
Example Request
import { Configuration, ConnectionsApi } from "@onepostly/sdk";const connectionsApi = new ConnectionsApi(  new Configuration({ apiKey: process.env.ONEPOSTLY_API_KEY }));const response = await connectionsApi.setConnectionMessengerProfile({  id: "a1b2c3d4-e5f6-4a7b-8c9d-e0f1a2b3c4d5",  setMessengerProfileBody: {},});console.log(response);
Example Response
{  "accountId": "string",  "profile": {    "iceBreakers": [      {        "question": "string",        "payload": "string"      }    ],    "persistentMenu": [      {        "type": "string",        "title": "string",        "url": "string",        "payload": "string"      }    ]  }}