POST
/
api
/
teams
/
{teamId}
/
campaigns
/
goal
curl --request POST \
  --url https://firstquadrant.ai/api/teams/{teamId}/campaigns/goal \
  --header 'Bearer API key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "goal": "SCHEDULE_MEETING",
  "email": "[email protected]",
  "contactId": "con_qxwVhUwAj3ijxWXstmCNvIII",
  "campaignContactId": "cpc_qxwVhUwAj3ijxWXstmCNvIII",
  "data": {
    "path": [
      "id"
    ],
    "equals": "value"
  }
}'
[
  {
    "id": "cpc_qxwVhUwAj3ijxWXstmCNvIII",
    "createdAt": "2024-05-12T00:00:00.000Z",
    "updatedAt": "2024-05-12T00:00:00.000Z",
    "status": "OPEN",
    "data": {},
    "campaignId": "cpg_qxwVhUwAj3ijxWXstmCNvIII",
    "contactId": "con_qxwVhUwAj3ijxWXstmCNvIII",
    "campaign": {
      "id": "con_qxwVhUwAj3ijxWXstmCNvIII",
      "createdAt": "2024-05-12T00:00:00.000Z",
      "updatedAt": "2024-05-12T00:00:00.000Z",
      "status": "RUNNING",
      "name": "My Campaign",
      "goal": "SCHEDULE_MEETING",
      "goalUrl": "https://firstquadrant.ai/schedule-meeting",
      "offeringName": "FirstQuadrant",
      "offeringDescription": "The best way to send emails."
    }
  }
]

This endpoint is used to mark a campaign contact as “won” using the API.

You are required to provide a way to find the contact, for example by email, ID, or nested custom data. At least property is required to identify the contact.

You can also choose to provide the goal, for example “meeting scheduled”, and we will find the contact in the most recent campaign with that goal and mark them as “won”. If you don’t provide a goal, we will select the contact in the most recent campaign.

Authorizations

Bearer API key
string
header
required

The API key used to authenticate requests, learn how to generate an API key on the Authentication page.

Path Parameters

teamId
string
required

Team ID, starting with tea_

Body

application/json

Response

200 - application/json
Campaign contact

The response is of type object[].