Create Devise user via JSON call Create Devise user via JSON call json json

Create Devise user via JSON call


You should disable CSRF protection and enable JSON response type:

class RegistrationsController < Devise::RegistrationsController  skip_before_action :verify_authenticity_token  respond_to :jsonend  

then just call POST request with parameters and format suffix (.json)

curl -X POST \  --form "user[email]=user111@example.com" \  --form "user[password]=password" \  --form "user[password_confirmation]=password" \  'http://localhost:3000/users.json'