Create a beacon
Creates a floating contact beacon linked to a form.
POST
/projects/{projectId}/beacons
Creates a floating contact beacon linked to a form.
Authentication
API Key (header: X-API-Key)
Path Parameters
projectId
string
required
path
Request Body required
application/jsonform_id
string
REQUIRED
position
string
Enum:
bottom-right, bottom-leftprimary_color
string
button_label
string
button_icon
string
Enum:
chat, mail, help, custom_svgcustom_svg
string
greeting_title
string
greeting_text
string
allowed_origins
string[]
Array of:
Responses
201
Created beacon
application/jsondata
object
id
string
project_id
string
form_id
string
position
string
Enum:
bottom-right, bottom-leftprimary_color
string
button_label
string
button_icon
string
Enum:
chat, mail, help, custom_svgcustom_svg
string | null
greeting_title
string
greeting_text
string
allowed_origins
string[]
Array of:
archived_at
string (date-time) | null
created_at
string (date-time)
curl -X POST 'https://api.rogeriq.com/api/v1/projects/string/beacons' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "form_id": "string", "position": "bottom-right", "primary_color": "string", "button_label": "string", "button_icon": "chat", "custom_svg": "string", "greeting_title": "string", "greeting_text": "string", "allowed_origins": [ "string" ]}'
const response = await fetch('https://api.rogeriq.com/api/v1/projects/string/beacons', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({ "form_id": "string", "position": "bottom-right", "primary_color": "string", "button_label": "string", "button_icon": "chat", "custom_svg": "string", "greeting_title": "string", "greeting_text": "string", "allowed_origins": [ "string" ] })});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://api.rogeriq.com/api/v1/projects/string/beacons', headers=headers, json={ "form_id": "string", "position": "bottom-right", "primary_color": "string", "button_label": "string", "button_icon": "chat", "custom_svg": "string", "greeting_title": "string", "greeting_text": "string", "allowed_origins": [ "string" ]})print(response.json())
201
Response
{ "data": { "id": "<string>", "project_id": "<string>", "form_id": "<string>", "position": "bottom-right", "primary_color": "<string>", "button_label": "<string>", "button_icon": "chat", "custom_svg": "<string>", "greeting_title": "<string>", "greeting_text": "<string>", "allowed_origins": [ "<string>" ], "archived_at": "2024-01-01T00:00:00Z", "created_at": "2024-01-01T00:00:00Z" }}
API Playground
Try this endpoint
POST
/projects/{projectId}/beacons