Skip to main content
POST
/
api
/
v2
/
public
/
application
/
event
Create event
curl --request POST \
  --url https://api.gocobalt.io/api/v2/public/application/event \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "response": {}
}
'
[
    {
        "_id": "64c8d0f92f6f5ad7ce6b4a6a",
        "name": "Delete Contact",
        "response": [
            {
                "key": "contact_id",
                "type": "text"
            },
            {
                "key": "app_contact_id",
                "type": "text"
            }
        ],
        "raw_response": "{\"contact_id\":\"64e4742936ee94ac84be2d35\",\"app_contact_id\":\"\"}"
    },
    {
        "_id": "64c8d1172f6f5ad7ce6b7462",
        "name": "Add Lead",
        "response": [
            {
                "key": "company",
                "type": "text"
            },
            {
                "key": "email",
                "type": "text"
            },
            {
                "key": "name",
                "type": "text"
            }
        ],
        "raw_response": "{\"company\":\"\",\"email\":\"\",\"name\":\"\"}"
    }
]
This API creates a Refold event.

Request description

Body Parameters

name
string
required
Event Name
response
object
required
Event model. This model’s properties are accessed in the workflow as trigger variables.
Example payload
  {
    "event": "event name",
    "payload": {
      "jobid": "677677AE59",
      "firstname": "nanami",
      "lastname": "jjk",
      "email": "nana@jjk.com",
      "headline": "Professional sorcerer"
    }
  }

Response description

Returns an array of all events in the org after creation.
_id
string
Event Id
name
string
Name of the event
response
array
Array of response field objects derived from the event model
raw_response
string
Raw JSON string of the event payload
[
    {
        "_id": "64c8d0f92f6f5ad7ce6b4a6a",
        "name": "Delete Contact",
        "response": [
            {
                "key": "contact_id",
                "type": "text"
            },
            {
                "key": "app_contact_id",
                "type": "text"
            }
        ],
        "raw_response": "{\"contact_id\":\"64e4742936ee94ac84be2d35\",\"app_contact_id\":\"\"}"
    },
    {
        "_id": "64c8d1172f6f5ad7ce6b7462",
        "name": "Add Lead",
        "response": [
            {
                "key": "company",
                "type": "text"
            },
            {
                "key": "email",
                "type": "text"
            },
            {
                "key": "name",
                "type": "text"
            }
        ],
        "raw_response": "{\"company\":\"\",\"email\":\"\",\"name\":\"\"}"
    }
]