Your API key. Create one in Ocoya. Authorization: Bearer <key> works too.
Create a contact
Adds one contact as subscribed. Only add people who agreed to receive emails. An address already on the brand only gets its empty fields filled in and the groups added; its subscription is never changed (created: false, status 200).
Create a contact
curl --request POST \
--url https://www.app.ocoya.com/api/_public/v1/contacts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"email": "jane@example.com",
"firstName": "<string>",
"lastName": "<string>",
"properties": {},
"groups": [
"Customers"
],
"consentText": "<string>"
}
'{
"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>",
"created": true
}Authorizations
Body
application/json
Response
application/json
Already a contact, filled in
Was this page helpful?