Skip to main content
POST
/
api
/
v2
/
public
/
application
/
event
curl -X POST "https://app.refold.ai/api/v2/public/application/event" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "candidate_created",
    "response": "{ \"event\": \"candidate_created\", \"payload\": { \"jobid\": \"123\", \"email\": \"jane@example.com\" } }"
  }'
[
  {
    "_id": "6a314123d0aeb8165be4f175",
    "name": "candidate_created",
    "response": [
      { "key": "event", "type": "text" },
      { "key": "payload", "type": "object" }
    ]
  }
]
Add a custom event (trigger) to your organization’s default custom application. Once defined, your application can fire the event for a linked account to start workflows. The response is the full, updated list of events.

Authentication

Events are defined at the org level, so this endpoint uses API-key auth.
x-api-key
string
required
Your Refold API key. Find it in Settings → Credentials.

Body Parameters

name
string
required
Event name. Used as the event value when firing a trigger.
response
string
required
A sample payload (as a string) describing the event’s data shape. Refold parses this into a field map.
json_schema
object
Optional JSON schema describing the payload.

Response

Returns the full updated array of events for the default app (see List Events for the object shape).
[
  {
    "_id": "6a314123d0aeb8165be4f175",
    "name": "candidate_created",
    "response": [
      { "key": "event", "type": "text" },
      { "key": "payload", "type": "object" }
    ]
  }
]
curl -X POST "https://app.refold.ai/api/v2/public/application/event" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "candidate_created",
    "response": "{ \"event\": \"candidate_created\", \"payload\": { \"jobid\": \"123\", \"email\": \"jane@example.com\" } }"
  }'