Create Subject
Parameters
email: Optional[str]
The email of the subject. Must be a valid email address.
formatemail
external_id: Optional[str]
The ID of the subject in your system. If provided, you may use pass it to the API in place of the subject ID. Must be unique.
metadata: Optional[Dict[str, str]]
Additional metadata about the subject. You may use this to store any custom data about the subject.
name: Optional[str]
The name of the subject. Used for display in the dashboard.
Returns
Create Subject
from lark import Lark
client = Lark(
api_key="My API Key",
)
subject = client.subjects.create(
email="john.doe@example.com",
external_id="user_1234567890",
metadata={},
name="John Doe",
)
print(subject.id)
{
"id": "subj_VyX6Q96h5avMho8O7QWlKeXE",
"created_at": "2025-11-01T00:00:00Z",
"email": "john.doe@example.com",
"external_id": "user_1234567890",
"metadata": {},
"name": "John Doe"
}Returns Examples
{
"id": "subj_VyX6Q96h5avMho8O7QWlKeXE",
"created_at": "2025-11-01T00:00:00Z",
"email": "john.doe@example.com",
"external_id": "user_1234567890",
"metadata": {},
"name": "John Doe"
}