Brickworks — API Reference

Adapt, structure, and personalize experiences with AI-native content bricks. Go beyond headless CMS with behavioral AI that orchestrates content, decisions, and journeys in real time.

26 endpoints across 5 tags.

Brickworks: Schemas

GET /brickworks/v1/schemas — Get schemas

/api-reference/brickworks#tag/Brickworks:-Schemas/operation/getSchemas

Retrieve a list of schemas. You can paginate the results, filter by schema type, and search for a phrase in schema names.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_SCHEMAS_READ

User role permission required: assets_brickworks: read

Parameters

NameInTypeRequiredDescription
limitqueryintegeroptionalLimit of items per page
pagequeryintegeroptionalThe number of the page to retrieve
searchquerystringoptionalA string to search for in: id appId displayName description
sortByquerystringoptionalYou can change the default sorting. The sorting direction is selected by adding asc or desc, for example sortBy=createdAt:desc. You can sort by: appId displayName createdAt updatedAt
schemaTypesqueryenum<"SIMPLE", "VERSIONED">optionalComma-separated list of schema types to filter the results. By default, all types are retrieved.

Responses

StatusDescription
200 application/jsonSchema objects
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl --request GET \
  --url 'https://api.synerise.com/brickworks/v1/schemas?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=updatedAt%3Aasc&schemaTypes=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

POST /brickworks/v1/schemas — Create schema

/api-reference/brickworks#tag/Brickworks:-Schemas/operation/createSchema

Create a new schema


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_SCHEMAS_CREATE

User role permission required: assets_brickworks: create

Request body

application/json · brickworks-service-CreateSchemaRequest

FieldTypeRequiredDescription
appIdstringrequiredApp ID of the schema. This is used as the identifier of the schema and must be unique. This ID cannot be changed after the schema is created.In the Synerise Portal, this parameter is called API name.
displayNamestringrequiredSchema name shown to users in the Synerise Portal
descriptionstringoptionalSchema description
fieldsobjectoptionalThe content of the schema.
displayConfigurationobjectoptionalThe layout details of the schema
audienceobjectoptionalDefinition of the profiles which can access content created from this schema.
schemaTypeenum<"SIMPLE", "VERSIONED", "SINGLETON">optional SIMPLE: a schema in which records can only have the PUBLISHED status. VERSIONED: a schema in which records can be saved as drafts; and you can also access the version history. SINGLETON: a schema which has no records. All fields must have default values. Values can still be inserted dynamically with Jinjava.

Responses

StatusDescription
200 application/jsonDetails of the created schema
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl --request POST \
  --url https://api.synerise.com/brickworks/v1/schemas \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"appId":"string","displayName":"string","description":"string","fields":{"type":"object","properties":{"property1":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false},"property2":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false}},"required":["string"],"allOf":[{"if":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"then":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"else":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}}}],"additionalProperties":true},"displayConfiguration":{"ordering":{"property1":0,"property2":0},"metadata":{"property1":{"title":"empty title","description":"string","useAsRecordName":false},"property2":{"title":"empty title","description":"string","useAsRecordName":false}}},"audience":{"targetType":"SEGMENT","segments":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":"{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}"},"schemaType":"SIMPLE"}'

GET /brickworks/v1/schemas/{SchemaIdentifier} — Get schema

/api-reference/brickworks#tag/Brickworks:-Schemas/operation/getSchemaById

Retrieve the details of a schema.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_SCHEMAS_READ

User role permission required: assets_brickworks: read

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)

Responses

StatusDescription
200 application/jsonDetails of the schema
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X GET 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

PUT /brickworks/v1/schemas/{SchemaIdentifier} — Update schema

/api-reference/brickworks#tag/Brickworks:-Schemas/operation/updateSchema

Update a schema.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_SCHEMAS_UPDATE

User role permission required: assets_brickworks: update

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)

Request body

application/json · brickworks-service-UpdateSchemaRequest

Schema properties to update

FieldTypeRequiredDescription
displayNamestringrequiredSchema name shown to users in the Synerise Portal
descriptionstringoptionalSchema description
fieldsobjectoptionalThe content of the schema.
displayConfigurationobjectoptionalThe layout details of the schema
audienceobjectoptionalDefinition of the profiles which can access content created from this schema.

Responses

StatusDescription
200 application/jsonSchema updated
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X PUT 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

