POST
https://www.app.ocoya.com/api/_public/v1/contacts/import
Import contacts
curl --request POST \
  --url https://www.app.ocoya.com/api/_public/v1/contacts/import \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "contacts": [
    {
      "email": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "properties": {}
    }
  ],
  "groups": [
    "<string>"
  ],
  "consentConfirmed": true,
  "consentText": "<string>",
  "runWorkflows": true
}
'
{
  "created": 123,
  "updated": 123,
  "unchanged": 123,
  "invalid": 123
}

Authorizations

X-API-Keystringheaderrequired

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

Query Parameters

brandIdstringrequired

Ocoya brand ID. Get one from GET /brands.

Example:"cmayvq3hk00017apshay5qezu"

Body

application/json
contactsobject[]required
Maximum array length: 5000
Show child attributesHide child attributes
contacts.emailstringrequired
contacts.firstNamestring
contacts.lastNamestring
contacts.propertiesobject

Confirms everyone in the list agreed to receive emails.

groupsstring[]
runWorkflowsboolean

Response

application/json

Imported

createdinteger
updatedinteger
unchangedinteger
invalidinteger