POST
/
partner
/
schema-definitions
Create Schema
curl --request POST \
  --url https://api.embedreach.com/partner/schema-definitions \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "plural_name": "<string>",
  "pluralName": "<string>",
  "description": "<string>",
  "category": "contacts_schema",
  "external_id_field": "<string>",
  "externalIdField": "<string>",
  "schema": {},
  "fieldsToExpose": [
    {
      "name": "<string>",
      "description": "<string>",
      "jsonPath": "<string>",
      "exposure": [
        "segments"
      ]
    }
  ],
  "exposeNameJsonPath": "<string>"
}'
{
  "success": true,
  "message": "<string>",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "plural_name": "<string>",
    "pluralName": "<string>",
    "description": "<string>",
    "category": "contacts_schema",
    "version_number": 123,
    "versionNumber": 123,
    "partner_db_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "partnerDbId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "partner_db_query": "<string>",
    "partnerDbQuery": "<string>",
    "reference_schemas": [
      "<string>"
    ],
    "referenceSchemas": [
      "<string>"
    ],
    "schema": {},
    "external_id_field": "<string>",
    "externalIdField": "<string>",
    "deactivated_at": "<string>",
    "deactivatedAt": "<string>",
    "created_at": "<string>",
    "createdAt": "<string>",
    "updated_at": "<string>",
    "updatedAt": "<string>",
    "fieldsToExpose": [
      {
        "name": "<string>",
        "description": "<string>",
        "jsonPath": "<string>",
        "exposure": [
          "segments"
        ]
      }
    ],
    "exposeNameJsonPath": "<string>"
  }
}

Body

application/json
name
string
required

The name of the schema, can be used in API calls to refer to this schema. Cannot be changed once the schema is created

Minimum length: 1
description
string
required

The description of the schema

Minimum length: 1
category
enum<string>
required

The category of the schema. Cannot be changed once the schema is created. options: contacts_schema, transactions_schema, custom_schema, combined_schema, locations_schema, customer_fields

Available options:
contacts_schema,
transactions_schema,
custom_schema,
combined_schema,
locations_schema,
customer_fields
schema
object
required

The JSONSchema schema definition for the resource

plural_name
string

[Deprecated] Please use pluralName instead. The plural name of the schema, can be used in API calls to refer to this schema. Cannot be changed once the schema is created

Minimum length: 1
pluralName
string

The plural name of the schema, can be used in API calls to refer to this schema. Cannot be changed once the schema is created

Minimum length: 1
external_id_field
string

[Deprecated] Please use externalIdField instead. The field in the schema that is used as the unique ID in the partner system. Cannot be changed once the schema is created

Minimum length: 1
externalIdField
string

The field in the schema that is used as the unique ID in the partner system. Cannot be changed once the schema is created

Minimum length: 1
fieldsToExpose
object[]

The fields to expose on the segment builder or merge fields.

exposeNameJsonPath
string

The JSON path to the field in the schema that will be used to expose the resource to the user. If not provided, the resource will not be exposed to the user.

Response

Status 201 response

success
boolean
required
message
string
data
object