# Create or update a person (Customer.io)

`PUT /v1/compat/customerio/api/v1/customers/{identifier}`

Requires an API key with the `contacts:write events:write` scope. [About keys and scopes](/docs/api/authentication)

Customer.io's Track API v1, so an app sending to Customer.io can send here too while it moves, by pointing its client at `…/v1/compat/customerio`. Authenticate as Customer.io clients do, with HTTP Basic: any site id as the user and an Kirora API key as the password (a Bearer key works too). The identifier is the contact's `externalId`, or its email when it holds an `@`. `first_name`, `last_name`, `email` and `phone` fill those fields, `unsubscribed: true` withdraws email consent, and every other key becomes an attribute. Consent is never granted here: import it with its evidence. Agent keys are refused.

Requires API-key scope: `contacts:write` and `events:write`.

## Path parameters

- `identifier` (string, required, 1–255 characters)

## Returns

Returns `200 OK`. Otherwise returns an error; [Errors](/docs/api/errors) lists every code and which to retry.

## Example

```bash
curl -X PUT https://api.kirora.io/v1/compat/customerio/api/v1/customers/identifier_example \
  -H "Authorization: Bearer $KIRORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Response `200`:

```json
{}
```