DELETE /brickworks/v1/schemas/{SchemaIdentifier} — Delete schema

/api-reference/brickworks#tag/Brickworks:-Schemas/operation/deleteSchema

Delete a schema.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_SCHEMAS_DELETE

User role permission required: assets_brickworks: delete

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)

Responses

StatusDescription
204Schema deleted
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X DELETE 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

Brickworks: Records

GET /brickworks/v1/schemas/{SchemaIdentifier}/records — Get records from schema

/api-reference/brickworks#tag/Brickworks:-Records/operation/getRecordsFromSchema

Retrieve records from a schema. You can paginate, sort, and refine the results. By default, the records are sorted by status (published > scheduled > draft > unpublished) and then by last update time.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_READ

User role permission required: assets_brickworks: read

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)
limitqueryintegeroptionalLimit of items per page
pagequeryintegeroptionalThe number of the page to retrieve
filtersquerystringoptional
searchquerystringoptionalA string to search for in the values of searchable fields.If filter is used, this parameter is ignored.
sortByquerystringoptionalYou can change the default sorting. The sorting direction is selected by adding asc or desc, for example sortBy=__createdAt:desc. System parameters are prefixed with __ to avoid name collisions with fields you add to the schema. You can sort by: __id __createdAt __updatedAt
idsquerystringoptionalComma-separated list of IDs (in UUID format) to filter results through
statusesqueryenum<"PUBLISHED", "DRAFT", "UNPUBLISHED", "SCHEDULED">optionalComma-separated list of record statuses to filter the results.
slugsquerystringoptionalComma-separated list of slugs to filter results through
fieldsqueryarray<string>optionalA comma-separated list of fields to retrieve. If not defined, all fields are included in the response.

Responses

StatusDescription
200 application/jsonA page of records
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X GET 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}/records' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

POST /brickworks/v1/schemas/{SchemaIdentifier}/records — Add record to schema

/api-reference/brickworks#tag/Brickworks:-Records/operation/addRecordToSchema

Add a record to a schema


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_CREATE

User role permission required: assets_brickworks: create

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)

Request body

application/json · brickworks-service-AddRecordToSchemaRequest

Add record to schema

FieldTypeRequiredDescription
slugstringoptionalUnique (within a schema) identifier of a record. Can't be a UUID. In singleton-type schemas, use the schema's appId or id in place of record identifiers for generating content.
valuesobjectrequiredValues included in the record. Each key is the name of a field. The value must match the configuration of the field in the schema. Default values aren't explicitly saved in the record or shown in GET requests which retrieve the record, but are returned when an object is generated from the record. Supported value types: Float (number) Integer String Boolean Date (string, format: date) Date-time (string, format: date-time) Profile attribute (object with attributeName) Typed array UUID (string, format: uuid) Jinjava (string) Catalog (object with itemKey, id) Object (free-form) External source (empty object) One-to-one reference (string - record ID) One-to-many reference (array of record IDs) Analysis (string, format: uuid) Promotion (string - promotion ID) File/Image (string - file ID) Recommendation (object with id, params) Voucher (object with id) Untyped JSON (object) Untyped array
statusenum<"DRAFT", "SCHEDULED", "PUBLISHED", "UNPUBLISHED">requiredStatus of the record. When generating an object from a record, the last published version is used. In simple schemas, a record can only be published. Updates overwrite the record without changing the version number. In versioned schemas: A published record can't be edited directly. You need to send an update which changes to the draft status (this increases the version number, and the existing published version isn't modified), and then publish again. An unpublished record can't be published immediately. It must receive the draft status first. When unpublishing a record, you can't edit any data in the record.
actionOnScheduleenum<"PUBLISH">optional
scheduleobjectoptionalTime when the record is published - for example, every Monday, from 12:00 to 14:00
namestringoptionalThe name of the record. If not defined and there are no fields with useAsRecordName = true, GET requests return Unnamed.

Responses

StatusDescription
200 application/jsonRecord data
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X POST 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}/records' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

GET /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier} — Get record

/api-reference/brickworks#tag/Brickworks:-Records/operation/getRecord

Retrieve a record. You can select the fields that you want to include in the response.

If the record has multiple versions in different publishing states, the first available version is returned according to publishing status priority:

  • PUBLISHED
  • DRAFT
  • SCHEDULED
  • UNPUBLISHED You can use the statuses parameter to limit the lookup.

API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_READ

