Endpoint: POST /v1/users
This endpoint allows you to create a new user by providing necessary user details such as user_id
, email
, first_name
, last_name
, and additional metadata. You will need an API key for authentication.
Parameters
Unique identifier for the user.
Email address of the user.
Additional metadata related to the user.
curl -X POST https://agent.api.lyzr.app/v1/users/ \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"user_id": "123",
"email": "abc@example.com",
"first_name": "abc",
"last_name": "abc",
"metadata": {}
}'
import requests
url = "https://agent.api.lyzr.app/v1/users/"
headers = {
"x-api-key": "your_api_key_here",
"Content-Type": "application/json"
}
data = {
"user_id": "123",
"email": "abc@example.com",
"first_name": "abc",
"last_name": "abc",
"metadata": {}
}
response = requests.post(url, headers=headers, json=data)
{
"user_id": {
"user_id": "66e29773a64b2xxxxxx"
}
}
Response Parameters
Object containing the created user’s ID.