GET
https://www.app.ocoya.com/api/_public/v1/contacts/{contactId}
Get contact
curl --request GET \
  --url https://www.app.ocoya.com/api/_public/v1/contacts/{contactId} \
  --header 'X-API-Key: <api-key>'
{
  "id": "cmwdke27h0045y0k4fi0tm5pj",
  "email": "jane@example.com",
  "firstName": "Jane",
  "lastName": "<string>",
  "properties": {},
  "status": "subscribed",
  "source": "api",
  "consentAt": "<string>",
  "consentText": "<string>",
  "unsubscribedAt": "<string>",
  "lastSentAt": "<string>",
  "lastOpenedAt": "<string>",
  "lastClickedAt": "<string>",
  "groups": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "sends": [
    {
      "id": "<string>",
      "status": "<string>",
      "outcome": "<string>",
      "email": {
        "id": "<string>",
        "name": "<string>",
        "subject": "<string>"
      }
    }
  ]
}

Authorizations

X-API-Keystringheaderrequired

Your API key. Create one in Ocoya. Authorization: Bearer <key> works too.

Path Parameters

contactIdstringrequired

Contact ID, from GET /contacts.

Example:"cmwdke27h0045y0k4fi0tm5pj"

Query Parameters

brandIdstringrequired

Ocoya brand ID. Get one from GET /brands.

Example:"cmayvq3hk00017apshay5qezu"

Response

application/json

Success

idstring
Example:"cmwdke27h0045y0k4fi0tm5pj"
emailstring
Example:"jane@example.com"
firstNamestring | null
Example:"Jane"
lastNamestring | null
propertiesobject | null

Extra fields.

statusenum<string>
Available options: subscribed, unsubscribed, bounced, complained
Example:"subscribed"
sourcestring

manual, import, form, bio, api or workflow.

Example:"api"

How they agreed: their consent record.

unsubscribedAtstring | null
lastSentAtstring | null
lastOpenedAtstring | null
lastClickedAtstring | null
groupsobject[]
Show child attributesHide child attributes
groups.idstring
groups.namestring
createdAtstring
updatedAtstring
sendsobject[]
Show child attributesHide child attributes
sends.idstring
sends.statusstring
sends.outcomestring
sends.emailobject
Show child attributesHide child attributes
sends.email.idstring
sends.email.namestring
sends.email.subjectstring