Create actors schema
You can create users schema using the endpoint POST /actors/schema
.
Authentication
The following header is required for all API calls:
X-Manufactory-Auth
- Manufactory access token
Required keys
org_id
(required) string - Manufactory org ID.project_id
(required) number - The project ID associated with this schema.attributes
(required) object - Pairs containing attribute name and the corresponding data type. A complete list of valid data types .unique_id
(required) string - The attribute that will be used as a unique ID for a actors profile to differentiate user profiles.
Request example
{
"org_id": "xyz",
"unique_id": "email",
"project_id": 12345,
"attributes":{
"City": "TEXT",
"Country": "TEXT",
"Email": "TEXT",
"Username": "TEXT"
}
}
Response example
{
"message": "Actors schema created successfully"
}
Related articles
Actors > Get actors schema
The endpoint retrieves the actors schema for a specific project, including attributes like city, country, email, and username.
Events > Create events schema
The API endpoint creates an events schema by specifying the required attributes and their corresponding data types for a given project in a Manufactory organization.
Collecting Events via Websocket > Authentication
Authentication is required to send data to Manufactory via a web socket, which can be done using the POST /auth endpoint with the project key, org ID, project ID, and actor profile details in the request header and body.
Events > Get events schema
The events schema of a specific project can be fetched using the provided API endpoint, which requires authentication and returns the schema attributes in JSON format.