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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | optional | Limit of items per page |
page | query | integer | optional | The number of the page to retrieve |
search | query | string | optional | A string to search for in:
id
appId
displayName
description
|
sortBy | query | string | optional | You 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
|
schemaTypes | query | enum<"SIMPLE", "VERSIONED"> | optional | Comma-separated list of schema types to filter the results. By default, all types are retrieved. |
Responses
| Status | Description |
|---|---|
200 application/json | Schema objects |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Field | Type | Required | Description |
|---|---|---|---|
appId | string | required | App 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. |
displayName | string | required | Schema name shown to users in the Synerise Portal |
description | string | optional | Schema description |
fields | object | optional | The content of the schema. |
displayConfiguration | object | optional | The layout details of the schema |
audience | object | optional | Definition of the profiles which can access content created from this schema. |
schemaType | enum<"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
| Status | Description |
|---|---|
200 application/json | Details of the created schema |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters) |
Responses
| Status | Description |
|---|---|
200 application/json | Details of the schema |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema 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
| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | required | Schema name shown to users in the Synerise Portal |
description | string | optional | Schema description |
fields | object | optional | The content of the schema. |
displayConfiguration | object | optional | The layout details of the schema |
audience | object | optional | Definition of the profiles which can access content created from this schema. |
Responses
| Status | Description |
|---|---|
200 application/json | Schema updated |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters) |
Responses
| Status | Description |
|---|---|
204 | Schema deleted |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters) | |
limit | query | integer | optional | Limit of items per page |
page | query | integer | optional | The number of the page to retrieve |
filters | query | string | optional | |
search | query | string | optional | A string to search for in the values of searchable fields.If filter is used, this parameter is ignored.
|
sortBy | query | string | optional | You 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
|
ids | query | string | optional | Comma-separated list of IDs (in UUID format) to filter results through |
statuses | query | enum<"PUBLISHED", "DRAFT", "UNPUBLISHED", "SCHEDULED"> | optional | Comma-separated list of record statuses to filter the results. |
slugs | query | string | optional | Comma-separated list of slugs to filter results through |
fields | query | array<string> | optional | A comma-separated list of fields to retrieve. If not defined, all fields are included in the response. |
Responses
| Status | Description |
|---|---|
200 application/json | A page of records |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema 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
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | optional | Unique (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.
|
values | object | required | Values 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 |
status | enum<"DRAFT", "SCHEDULED", "PUBLISHED", "UNPUBLISHED"> | required | Status 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. |
actionOnSchedule | enum<"PUBLISH"> | optional | |
schedule | object | optional | Time when the record is published - for example, every Monday, from 12:00 to 14:00 |
name | string | optional | The name of the record. If not defined and there are no fields with useAsRecordName = true, GET requests return Unnamed.
|
Responses
| Status | Description |
|---|---|
200 application/json | Record data |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
statusesparameter 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters) | |
RecordIdentifier | path | required | Record identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters) | |
fields | query | array<string> | optional | A comma-separated list of fields to retrieve. If not defined, all fields are included in the response. |
statuses | query | enum<"PUBLISHED", "DRAFT", "UNPUBLISHED", "SCHEDULED"> | optional | Comma-separated list of record statuses to filter the results. |
Responses
| Status | Description |
|---|---|
200 application/json | Details of the record |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters) | |
RecordIdentifier | path | required | Record identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters) |
Request body
application/json · brickworks-service-UpdateRecordRequest
| Field | Type | Required | Description |
|---|---|---|---|
status | enum<"DRAFT", "SCHEDULED", "PUBLISHED", "UNPUBLISHED"> | optional | Status 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. |
values | object | optional | Values 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 |
actionOnSchedule | enum<"PUBLISH"> | optional | |
schedule | object | optional | Time when the record is published - for example, every Monday, from 12:00 to 14:00 |
slug | string | optional | Unique (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.
|
lastUpdatedAt | string | optional | If 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.
|
name | string | optional | The name of the record. If not defined and there are no fields with useAsRecordName = true, GET requests return Unnamed.
|
fromState | enum<"DRAFT", "SCHEDULED", "PUBLISHED", "UNPUBLISHED"> | optional | Status 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
| Status | Description |
|---|---|
200 application/json | Details of the updated record |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters) | |
RecordIdentifier | path | required | Record identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters) |
Responses
| Status | Description |
|---|---|
204 | Record deleted |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
IdentifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Profile identifier type |
Request body
application/json · brickworks-service-PreviewRequest
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the profile identifier selected in identifierType (profile ID is sent as a string)
|
context | object | optional | Additional context parameters. You can use these parameters in Jinjava fields by calling {{ context.keyName }}. The value will be printed as a string.
|
fieldContext | object | optional | Additional context parameters used in recommendation and relation fields. |
values | object | optional | The values for fields in the record, to be used when generating the preview. |
schema | object | required | Schema preview data |
Responses
| Status | Description |
|---|---|
200 application/json | Generated JSON |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Field | Type | Required | Description |
|---|---|---|---|
context | object | optional | Additional context parameters. You can use these parameters in Jinjava fields by calling {{ context.keyName }}. The value will be printed as a string.
|
fieldContext | object | optional | Additional context parameters used in recommendation and relation fields. |
values | object | optional | The values for fields in the record, to be used when generating the preview. |
schema | object | required | Schema preview data |
Responses
| Status | Description |
|---|---|
200 application/json | Generated JSON |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters) | |
RecordIdentifier | path | required | Record identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters) |
Responses
| Status | Description |
|---|---|
200 application/json | Data of the created record |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema 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
| Status | Description |
|---|---|
201 | Operation added to queue |
207 application/json | Some operations failed |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema 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
| Status | Description |
|---|---|
201 | Operation added to queue |
207 application/json | Some operations failed |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema 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
| Field | Type | Required | Description |
|---|---|---|---|
identifier | object | required | Definition of a unique identifier of a record |
values | object | required | Values 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 |
slug | string | optional | Unique (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.
|
name | string | optional | The name of the record. If not defined and there are no fields with useAsRecordName = true, GET requests return Unnamed.
|
Responses
| Status | Description |
|---|---|
201 | Operation added to queue |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema 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
| Field | Type | Required | Description |
|---|---|---|---|
identifier | object | required | Definition of a unique identifier of a record |
values | object | required | Values 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 |
slug | string | optional | Unique (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.
|
name | string | optional | The name of the record. If not defined and there are no fields with useAsRecordName = true, GET requests return Unnamed.
|
Responses
| Status | Description |
|---|---|
201 | Operation added to queue |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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:
- Values in the
fieldContextobject (used by recommendations and relations). - Values saved in the record.
- Values from the
defaultobject in the schema.
This is available for all field types. - Default values nested in the
propertiesof 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters) | |
RecordIdentifier | path | required | Record identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters) | |
IdentifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Profile identifier type |
Request body
application/json · brickworks-service-GenerateRequest
Object generation request
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the profile identifier selected in identifierType (profile ID is sent as a string)
|
context | object | optional | Additional context parameters. You can use these parameters in Jinjava fields by calling {{ context.keyName }}. The value will be printed as a string.
|
fieldContext | object | optional | Additional context parameters used in recommendation and relation fields. |
Responses
| Status | Description |
|---|---|
200 application/json | Processed content of a record |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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:
- Values in the
fieldContextobject (used by recommendations and relations). - Values saved in the record.
- Values from the
defaultobject in the schema.
This is available for all field types. - Default values nested in the
propertiesof 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters) | |
RecordIdentifier | path | required | Record 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
| Field | Type | Required | Description |
|---|---|---|---|
context | object | optional | Additional context parameters. You can use these parameters in Jinjava fields by calling {{ context.keyName }}. The value will be printed as a string.
|
fieldContext | object | optional | Additional context parameters used in recommendation and relation fields. |
Responses
| Status | Description |
|---|---|
200 application/json | Processed content of a record |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | optional | Limit of items per page |
page | query | integer | optional | The number of the page to retrieve |
search | query | string | optional | A string to search for in:
id
appId
displayName
description
|
sortBy | query | string | optional | You can sort by:
createdAt
updatedAt
name
|
method | query | enum<"get", "post"> | optional | You can filter the results by source http method. |
Responses
| Status | Description |
|---|---|
200 application/json | A page of external data sources |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required | |
description | string | optional | Description of the external source |
properties | object | required | The details of the external source configuration |
ttl | number | optional | Cache TTL for connection response, in seconds |
Responses
| Status | Description |
|---|---|
200 application/json | External Data Source created |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ExternalDataSourceId | path | string | required | External source ID |
Responses
| Status | Description |
|---|---|
200 application/json | Details of the external source |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ExternalDataSourceId | path | string | required | External source ID |
Request body
application/json · brickworks-service-UpdateExternalSourceRequest
| Field | Type | Required | Description |
|---|---|---|---|
name | string | optional | Human-readable name of the external resource |
description | string | optional | Description of the external source |
properties | object | optional | The details of the external source configuration |
ttl | number | optional |
Responses
| Status | Description |
|---|---|
200 application/json | External Source updated |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
ExternalDataSourceId | path | string | required | External source ID |
Responses
| Status | Description |
|---|---|
204 | No content |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters) | |
RecordIdentifier | path | required | Record identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters) | |
limit | query | integer | optional | Limit of items per page |
page | query | integer | optional | The number of the page to retrieve |
filters | query | string | optional | |
sortBy | query | string | optional | You 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
|
statuses | query | enum<"PUBLISHED", "DRAFT", "UNPUBLISHED", "SCHEDULED"> | optional | Comma-separated list of record statuses to filter the results. |
Responses
| Status | Description |
|---|---|
200 application/json | A page of record versions |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
SchemaIdentifier | path | required | Schema identifier - can be a UUID (SchemaId) or a human-readable string (Schema AppId/API name, 3-25 characters) | |
RecordIdentifier | path | required | Record identifier - can be a UUID (RecordId) or a human-readable slug (RecordSlug, 6-40 characters) | |
RecordVersionIdentifier | path | required | Record version identifier - can be a UUID (RecordVersionId) or a version number (integer) |
Responses
| Status | Description |
|---|---|
200 application/json | Record version object |
400 application/json | Incorrect request (malformed JSON, wrong parameters, etc.). See error message for details. |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. See error message for details. |
403 application/json | Forbidden; insufficient permissions. See error message for details. |
404 application/json | Resource not found. See error message for details. |
409 application/json | The request could not be completed due to a conflict with the current state of the resource. See error message for details. |
422 application/json | The request was well-formed but could not be processed due to semantic or domain-related constraints. See error message for details. |
500 application/json | See 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'