# API quickstart

Create credentials and make your first read-only Micro API request.

This quickstart queries up to ten contacts without changing workspace data.

## 1. Create an API key

Open [Micro Settings → Developers](https://app.micro.so/settings/api-access). Under **API Keys**, choose **New API Key**. Copy the key when it is shown and store it as a secret.

The same Developers page shows **Workspace ID**. It is the `teamId` in API paths and is not secret.

```bash
export MICRO_API_KEY="replace-with-your-api-key"
export MICRO_TEAM_ID="replace-with-your-workspace-id"
```

## 2. Query contacts

```bash
curl --request POST \
  "https://developers.micro.so/v2/prism/${MICRO_TEAM_ID}/contact/query" \
  --header "content-type: application/json" \
  --header "x-api-key: ${MICRO_API_KEY}" \
  --data '{"query":{"select":["full_name","email"],"limit":10}}'
```

```json
{
  "data": [{
    "id": "11111111-1111-4111-8111-111111111111",
    "properties": {"full_name": "Sarah Chen", "email": "sarah@example.com"},
    "is_user_object": false
  }],
  "has_more": false,
  "next_cursor": null
}
```

The sample above is illustrative. Expect HTTP `200`; a new or empty workspace can validly return `"data": []`. For returned records, `id` is at the top level and selected workspace fields are under `properties`.

## 3. Choose an integration path

- Continue with HTTP in [Query records](/docs/guides/querying).
- Get typed methods with an [official SDK](/docs/guides/sdks).
- Use structured terminal output with the [CLI](/docs/guides/cli).
- Set up a safe [agent workflow](/docs/guides/agents).

If the request fails, see [Errors and retries](/docs/guides/errors).
