Skip to main content
GET
/
api
/
campaigns
/
goals
/
{goalId}
Get goal by ID
curl --request GET \
  --url https://apiv1.delightloop.ai/api/campaigns/goals/{goalId} \
  --header 'x-api-key: <x-api-key>'
{
  "id": "goal_001",
  "name": "Onboard New Users",
  "isActive": true,
  "motions": [
    {
      "id": "motion_001",
      "name": "Send Welcome Email",
      "motionMetaData": [
        {
          "key": "welcome_campaign_template",
          "label": "Email Template",
          "dataType": "string",
          "placeholder": "Enter your campaign template name",
          "required": false
        }
      ],
      "logo": "https://cdn.delightloop.ai/assets/company-logo-123.png",
      "logoColor": "#FF5733",
      "description": "Automatically sends a welcome email to new subscribers"
    }
  ],
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z",
  "logo": "https://cdn.delightloop.ai/assets/goal-logo-456.png",
  "logoColor": "#3498DB",
  "description": "Complete onboarding process for new users"
}

Headers

x-api-key
string
required

auth key

Path Parameters

goalId
string
required

Goal identifier

Example:

"goal_001"

Response

Goal retrieved successfully

id
string
required

Unique identifier for the goal

Example:

"goal_001"

name
string
required

Name of the goal

Example:

"Onboard New Users"

isActive
boolean
required

Whether the goal is active

Example:

true

motions
object[]
required

Array of motions associated with this goal

createdAt
string<date-time>
required

Date when the goal was created

Example:

"2024-01-15T10:30:00.000Z"

updatedAt
string<date-time>
required

Date when the goal was last updated

Example:

"2024-01-15T10:30:00.000Z"

Logo URL for the goal

Example:

"https://cdn.delightloop.ai/assets/goal-logo-456.png"

logoColor
string

Logo color for the goal

Example:

"#3498DB"

description
string

Description of the goal

Example:

"Complete onboarding process for new users"