# Add contact

`opensend contacts create`

Adds one person to the workspace, and to the audiences you name. They are subscribed unless you say otherwise. An address that is already a contact is refused: add that contact to an audience instead.

Needs the scope: `audiences:write`

## Flags

- `--email` (string, required): The address of the contact. A workspace holds an address once. Up to 120 characters.
- `--first-name` (string): The first name, used for `{{first_name}}` in broadcasts. Up to 120 characters.
- `--last-name` (string): The last name, used for `{{last_name}}` in broadcasts. Up to 120 characters.
- `--status` (string): `subscribed` or `unsubscribed`. Without it the contact is subscribed. One of: `subscribed`, `unsubscribed`.
- `--properties` (Record<string, string | number | boolean>): Values of your own, by name, such as `{ "plan": "pro" }`: text, numbers and true or false. Up to 50. Default: `{}`.
- `--audience-ids` (string[]): The ids of the audiences to put the contact in. Without it, in none. Up to 50 items. Default: `[]`.
- `--topics` (Record<string, string>): What the contact chose for a topic, by the id of the topic: `opt_in` or `opt_out`. A topic left out follows its own default. Default: `{}`.

## Returns

The command prints the answer: as JSON when its output goes to a file or another program, and as a table or a list of fields in a terminal. When the API refuses, the error goes to the error stream and the command ends with a code that names the failure. [Output and scripts](https://opensend.sh/docs/scripting) lists the codes.

- `object` ("contact"): Always `contact`.
- `id` (string): The id of the contact.
- `email` (string): The address of the contact. A workspace holds an address once.
- `firstName` (string): The first name of the contact. Empty when it is not known.
- `lastName` (string): The last name of the contact. Empty when it is not known.
- `status` (string): `subscribed` while the contact gets broadcasts, `unsubscribed` after they leave. One of: `subscribed`, `unsubscribed`.
- `unsubscribedAt` (string | null): When the contact unsubscribed, or `null`.
- `properties` (Record<string, string | number | boolean>): Values of your own on the contact, by name. Automations can test them, and broadcasts and automations fill `{{name}}` slots with them.
- `audienceIds` (string[]): The ids of the audiences the contact is in.
- `topics` (Record<string, string>): What the contact chose for a topic, by the id of the topic: `opt_in` or `opt_out`. A topic that is not here follows its own default.
- `createdAt` (string): When the contact was added.

## Example

CLI:

```bash
opensend contacts create \
  --email grace@example.com \
  --first-name Grace \
  --audience-ids aud_01
```

Answer:

```json
{
  "object": "contact",
  "id": "con_6cc2709fe651d82aa13ff885",
  "email": "grace@example.com",
  "firstName": "Grace",
  "lastName": "",
  "status": "subscribed",
  "unsubscribedAt": null,
  "properties": {},
  "audienceIds": [
    "aud_01"
  ],
  "topics": {},
  "createdAt": "2026-11-27T09:30:00.000Z"
}
```
