List custom elements
The custom elements that the workspace's active extensions draw in the editor, e.g. Tabs: their props, whether they have content, which child blocks their content accepts, and the elements that belong inside them. Write them in MDX as content. The editor guides edits by these rules and offers a clean-up; the API doesn't enforce them.
Required API key permissions: read:entries. Write permissions also grant read access for the same resource.
Authentication
apiKeyhttp, bearer, Andesine API keyUse an Andesine API key as a Bearer token
oauthhttp, bearer, Andesine OAuth access tokenUse an OAuth access token with andesine:api scope. Send x-workspace-id for workspace operations. Current user permissions apply.
Headers
x-workspace-idstringRequired for OAuth: ID of the workspace to access. API keys use their own workspace.
Responses
200OKapplication/json
Bodyarray of object9 fields
element*stringname*stringdescriptionstringcontent*booleanFalse for an element without content, written as
acceptsobjectThe direct child blocks that its content accepts; without it, any blocks
2 fields
elementsarray of stringblocksarray of stringrejectsobjectThe direct child blocks that its content doesn't accept, even if accepts lists them
2 fields
elementsarray of stringblocksarray of stringpropsarray of any ofThe props, with their defaults, which a new element gets
Options
Any of
Option 1object
name*stringtitlestringdescriptionstringtype*constant"string"enumarray of stringcontrolstring"input", "textarea", "icon", "link", "select", "toggle"placeholderstringminLengthnumbermaxLengthnumberdefaultstringOption 2object
name*stringtitlestringdescriptionstringtype*string"number", "integer"minimumnumbermaximumnumberdefaultnumberOption 3object
name*stringtitlestringdescriptionstringtype*constant"boolean"defaultbooleanextension*stringThe extension that renders it, e.g. andesine/pages
children*array of objectElements that belong inside this one, e.g. Tab in Tabs
7 fields
element*stringnamestringdescriptionstringcontent*booleanFalse for an element without content, written as
acceptsobjectThe direct child blocks that its content accepts; without it, any blocks
2 fields
elementsarray of stringblocksarray of stringrejectsobjectThe direct child blocks that its content doesn't accept, even if accepts lists them
2 fields
elementsarray of stringblocksarray of stringpropsarray of any ofThe props, with their defaults, which a new element gets
Options
Any of
Option 1object
name*stringtitlestringdescriptionstringtype*constant"string"enumarray of stringcontrolstring"input", "textarea", "icon", "link", "select", "toggle"placeholderstringminLengthnumbermaxLengthnumberdefaultstringOption 2object
name*stringtitlestringdescriptionstringtype*string"number", "integer"minimumnumbermaximumnumberdefaultnumberOption 3object
name*stringtitlestringdescriptionstringtype*constant"boolean"defaultboolean400Bad Requestapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"BAD_REQUEST"status*constant400message*string"Bad Request"dataValidationErrorData2 fields
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
issuesarray of ValidationIssue3 fields
message*stringcodestringpatharray of any ofOptions
Any of
Option 1string
Option 2number
Option 3object
key*any ofOptions
Any of
Option 1string
Option 2number
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany401Unauthorizedapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"UNAUTHORIZED"status*constant401message*string"Unauthorized"dataErrorData1 field
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany403Forbiddenapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"FORBIDDEN"status*constant403message*string"Forbidden"dataForbiddenErrorData4 fields
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
missingPermissionsarray of stringrequiredPlanconstant"pro"actionstringThe requested action that was denied
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany404Not Foundapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"NOT_FOUND"status*constant404message*string"Not Found"dataErrorData1 field
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany409Conflictapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"CONFLICT"status*constant409message*string"Conflict"dataErrorData1 field
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany429Too Many Requestsapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"TOO_MANY_REQUESTS"status*constant429message*string"Too Many Requests"dataRateLimitErrorData3 fields
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
limitstringThe limit that was reached: a short-term rate limit, or a monthly API call, AI credit, or spending limit
"rate", "api-calls", "ai-credits", "spending"retryAfterSecondsnumberMinimum delay before another attempt, in seconds. Also sent in Retry-After.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany500Internal Server Errorapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"INTERNAL_SERVER_ERROR"status*constant500message*string"Internal Server Error"dataErrorData1 field
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany503Service Unavailableapplication/json
Bodyone ofOptions
One of
Option 1object
defined*constanttruecode*constant"SERVICE_UNAVAILABLE"status*constant503message*string"Service Unavailable"dataErrorData1 field
hintsarray of stringSuggested next steps. Wording can change; use error codes and structured data for program logic.
Option 2object
defined*constantfalsecode*stringstatus*numbermessage*stringdataany