entering user data via curl api

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • badrul
    Junior Member
    • May 2025
    • 1

    #1

    entering user data via curl api

    i am not abe to write to espocrm system , programmaticaly using the following , what am i doing worng
    # Create user

    curl -s -X POST https://crm.xxxx.com/api/v1/User \

    -H "Authorization: Bearer $TOKEN" \

    -H "Content-Type: application/json" \

    -d "{

    "userName": "$USERNAME",

    "firstName": "Test",

    "lastName": "User",

    "type": "Regular",

    "isActive": true,

    "password": "${USERNAME}!xx",

    "emailAddress": "$EMAIL",

    "roleIdList": ["64eaef19db2a72315"],

    "groupIdList": ["60a3df234cd5d3129"],

    "forcePasswordChange": true

    }"

    my webpage comes up beautiful though, just that i have 20 plus staff members to onboard to sale-marketing team, and i dont want to do it manually
    the TOKEN value is from the API User under administration
Working...