Optimizely Messages API
The Messages API from Optimizely — 11 operation(s) for messages.
Operations 17
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
GET
/api/v1/admin/Messages
List site messages in the admin console · Returns the EntitySet Messages
#
Ask an LLM
“Which admin-managed site messages are currently set up in Optimizely Commerce?”
“Can I filter the admin message list to ones with a given subject?”
Tell an agent
List all admin site messages.
Show admin messages matching {filter}, sorted by {orderby}.
POST
/api/v1/admin/Messages
Create a site message as an admin · Post a new entity to EntitySet Messages
#
Ask an LLM
“How do I publish a new site message with a subject and body from the admin API?”
“Can I schedule when an admin message starts and stops displaying?”
Tell an agent
Create an admin message titled {subject} with body {body}.
Post admin message {subject} with body {body}, shown from {dateToDisplay} until {dateToHide}.
GET
/api/v1/admin/Messages({id})
Get one admin site message · Returns the entity with the key from Messages
#
Ask an LLM
“What does a single admin site message record contain?”
“Can I pull up one admin message by its id?”
Tell an agent
Fetch admin message {id}.
Show the subject and body of admin message {id}.
PUT
/api/v1/admin/Messages({id})
Replace an admin site message · Replace entity in EntitySet Messages
#
Ask an LLM
“Can I overwrite an entire admin message record in one call?”
“Does replacing an admin message require resending both subject and body?”
Tell an agent
Replace admin message {id} with subject {subject} and body {body}.
Overwrite the full record of admin message {id}.
DELETE
/api/v1/admin/Messages({id})
Delete one admin site message · Delete entity in EntitySet Messages
#
Ask an LLM
“How do I remove a single admin site message?”
“Can I make deleting an admin message conditional on its ETag?”
Tell an agent destructive · confirm first
Delete admin message {id}.
Delete admin message {id} only if its ETag is {etag}.
PATCH
/api/v1/admin/Messages({id})
Edit part of an admin site message · Update entity in EntitySet Messages
#
Ask an LLM
“Can I push back the hide date on an existing admin message?”
“Is it possible to change only the language of an admin message?”
Tell an agent
Set the hide date of admin message {id} to {dateToHide}.
Change the subject of admin message {id} to {subject}.
GET
/api/v1/admin/Messages/Default.Default()
Get default values for a new site message · Call operation Default
#
Ask an LLM
“What defaults does a blank admin message start with?”
“Is there an empty site message template I can fill in?”
Tell an agent
Get the default field values for a new admin message.
Show the blank site message template.
Ask an LLM
“Can I remove several admin site messages in one request?”
“Is there a batch delete for site messages by id list?”
Tell an agent destructive · confirm first
Bulk delete admin messages {ids}.
Permanently delete every site message in {ids}.
GET
/api/v1/admin/messages({key})/customerorderchanges({customerorderchangeKey})
Get an order change linked to a message · Messages get customer order change by key and customerorderchangekey
#
Ask an LLM
“Which customer order change is tied to a particular site message?”
“Can I read one order change record through the message it belongs to?”
Tell an agent
Get order change {customerorderchangeKey} on message {key}.
Show customer order change {customerorderchangeKey} attached to message {key}.
GET
/api/v1/admin/messages({key})/customproperties({custompropertyKey})
Get a custom property on a site message · Messages get custom property by key and custompropertykey
#
Ask an LLM
“How can I read a custom property stored on a site message?”
“Can I fetch one custom field value from a message record?”
Tell an agent
Get custom property {custompropertyKey} of message {key}.
Show the {custompropertyKey} custom property on message {key}.
GET
/api/v1/admin/messages({key})/messageaudits({messageauditKey})
Get an audit entry for a site message · Messages get message audit by key and messageauditkey
#
Ask an LLM
“Where can I see an audit trail entry recorded for a message?”
“Can I look up one message audit record by its key?”
Tell an agent
Get audit entry {messageauditKey} of message {key}.
Show message audit {messageauditKey} for message {key}.
GET
/api/v1/admin/messages({key})/messagestatuses({messagestatusKey})
Get a delivery status of a site message · Messages get message status by key and messagestatuskey
#
Ask an LLM
“What status record does a message have for a given recipient?”
“Can I check one message status entry, like whether it was read?”
Tell an agent
Get status {messagestatusKey} of message {key}.
Show message status record {messagestatusKey} under message {key}.
GET
/api/v1/admin/messages({key})/messagetargets({messagetargetKey})
Get a target audience entry of a message · Messages get message target by key and messagetargetkey
#
Ask an LLM
“Who is a site message targeted at?”
“Can I read one message target entry to see which audience it addresses?”
Tell an agent
Get target {messagetargetKey} of message {key}.
Show message target {messagetargetKey} defined on message {key}.
Ask an LLM
“How do I show a storefront user the messages in their inbox?”
“What messages has the current shopper received?”
Tell an agent
List my storefront inbox messages.
Show the messages the current user has received.
Ask an LLM
“Can a shopper send a message about one of their orders from the storefront?”
“Is it possible to address a storefront message to a specific user profile?”
Tell an agent
Send a message about order {customerOrderId} with subject {subject} saying {message}.
Send user {toUserProfileId} the message {message} under subject {subject}.
Ask an LLM
“How does a storefront user open a single message from their inbox?”
“Can I fetch one received message with its full body for display?”
Tell an agent
Open inbox message {messageId}.
Show the full storefront message {messageId}.
PATCH
/api/v1/messages/{messageId}
Mark an inbox message as read or unread · Messages V1 patch async
#
Ask an LLM
“Can a shopper mark one of their storefront messages as read?”
“Is there a way to flag an inbox message back to unread?”
Tell an agent
Mark inbox message {messageId} as read.
Set the read flag of storefront message {messageId} to {isRead}.