/api/v1/components (POST)
POST
/api/v1/components
const url = 'https://api.endless.zaia.app/api/v1/components';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"detail":{"type":"boolean","value":true},"key":"example"}'};
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.endless.zaia.app/api/v1/components \ --header 'Content-Type: application/json' \ --data '{ "detail": { "type": "boolean", "value": true }, "key": "example" }'Creates a new component.
Request Bodyrequired
Seção intitulada “Request Bodyrequired”Responses
Seção intitulada “Responses”The component was created.
Media typeapplication/json
object
createdAt
required
string format: date-time
id
required
A UUID v4 string that identifies an entity.
string format: uuid
isRemoved
required
boolean
referenceId
required
The ID of the original entity in production.
string format: uuid
updatedAt
required
string format: date-time
versionId
required
A UUID v4 string that identifies an entity.
string format: uuid
detail
required
key
required
The unique key identifier for this component within the workspace.
string
workspaceId
required
The workspace that owns this component.
string format: uuid
Example
{ "detail": { "type": "boolean" }}Unauthorized.
Media typeapplication/json
The description of a known exception.
object
code
The error code.
string
cta
The error call-to-action.
object
type
required
string
url
required
string format: uri
feedback
required
The error feedback.
object
enUs
string
esEs
string
ptBr
string
message
required
The error message.
string
name
required
The error name.
string
Example
{ "cta": { "type": "support-contact" }}Component key already exists.
Media typeapplication/json
The description of a known exception.
object
code
The error code.
string
cta
The error call-to-action.
object
type
required
string
url
required
string format: uri
feedback
required
The error feedback.
object
enUs
string
esEs
string
ptBr
string
message
required
The error message.
string
name
required
The error name.
string
Example
{ "cta": { "type": "support-contact" }}