User role permission required: assets_brickworks: read

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)
RecordIdentifierpathrequiredRecord identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters)
fieldsqueryarray<string>optionalA comma-separated list of fields to retrieve. If not defined, all fields are included in the response.
statusesqueryenum<"PUBLISHED", "DRAFT", "UNPUBLISHED", "SCHEDULED">optionalComma-separated list of record statuses to filter the results.

Responses

StatusDescription
200 application/jsonDetails of the record
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X GET 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

PUT /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier} — Update record

/api-reference/brickworks#tag/Brickworks:-Records/operation/updateRecord

Update a record.

In a versioned schema, you can't directly edit a published record. To make changes, update the status to DRAFT (you can include the other changes that you want to make). This creates a new version of the record (without modifying the currently published version), which you can edit and publish.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_UPDATE

User role permission required: assets_brickworks: update

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)
RecordIdentifierpathrequiredRecord identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters)

Request body

application/json · brickworks-service-UpdateRecordRequest

FieldTypeRequiredDescription
statusenum<"DRAFT", "SCHEDULED", "PUBLISHED", "UNPUBLISHED">optionalStatus of the record. When generating an object from a record, the last published version is used. In simple schemas, a record can only be published. Updates overwrite the record without changing the version number. In versioned schemas: A published record can't be edited directly. You need to send an update which changes to the draft status (this increases the version number, and the existing published version isn't modified), and then publish again. An unpublished record can't be published immediately. It must receive the draft status first. When unpublishing a record, you can't edit any data in the record.
valuesobjectoptionalValues included in the record. Each key is the name of a field. The value must match the configuration of the field in the schema. Default values aren't explicitly saved in the record or shown in GET requests which retrieve the record, but are returned when an object is generated from the record. Supported value types: Float (number) Integer String Boolean Date (string, format: date) Date-time (string, format: date-time) Profile attribute (object with attributeName) Typed array UUID (string, format: uuid) Jinjava (string) Catalog (object with itemKey, id) Object (free-form) External source (empty object) One-to-one reference (string - record ID) One-to-many reference (array of record IDs) Analysis (string, format: uuid) Promotion (string - promotion ID) File/Image (string - file ID) Recommendation (object with id, params) Voucher (object with id) Untyped JSON (object) Untyped array
actionOnScheduleenum<"PUBLISH">optional
scheduleobjectoptionalTime when the record is published - for example, every Monday, from 12:00 to 14:00
slugstringoptionalUnique (within a schema) identifier of a record. Can't be a UUID. In singleton-type schemas, use the schema's appId or id in place of record identifiers for generating content.
lastUpdatedAtstringoptionalIf updating a draft keeping the draft status, you can check if it was updated by another request in the meantime: Fetch a draft record. Copy the updatedAt property into your update request. Make other changes in the record. Send the update. If the update time you sent is different than the one in the database, it means that the record was updated since you last fetched it. Your update is ignored and error BKW-029 (HTTP 409) is returned.
namestringoptionalThe name of the record. If not defined and there are no fields with useAsRecordName = true, GET requests return Unnamed.
fromStateenum<"DRAFT", "SCHEDULED", "PUBLISHED", "UNPUBLISHED">optionalStatus of the record. When generating an object from a record, the last published version is used. In simple schemas, a record can only be published. Updates overwrite the record without changing the version number. In versioned schemas: A published record can't be edited directly. You need to send an update which changes to the draft status (this increases the version number, and the existing published version isn't modified), and then publish again. An unpublished record can't be published immediately. It must receive the draft status first. When unpublishing a record, you can't edit any data in the record.

Responses

StatusDescription
200 application/jsonDetails of the updated record
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X PUT 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

DELETE /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier} — Delete record

/api-reference/brickworks#tag/Brickworks:-Records/operation/deleteRecord

Delete a record permanently. If you want to unpublish a record instead, send an update request to change the status to UNPUBLISHED


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_DELETE

User role permission required: assets_brickworks: delete

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)
RecordIdentifierpathrequiredRecord identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters)

Responses

StatusDescription
204Record deleted
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X DELETE 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

POST /brickworks/v1/schemas/records/preview/by/{IdentifierType} — Preview object (as workspace)

/api-reference/brickworks#tag/Brickworks:-Records/operation/previewObject

Preview an object by sending field values.

When generating a preview, fields are only generated when you send their value or they have a default value. Values saved in the record are not used in the preview.

