Confirm a Pixel card
const url = 'https://api.pixonaut.app/v1/pixel/apply';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/apply \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "cardId": "toolu_01A2b3C4d5E6f7G8h9I0j1K2", "conversationId": "pcv_5f0c2a9e1b7d4c3a8e6f0b12" }'Operation ID: pixelApplications.create
Applies an open card of the caller’s conversation, as the member it belongs to: a studio member’s, or one a member holds in a connected store, through their member key.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Don’t ask again, on a card that spends credits: turns “Confirm before spending credits” off, so later spends are applied without a card. Refused for any other card, which always asks.
Examples
Example
{ "cardId": "toolu_01A2b3C4d5E6f7G8h9I0j1K2", "conversationId": "pcv_5f0c2a9e1b7d4c3a8e6f0b12"}Responses
Section titled “Responses”The card was applied
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": "applied", "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 confirmed delete_ink, and it was done. Carry on with what they asked for.", "role": "user" } ], "unavailable": [], "unseen": [], "uploads": {}, "upscaled": {} }, "outcome": "applied", "result": null, "status": 204}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_input, invalid_body
object
Examples
invalid_body
{ "error": "invalid_body"}invalid_input
{ "error": "invalid_input"}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.
The card was stale: what it would change moved since. Refused: turn_in_progress, conversation_moved, card_not_open
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
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.
The confirming route refused the card. Refused: payload_too_large
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
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: rate_limited
object
Examples
rate_limited
{ "error": "rate_limited"}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.
Refused: apply_failed
object
Examples
apply_failed
{ "error": "apply_failed"}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].