---
updatedAt: 2026-04-23T05:40:30.000Z
---

# Creates a user action

Creates a user action for a user. Note: This endpoint cannot be used for creating actions related to donation pages or scheduled call pages.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "API V1",
    "version": "v1"
  },
  "paths": {
    "/user_actions": {
      "post": {
        "summary": "Creates a user action",
        "tags": [
          "User Actions"
        ],
        "description": "Creates a user action for a user. Note: This endpoint cannot be used for creating actions related to donation pages or scheduled call pages.",
        "parameters": [],
        "responses": {
          "201": {
            "description": "user action created"
          },
          "422": {
            "description": "unprocessable entity"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "page_id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Identifier for the Page, required for new user actions",
                    "nullable": false
                  },
                  "user_id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Identifier for the User",
                    "nullable": true
                  },
                  "created_at": {
                    "type": "integer",
                    "format": "int64",
                    "description": "UTC timestamp in seconds since the Unix epoch for the creation time of the user action",
                    "nullable": true
                  },
                  "agent_user_id": {
                    "type": "integer",
                    "format": "int64",
                    "nullable": true,
                    "description": "Identifier of the User in your organization who collected this submission on someone else's behalf (for example a field survey entered through another tool). Credited the same way as a survey submitted from the Solidarity app: stored in the submission data as assisted_by_agent_user_id, and set as the action's referred_by_user_id unless the agent is the acting user. Returns 422 when the id is not a person in your organization."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "phone_number": {
                        "type": "string",
                        "description": "User's phone number",
                        "nullable": true
                      },
                      "email": {
                        "type": "string",
                        "format": "email",
                        "description": "User's email address",
                        "nullable": true
                      },
                      "first_name": {
                        "type": "string",
                        "nullable": true
                      },
                      "last_name": {
                        "type": "string",
                        "nullable": true
                      },
                      "preferred_language": {
                        "type": "string",
                        "nullable": true
                      },
                      "second_language": {
                        "type": "string",
                        "nullable": true
                      },
                      "chapter_id": {
                        "type": "integer",
                        "nullable": true
                      },
                      "address": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "address1": {
                            "type": "string",
                            "nullable": true
                          },
                          "address2": {
                            "type": "string",
                            "nullable": true
                          },
                          "city": {
                            "type": "string",
                            "nullable": true
                          },
                          "state": {
                            "type": "string",
                            "nullable": true
                          },
                          "zip_code": {
                            "type": "string",
                            "nullable": true
                          },
                          "country": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      },
                      "assessment": {
                        "type": "string",
                        "nullable": true,
                        "description": "Assessment status key to set on the user (maps to classification)"
                      },
                      "sms_permission": {
                        "type": "boolean",
                        "nullable": true
                      },
                      "call_permission": {
                        "type": "boolean",
                        "nullable": true
                      },
                      "email_permission": {
                        "type": "boolean",
                        "nullable": true
                      },
                      "custom_user_properties": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        },
                        "nullable": true
                      }
                    }
                  }
                },
                "required": [
                  "page_id"
                ],
                "oneOf": [
                  {
                    "required": [
                      "user_id"
                    ]
                  },
                  {
                    "required": [
                      "data"
                    ],
                    "properties": {
                      "data": {
                        "type": "object",
                        "oneOf": [
                          {
                            "required": [
                              "phone_number"
                            ]
                          },
                          {
                            "required": [
                              "email"
                            ]
                          }
                        ]
                      }
                    }
                  }
                ]
              }
            }
          },
          "required": true,
          "description": "Data containing user action information"
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.solidarity.tech/v1",
      "variables": {
        "defaultHost": {
          "default": "api.solidarity.tech/v1"
        }
      }
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```