Some data is cached:

  • profile data (even if the profile is updated)
  • responses from external sources
    For details, see the User Guide.

API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_READ

User role permission required: assets_brickworks: read

Parameters

NameInTypeRequiredDescription
IdentifierTypepathenum<"id", "uuid", "email", "custom_identify">requiredProfile identifier type

Request body

application/json · brickworks-service-PreviewRequest

FieldTypeRequiredDescription
identifierValuestringrequiredValue of the profile identifier selected in identifierType (profile ID is sent as a string)
contextobjectoptionalAdditional context parameters. You can use these parameters in Jinjava fields by calling {{ context.keyName }}. The value will be printed as a string.
fieldContextobjectoptionalAdditional context parameters used in recommendation and relation fields.
valuesobjectoptionalThe values for fields in the record, to be used when generating the preview.
schemaobjectrequiredSchema preview data

Responses

StatusDescription
200 application/jsonGenerated JSON
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl --request POST \
  --url https://api.synerise.com/brickworks/v1/schemas/records/preview/by/%7BIdentifierType%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"identifierValue":"string","context":{"property1":null,"property2":null},"fieldContext":{"property1":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"},"property2":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"}},"values":{"property1":null,"property2":null},"schema":{"fields":{"type":"object","properties":{"property1":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false},"property2":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false}},"required":["string"],"allOf":[{"if":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"then":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"else":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}}}],"additionalProperties":true},"audience":{"targetType":"SEGMENT","segments":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":"{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}"},"schemaType":"SIMPLE"}}'

POST /brickworks/v1/schemas/records/preview — Preview object (as any consumer)

/api-reference/brickworks#tag/Brickworks:-Records/operation/previewObjectByProfile

Preview an object by sending field values.

When generating a preview, fields are only generated when you send their value or they have a default value. Values saved in the record are not used in the preview.

Some data is cached:

  • profile data (even if the profile is updated)
  • responses from external sources
    For details, see the User Guide.

API consumers: Synerise User, Workspace (Business Profile), Profile (Client), Anonymous Profile

API key permission required: BRICKWORKS_RECORDS_READ

User role permission required: assets_brickworks: read

Request body

application/json · brickworks-service-PreviewRequestWithoutIdentifier

FieldTypeRequiredDescription
contextobjectoptionalAdditional context parameters. You can use these parameters in Jinjava fields by calling {{ context.keyName }}. The value will be printed as a string.
fieldContextobjectoptionalAdditional context parameters used in recommendation and relation fields.
valuesobjectoptionalThe values for fields in the record, to be used when generating the preview.
schemaobjectrequiredSchema preview data

Responses

StatusDescription
200 application/jsonGenerated JSON
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl --request POST \
  --url https://api.synerise.com/brickworks/v1/schemas/records/preview \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"context":{"property1":null,"property2":null},"fieldContext":{"property1":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"},"property2":{"page":1,"limit":10,"itemId":"item-123","additionalFilters":"custom filter value"}},"values":{"property1":null,"property2":null},"schema":{"fields":{"type":"object","properties":{"property1":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false},"property2":{"type":"number","subtype":"number","minimum":0.1,"maximum":0.1,"unique":true,"searchable":true,"default":0,"isConstantField":false}},"required":["string"],"allOf":[{"if":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"then":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}},"else":{"required":["string"],"properties":{"property1":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}},"property2":{"minItems":0,"maxItems":0,"uniqueItems":true,"minimum":0,"maximum":0,"pattern":"string","const":null,"enum":["string"],"not":{}}}}}],"additionalProperties":true},"audience":{"targetType":"SEGMENT","segments":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"query":"{\\\"analysis\\\":{\\\"title\\\":\\\"notempty\\\",\\\"segments\\\":[{\\\"title\\\":\\\"notempty\\\",\\\"filter\\\":{\\\"matching\\\":true,\\\"expressions\\\":[{\\\"type\\\":\\\"ATTRIBUTE\\\",\\\"attribute\\\":{\\\"expressions\\\":[{\\\"constraint\\\":{\\\"type\\\":\\\"BOOL\\\",\\\"logic\\\":\\\"IS_TRUE\\\"},\\\"attribute\\\":{\\\"type\\\":\\\"PARAM\\\",\\\"param\\\":\\\"exampleBool\\\"}}]}}]}}]}}"},"schemaType":"SIMPLE"}}'

