> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gomobile.ma/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use Gomobile customer-facing vocabulary.
> Do not infer support for internal, hidden, experimental, or unreleased features.

# Create your first contact

> Create and retrieve one test contact through the API.

Use a number you control for any later channel tests. The synthetic value below illustrates the request shape.

## Before you begin

[Configure your API host and key](https://docs.gomobile.ma/developers/api-basics.md) and use an organization where you can create test records.

**1. Create a contact**

Send the request below with your test contact’s number.

```bash theme={null}
curl -X POST "$GOMOBILE_API_BASE_URL/contact" \
  -H "X-API-Key: $GOMOBILE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"primaryPhone":"+212600000000","firstName":"Sara","lastName":"Test","city":"Casablanca"}'
```

**2. Keep the returned ID**

A successful creation returns HTTP `201`. Save `response.contact.id` as `CONTACT_ID`. Inspect `attributeErrors`: successful creation does not mean every custom attribute was stored.

**3. Retrieve the record**

```bash theme={null}
curl "$GOMOBILE_API_BASE_URL/contact/$CONTACT_ID" \
  -H "X-API-Key: $GOMOBILE_API_KEY"
```

## Expected result

The retrieved record contains your test data. Creating a contact does not send a message or place a call.

## Troubleshooting

For validation failures, send only documented fields. If the number already exists, inspect the existing contact rather than repeatedly creating it. See the [Contacts API](https://docs.gomobile.ma/developers/reference/contacts.md) for update and upsert operations.

Next: [create an audience](https://docs.gomobile.ma/quickstarts/create-audience.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.