Dismiss a Pixel card, or the conversation
const url = 'https://api.pixonaut.app/v1/pixel/dismiss';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"cardId":"toolu_01A2b3C4d5E6f7G8h9I0j1K2","conversationId":"pcv_5f0c2a9e1b7d4c3a8e6f0b12"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pixonaut.app/v1/pixel/dismiss \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "cardId": "toolu_01A2b3C4d5E6f7G8h9I0j1K2", "conversationId": "pcv_5f0c2a9e1b7d4c3a8e6f0b12" }'Operation ID: pixelDismissals.create
With a card, dismisses it and tells Pixel. Without one, ends the conversation: a member key ends its member’s conversation in that store this way, and its next turn with no conversation starts a new one.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The card to dismiss. Without one, the conversation itself is ended, so the next turn with no conversation starts a new one.
Examples
Example
{ "cardId": "toolu_01A2b3C4d5E6f7G8h9I0j1K2", "conversationId": "pcv_5f0c2a9e1b7d4c3a8e6f0b12"}Responses
Section titled “Responses”The card was dismissed, and Pixel told
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Examples
Example
{ "conversation": { "cards": { "toolu_01A2b3C4d5E6f7G8h9I0j1K2": { "input": { "id": "ink_summer" }, "status": "dismissed", "tool": "delete_ink" } }, "contentKeys": {}, "id": "pcv_5f0c2a9e1b7d4c3a8e6f0b12", "messages": [ { "content": "Delete the old Summer ink", "role": "user" }, { "content": [ { "id": "toolu_01A2b3C4d5E6f7G8h9I0j1K2", "input": { "id": "ink_summer" }, "name": "delete_ink", "type": "tool_use" } ], "role": "assistant" }, { "content": "Note from the studio: the author declined delete_ink; nothing was saved. Take that as their answer, and do not propose it again unless they ask.", "role": "user" } ], "unavailable": [], "unseen": [], "uploads": {}, "upscaled": {} }}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
The conversation was ended, or had ended already
Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: invalid_body
object
Examples
invalid_body
{ "error": "invalid_body"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: unauthorized, member_link_required, member_link_revoked
object
Examples
member_link_required
{ "error": "member_link_required"}member_link_revoked
{ "error": "member_link_revoked"}unauthorized
{ "error": "unauthorized"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: origin_forbidden, feature_disabled, forbidden, workspace_suspended
object
The feature the tenant does not have. Always sent with feature_disabled.
Examples
feature_disabled
{ "error": "feature_disabled", "feature": "api"}forbidden
{ "error": "forbidden"}origin_forbidden
{ "error": "origin_forbidden"}workspace_suspended
{ "error": "workspace_suspended"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: conversation_not_found
object
Examples
conversation_not_found
{ "error": "conversation_not_found"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: turn_in_progress, conversation_moved, card_not_open
object
Examples
card_not_open
{ "error": "card_not_open"}conversation_moved
{ "error": "conversation_moved"}turn_in_progress
{ "error": "turn_in_progress"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: payload_too_large
object
Always sent with payload_too_large.
Examples
payload_too_large
{ "error": "payload_too_large", "maxBytes": 0}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Refused: db_error. A request that failed unexpectedly answers as text instead.
object
Examples
db_error
{ "error": "db_error"}Headers
Section titled “Headers”Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.
Questions? Write to [email protected].