---
title: "Create event"
full: true
_openapi:
  method: POST
  toc: []
  structuredData:
    headings: []
    contents:
      - content: "Creates an org-defined workflow event with optional property schema. Used only as automation triggers — not webhooks."
_apiData:
  document: "https://reloop.sh/api/workflow/openapi/json"
  operationData: [{"path":"/api/workflow/v1/events/","method":"post"}]
  parameterList: [{"name":"name","type":"string","required":true,"description":"Display name, e.g. User signed up","location":"body","minLength":1,"maxLength":255},{"name":"key","type":"string","required":false,"description":"What you pass when tracking. Made from the name if left out; \"trigger.\" is added in front if missing.","location":"body","minLength":1,"maxLength":128},{"name":"description","type":"string","required":false,"description":"","location":"body","maxLength":2000},{"name":"properties","type":"object[]","required":false,"description":"Properties the event can carry","location":"body","properties":[{"name":"name","type":"string","required":true,"description":"Property key in the track payload","location":"body","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},{"name":"propertyType","type":"\"string\" | \"number\" | \"boolean\"","required":false,"description":"","location":"body","enumValues":["string","number","boolean"]},{"name":"required","type":"boolean","required":false,"description":"Tracking without it fails. Defaults to false.","location":"body"},{"name":"defaultValue","type":"string | null","required":false,"description":"Used when tracking leaves the property out","location":"body"},{"name":"description","type":"string | null","required":false,"description":"","location":"body"}]}]
  responseMap: {"201":{"description":"Response for status 201","schema":{"id":"evt_123456789","organizationId":"org_123456789","name":"User signed up","key":"trigger.user.signed_up","description":"Fired when an account is created","properties":[{"id":"evtp_123456789","name":"plan","propertyType":"string","required":true,"defaultValue":null,"description":"The plan they picked","createdAt":"2026-03-23T10:00:00.000Z","updatedAt":"2026-03-23T10:00:00.000Z"}],"createdAt":"2026-03-23T10:00:00.000Z","updatedAt":"2026-03-23T10:00:00.000Z"}},"400":{"description":"Response for status 400","schema":{"message":"Invalid event key","why":"The key \"trigger.User Signed Up\" is not valid.","fix":"Use lowercase letters, numbers, dots, underscores, or hyphens (e.g. trigger.signed_up). Keys must start with trigger."}},"401":{"description":"Response for status 401","schema":{"message":"Authentication required"}},"409":{"description":"Response for status 409","schema":{"message":"Event key already exists","why":"An event with key \"trigger.user.signed_up\" already exists in this organization.","fix":"Use a different key or update the existing event."}},"500":{"description":"Response for status 500","schema":{"message":"Failed to update event","why":"An unexpected error occurred while updating the event.","fix":"Please try again later."}}}
  codeSamples:
    - id: node
      lang: javascript
      label: Node.js
      source: |-
        import { Reloop } from "reloop-email";
        
        const reloop = new Reloop({ apiKey: "rl_123456789" });
        
        const { event, eventError } = await reloop.events.create({
          name: "User signed up",
          key: "user.signed_up",
          properties: [{ name: "plan", propertyType: "string", required: true }],
        });
        if (eventError) throw eventError;
    - id: curl
      lang: bash
      label: cURL
      source: |-
        curl -X POST https://reloop.sh/api/workflow/v1/events \
          -H "x-api-key: rl_123456789" \
          -H "Content-Type: application/json" \
          -d '{"name":"User signed up","key":"user.signed_up","properties":[{"name":"plan","propertyType":"string","required":true}]}'
    - id: python
      lang: python
      label: Python
      source: |-
        import requests
        
        res = requests.post(
            "https://reloop.sh/api/workflow/v1/events",
            headers={"x-api-key": "rl_123456789"},
            json={
                "name": "User signed up",
                "key": "user.signed_up",
                "properties": [
                    {
                        "name": "plan",
                        "propertyType": "string",
                        "required": True
                    }
                ]
            },
        )
        res.raise_for_status()
        print(res.json())
---
> For the complete documentation index, see [llms-docs.txt](/llms-docs.txt) or the site index [llms.txt](/llms.txt). Full docs corpus: [llms-full-docs.txt](/llms-full-docs.txt). Prefer markdown URLs (append `.md`) for agent consumption. Product skill: [skill.md](/skill.md).


{/* This file was generated by the OpenAPI doc generator. Do not edit this file directly. Run `bun run generate:api-docs` to regenerate. */}

<APIPage />