POST /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/duplicate — Duplicate record

/api-reference/brickworks#tag/Brickworks:-Records/operation/duplicateRecordBySchemaAppIdAndRecordId

Create a copy of a record. The name of the copy is {recordName} - copy


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_CREATE

User role permission required: assets_brickworks: create

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)
RecordIdentifierpathrequiredRecord identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters)

Responses

StatusDescription
200 application/jsonData of the created record
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X POST 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/duplicate' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

POST /brickworks/v1/async/schemas/{SchemaIdentifier}/records — Batch create or update records (async)

/api-reference/brickworks#tag/Brickworks:-Records/operation/createOrUpdateRecordBatchAsync

This endpoint can only be used for simple schemas.

  • If a record included in this request already exists, it's entirely overwritten by the content from the request (including the slug - if the slug isn't sent, it's removed).
  • Provide the current identifier value (if your request changes the identifier, provide the one from before the change).
  • The record must conform with the schema.

Asynchronous requests are processed according to the time they reach the service.
This means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.

In some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_CREATE

User role permission required: assets_brickworks: create

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)

Request body

application/json · array<brickworks-service-AsyncRecordRequest>

Record data

Responses

StatusDescription
201Operation added to queue
207 application/jsonSome operations failed
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X POST 'https://api.synerise.com/brickworks/v1/async/schemas/{SchemaIdentifier}/records' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

PATCH /brickworks/v1/async/schemas/{SchemaIdentifier}/records — Batch create or partially update record (async)

/api-reference/brickworks#tag/Brickworks:-Records/operation/createOrPartialUpdateRecordBatchAsync

This endpoint can only be used for simple schemas.

Asynchronous requests are processed according to the time they reach the service.
This means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.

In some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_CREATE

User role permission required: assets_brickworks: create

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)

Request body

application/json · array<brickworks-service-AsyncRecordRequest>

Record data

Responses

StatusDescription
201Operation added to queue
207 application/jsonSome operations failed
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X PATCH 'https://api.synerise.com/brickworks/v1/async/schemas/{SchemaIdentifier}/records' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

POST /brickworks/v1/async/schemas/{SchemaIdentifier}/record — Create or update record (async)

/api-reference/brickworks#tag/Brickworks:-Records/operation/createOrUpdateRecordSingleAsync

This endpoint can only be used for simple schemas.

  • If a record included in this request already exists, it's entirely overwritten by the content from the request (including the slug - if the slug isn't sent, it's removed).
  • Provide the current identifier value (if your request changes the identifier, provide the one from before the change).
  • The record must conform with the schema.

Asynchronous requests are processed according to the time they reach the service.
This means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.

In some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_CREATE

User role permission required: assets_brickworks: create

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)

Request body

application/json · brickworks-service-AsyncRecordRequest

Record data

FieldTypeRequiredDescription
identifierobjectrequiredDefinition of a unique identifier of a record
valuesobjectrequiredValues included in the record. Each key is the name of a field. The value must match the configuration of the field in the schema. Default values aren't explicitly saved in the record or shown in GET requests which retrieve the record, but are returned when an object is generated from the record. Supported value types: Float (number) Integer String Boolean Date (string, format: date) Date-time (string, format: date-time) Profile attribute (object with attributeName) Typed array UUID (string, format: uuid) Jinjava (string) Catalog (object with itemKey, id) Object (free-form) External source (empty object) One-to-one reference (string - record ID) One-to-many reference (array of record IDs) Analysis (string, format: uuid) Promotion (string - promotion ID) File/Image (string - file ID) Recommendation (object with id, params) Voucher (object with id) Untyped JSON (object) Untyped array
slugstringoptionalUnique (within a schema) identifier of a record. Can't be a UUID. In singleton-type schemas, use the schema's appId or id in place of record identifiers for generating content.
namestringoptionalThe name of the record. If not defined and there are no fields with useAsRecordName = true, GET requests return Unnamed.

Responses

StatusDescription
201Operation added to queue
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X POST 'https://api.synerise.com/brickworks/v1/async/schemas/{SchemaIdentifier}/record' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

PATCH /brickworks/v1/async/schemas/{SchemaIdentifier}/record — Create or partially update record (async)

/api-reference/brickworks#tag/Brickworks:-Records/operation/createOrPartialUpdateRecordSingleAsync

