VayaFlow
Contacts

Get contact details

Returns flat contact details including contact info, questionnaire, flags, and metadata. Does not include submissions or metrics.

GET
/api/v1/contacts/{contactId}

Authorization

ApiKeyAuth
X-API-Key<token>

API key generated from your Vayaflow dashboard Settings page

In: header

Path Parameters

contactId*string

The contact ID

Response Body

application/json

application/json

application/json

package mainimport (  "fmt"  "net/http"  "io/ioutil")func main() {  url := "https://api.vayaflow.com/api/v1/contacts/string"  req, _ := http.NewRequest("GET", url, nil)    res, _ := http.DefaultClient.Do(req)  defer res.Body.Close()  body, _ := ioutil.ReadAll(res.Body)  fmt.Println(res)  fmt.Println(string(body))}
{
  "success": true,
  "data": {
    "contactId": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "phone": "string",
    "primaryEmail": "string",
    "primaryPhone": "string",
    "channels": {
      "phones": [
        {
          "value": "string",
          "preferred": true,
          "label": "mobile",
          "verifiedAt": "2019-08-24T14:15:22Z",
          "source": "string"
        }
      ],
      "emails": [
        {
          "value": "string",
          "preferred": true,
          "label": "mobile",
          "verifiedAt": "2019-08-24T14:15:22Z",
          "source": "string"
        }
      ]
    },
    "enrollments": [
      {
        "enrollmentId": "string",
        "playbookId": "string",
        "playbookName": "string",
        "enrolledAt": "2019-08-24T14:15:22Z",
        "source": {
          "door": "source",
          "ref": "string"
        },
        "status": "active",
        "endedAt": "2019-08-24T14:15:22Z",
        "endedReason": "string",
        "cost": 0,
        "outcome": {
          "deliveredAt": "2019-08-24T14:15:22Z",
          "deliveryId": "string",
          "revenue": 0,
          "revenueSource": "milestone",
          "returnedAt": "2019-08-24T14:15:22Z"
        },
        "handOffAttempts": 0
      }
    ],
    "kind": "person",
    "organizationId": "string",
    "role": "string",
    "country": "string",
    "address": {
      "street": "string",
      "unit": "string",
      "city": "string",
      "state": "string",
      "zip": "string",
      "country": "US"
    },
    "dateOfBirth": "string",
    "timezone": "string",
    "notes": [
      {
        "id": "string",
        "text": "string",
        "createdAt": "string",
        "createdBy": "string"
      }
    ],
    "questionnaire": [
      {
        "key": "string",
        "question": "string",
        "answer": null
      }
    ],
    "attribution": {
      "params": {
        "property1": "string",
        "property2": "string"
      },
      "captureUrl": "http://example.com",
      "referrer": "http://example.com",
      "ipAddress": "string",
      "userAgent": "string",
      "gclid": "string",
      "gbraid": "string",
      "wbraid": "string",
      "fbclid": "string",
      "fbc": "string",
      "fbp": "string",
      "ttclid": "string",
      "ttp": "string",
      "msclkid": "string",
      "tblci": "string",
      "adPlatform": "string",
      "capturePlatform": "string"
    },
    "compliance": {
      "tcpaConsent": true,
      "tcpaConsentTimestamp": "string",
      "tcpaConsentMethod": "checkbox",
      "tcpaLanguage": "string",
      "trustedFormCertId": "string",
      "trustedFormCertUrl": "http://example.com",
      "jornayaLeadId": "string",
      "privacyPolicyUrl": "http://example.com",
      "termsUrl": "http://example.com"
    },
    "flags": {
      "isTest": true
    },
    "customFields": {
      "property1": null,
      "property2": null
    },
    "detail": "string",
    "tags": [
      "string"
    ],
    "revenue": 0,
    "cost": 0,
    "lastActivityAt": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "archivedAt": "string"
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  }
}
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found"
  }
}