This endpoint can only be used for simple schemas.

  • You can use this endpoint to update a record by sending only the fields which you want to change. Other fields are not affected.
  • This endpoint doesn't validate the data against field-specific settings, such as limits on character count or regex in a string field.

Asynchronous requests are processed according to the time they reach the service.
This means that requests to synchronous endpoints may overwrite asynchronous operations which were sent earlier and queued due to high traffic.

In some edge cases, changing a record may fail further in the backend, even when this endpoint returns no errors. In such cases, contact Support.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_CREATE

User role permission required: assets_brickworks: create

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)

Request body

application/json · brickworks-service-AsyncRecordRequest

Record data

FieldTypeRequiredDescription
identifierobjectrequiredDefinition of a unique identifier of a record
valuesobjectrequiredValues included in the record. Each key is the name of a field. The value must match the configuration of the field in the schema. Default values aren't explicitly saved in the record or shown in GET requests which retrieve the record, but are returned when an object is generated from the record. Supported value types: Float (number) Integer String Boolean Date (string, format: date) Date-time (string, format: date-time) Profile attribute (object with attributeName) Typed array UUID (string, format: uuid) Jinjava (string) Catalog (object with itemKey, id) Object (free-form) External source (empty object) One-to-one reference (string - record ID) One-to-many reference (array of record IDs) Analysis (string, format: uuid) Promotion (string - promotion ID) File/Image (string - file ID) Recommendation (object with id, params) Voucher (object with id) Untyped JSON (object) Untyped array
slugstringoptionalUnique (within a schema) identifier of a record. Can't be a UUID. In singleton-type schemas, use the schema's appId or id in place of record identifiers for generating content.
namestringoptionalThe name of the record. If not defined and there are no fields with useAsRecordName = true, GET requests return Unnamed.

Responses

StatusDescription
201Operation added to queue
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X PATCH 'https://api.synerise.com/brickworks/v1/async/schemas/{SchemaIdentifier}/record' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

Brickworks: Content generation

POST /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/generate/by/{IdentifierType} — Generate object from a record (as workspace)

/api-reference/brickworks#tag/Brickworks:-Content-generation/operation/generateObjectForProfile

Generate content from the latest published version of a record by processing Jinjava inserts and requests to external sources. Profile data (if needed, for example for Jinjava) is retrieved automatically from the profile declared in the request.

The system looks for values to generate in the following order:

  1. Values in the fieldContext object (used by recommendations and relations).
  2. Values saved in the record.
  3. Values from the default object in the schema.
    This is available for all field types.
  4. Default values nested in the properties of a field in the schema.
    This is available for some complex field types.

The content is always generated according to the latest version of a schema:

  • If fields were deleted from the schema, but they still exist in the record, they are ignored.
  • If fields were added to the schema and they don't exist in the record, their default values are added. If there are no default values, the fields are ignored.

Some data is cached:

  • profile data (even if the profile is updated)
  • responses from external sources
    For details, see the User Guide.

API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_READ

User role permission required: assets_brickworks: read

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)
RecordIdentifierpathrequiredRecord identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters)
IdentifierTypepathenum<"id", "uuid", "email", "custom_identify">requiredProfile identifier type

Request body

application/json · brickworks-service-GenerateRequest

Object generation request

FieldTypeRequiredDescription
identifierValuestringrequiredValue of the profile identifier selected in identifierType (profile ID is sent as a string)
contextobjectoptionalAdditional context parameters. You can use these parameters in Jinjava fields by calling {{ context.keyName }}. The value will be printed as a string.
fieldContextobjectoptionalAdditional context parameters used in recommendation and relation fields.

Responses

StatusDescription
200 application/jsonProcessed content of a record
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X POST 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/generate/by/{IdentifierType}' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

POST /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/generate — Generate object from a record (as any consumer)

/api-reference/brickworks#tag/Brickworks:-Content-generation/operation/generateObject

Generate content from the latest published version of a record by processing Jinjava inserts and requests to external sources.
If the request is authorized by a profile, the profile data is automatically retrieve for fields which need it (for example, in Jinjava inserts).

The system looks for values to generate in the following order:

  1. Values in the fieldContext object (used by recommendations and relations).
  2. Values saved in the record.
  3. Values from the default object in the schema.
    This is available for all field types.
  4. Default values nested in the properties of a field in the schema.
    This is available for some complex field types.

The content is always generated according to the latest version of a schema:

  • If fields were deleted from the schema, but they still exist in the record, they are ignored.
  • If fields were added to the schema and they don't exist in the record, their default values are added. If there are no default values, the fields are ignored.

Some data is cached:

  • profile data (even if the profile is updated)
  • responses from external sources
    For details, see the User Guide.

API consumers: Profile (Client), Anonymous Profile, Workspace (Business Profile), Synerise User

API key permission required: BRICKWORKS_RECORDS_READ

User role permission required: assets_brickworks: read

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)
RecordIdentifierpathrequiredRecord identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters)

Request body

application/json · brickworks-service-GenerateRequestWithoutIdentifier

Object generation request

FieldTypeRequiredDescription
contextobjectoptionalAdditional context parameters. You can use these parameters in Jinjava fields by calling {{ context.keyName }}. The value will be printed as a string.
fieldContextobjectoptionalAdditional context parameters used in recommendation and relation fields.

Responses

StatusDescription
200 application/jsonProcessed content of a record
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X POST 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/generate' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

Brickworks: External sources

GET /brickworks/v1/external-sources — List external sources

/api-reference/brickworks#tag/Brickworks:-External-sources/operation/listExternalSource

Retrieve a list of external data sources. You can sort and paginate the results.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_EXTERNALSOURCES_READ

User role permission required: assets_brickworks: read

Parameters

NameInTypeRequiredDescription
limitqueryintegeroptionalLimit of items per page
pagequeryintegeroptionalThe number of the page to retrieve
searchquerystringoptionalA string to search for in: id appId displayName description
sortByquerystringoptionalYou can sort by: createdAt updatedAt name
methodqueryenum<"get", "post">optionalYou can filter the results by source http method.

Responses

StatusDescription
200 application/jsonA page of external data sources
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl --request GET \
  --url 'https://api.synerise.com/brickworks/v1/external-sources?limit=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE&search=SOME_STRING_VALUE&sortBy=createdAt%3Aasc%7Cdesc&method=SOME_STRING_VALUE' \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

POST /brickworks/v1/external-sources — Create external source

/api-reference/brickworks#tag/Brickworks:-External-sources/operation/createExternalSource

Create an external data source definition. External sources can be used as a special schema field to retrieve data from a given URL when generating an object from a record.

Before starting, make sure you have a connection which you can use in the external source definition.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_EXTERNALSOURCES_CREATE

User role permission required: assets_brickworks: create

Request body

application/json · brickworks-service-CreateExternalSourceRequest

External data source definition

FieldTypeRequiredDescription
namestringrequired
descriptionstringoptionalDescription of the external source
propertiesobjectrequiredThe details of the external source configuration
ttlnumberoptionalCache TTL for connection response, in seconds

Responses

StatusDescription
200 application/jsonExternal Data Source created
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl --request POST \
  --url https://api.synerise.com/brickworks/v1/external-sources \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"name":"string","description":"string","properties":{"sourceType":"http_source","url":"https://example.com/clients/{% customer email %}","method":"post","headers":{"property1":"string","property2":"string"},"params":{"property1":"string","property2":"string"},"authType":"basic","authId":"25d4321e-f980-49d3-983b-4275c49dc2c4","body":{"someString":"string","someObject":{"key":"{% customer email %}"},"dynamicField":"{% customer id %}"},"bodySchema":{"type":"object","subtype":"key_value","properties":{"someObject":{"type":"object","subtype":"key_value","properties":{"key":{"type":"string","subtype":"jinjava"}},"additionalProperties":true},"dynamicField":{"type":"string","subtype":"jinjava"}},"additionalProperties":true}},"ttl":0}'

GET /brickworks/v1/external-sources/{ExternalDataSourceId} — Get External Source

/api-reference/brickworks#tag/Brickworks:-External-sources/operation/getExternalSourceById

Retrieve the details of an external data source.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_EXTERNALSOURCES_READ

User role permission required: assets_brickworks: read

Parameters

NameInTypeRequiredDescription
ExternalDataSourceIdpathstringrequiredExternal source ID

Responses

StatusDescription
200 application/jsonDetails of the external source
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl --request GET \
  --url https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

PUT /brickworks/v1/external-sources/{ExternalDataSourceId} — Update External Source

/api-reference/brickworks#tag/Brickworks:-External-sources/operation/updateExternalSource

Update an external data source definition.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_EXTERNALSOURCES_UPDATE

User role permission required: assets_brickworks: update

Parameters

NameInTypeRequiredDescription
ExternalDataSourceIdpathstringrequiredExternal source ID

Request body

application/json · brickworks-service-UpdateExternalSourceRequest

FieldTypeRequiredDescription
namestringoptionalHuman-readable name of the external resource
descriptionstringoptionalDescription of the external source
propertiesobjectoptionalThe details of the external source configuration
ttlnumberoptional

Responses

StatusDescription
200 application/jsonExternal Source updated
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl --request PUT \
  --url https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"name":"string","description":"string","properties":{"sourceType":"http_source","url":"https://example.com/clients/{% customer email %}","method":"post","headers":{"property1":"string","property2":"string"},"params":{"property1":"string","property2":"string"},"authType":"basic","authId":"25d4321e-f980-49d3-983b-4275c49dc2c4","body":{"someString":"string","someObject":{"key":"{% customer email %}"},"dynamicField":"{% customer id %}"},"bodySchema":{"type":"object","subtype":"key_value","properties":{"someObject":{"type":"object","subtype":"key_value","properties":{"key":{"type":"string","subtype":"jinjava"}},"additionalProperties":true},"dynamicField":{"type":"string","subtype":"jinjava"}},"additionalProperties":true}},"ttl":0}'

DELETE /brickworks/v1/external-sources/{ExternalDataSourceId} — Delete external source

/api-reference/brickworks#tag/Brickworks:-External-sources/operation/deleteExternalSource

Permanently delete an external data source definition.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_EXTERNALSOURCES_DELETE

User role permission required: assets_brickworks: delete

Parameters

NameInTypeRequiredDescription
ExternalDataSourceIdpathstringrequiredExternal source ID

Responses

StatusDescription
204No content
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl --request DELETE \
  --url https://api.synerise.com/brickworks/v1/external-sources/%7BExternalDataSourceId%7D \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Brickworks: Record versions

GET /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/versions — Get record versions

/api-reference/brickworks#tag/Brickworks:-Record-versions/operation/getRecordVersions

Retrieve all versions of a record. You can paginate, sort, and refine the results. By default, the versions are sorted from newest to oldest.


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_READ

User role permission required: assets_brickworks: read

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)
RecordIdentifierpathrequiredRecord identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters)
limitqueryintegeroptionalLimit of items per page
pagequeryintegeroptionalThe number of the page to retrieve
filtersquerystringoptional
sortByquerystringoptionalYou can change the default sorting. The sorting direction is selected by adding asc or desc, for example sortBy=createdAt:desc. You can sort by: appId displayName createdAt updatedAt
statusesqueryenum<"PUBLISHED", "DRAFT", "UNPUBLISHED", "SCHEDULED">optionalComma-separated list of record statuses to filter the results.

Responses

StatusDescription
200 application/jsonA page of record versions
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X GET 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/versions' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

GET /brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/versions/{RecordVersionIdentifier} — Get record version

/api-reference/brickworks#tag/Brickworks:-Record-versions/operation/getRecordVersion

Retrieve the details of a record version. The version can be identified by either a UUID (RecordVersionId) or a version number (integer).


API consumers: Synerise User, Workspace (Business Profile)

API key permission required: BRICKWORKS_RECORDS_READ

User role permission required: assets_brickworks: read

Parameters

NameInTypeRequiredDescription
SchemaIdentifierpathrequiredSchema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters)
RecordIdentifierpathrequiredRecord identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters)
RecordVersionIdentifierpathrequiredRecord version identifier - can be a UUID (RecordVersionId) or a version number (integer)

Responses

StatusDescription
200 application/jsonRecord version object
400 application/jsonIncorrect request (malformed JSON, wrong parameters, etc.). See error message for details.
401 application/jsonUnauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details.
403 application/jsonForbidden; insufficient permissions. See error message for details.
404 application/jsonResource not found. See error message for details.
409 application/jsonThe request could not be completed due to a conflict with the current state of the resource. See error message for details.
422 application/jsonThe request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details.
500 application/jsonSee error message for details.

Example request (cURL)

curl -X GET 'https://api.synerise.com/brickworks/v1/schemas/{SchemaIdentifier}/records/{RecordIdentifier}/versions/{RecordVersionIdentifier}' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json'

Back to all API categories