# Quickstart

> Create an API key, check it, and schedule your first post.

## 1. Create a key

In NOWScale, open **Settings**, choose your Workspace and open **API keys**. Select **Create key**, give it a name, pick what it can do (the **Publishing** preset covers this guide) and copy the key. It is shown once.

Keep the key on your server, in an environment variable:

```bash
export NOWSCALE_API_KEY="ns_live_..."
```

:::warning
Never put a key in a browser, a mobile app or a public repository. Anyone with the key can act as it.
:::

## 2. Check the key

`GET /v1/me` returns the key, who it acts as and your plan's limits.

```bash
curl https://api.nowscale.com/v1/me \
  -H "Authorization: Bearer $NOWSCALE_API_KEY"
```

```json
{
  "object": "api_key",
  "kind": "workspace",
  "scopes": ["accounts:read", "media:write", "posts:write", "posts:publish"],
  "acting_as": { "type": "workspace" },
  "workspace": { "id": "...", "name": "Studio", "type": "business" },
  "limits": { "requests_per_minute": 300, "active_keys": 25, "webhook_endpoints": 16, "sandboxes": 5 }
}
```

## 3. Find a Project and an account

Posts belong to a Project and publish to its connected accounts.

```bash
curl "https://api.nowscale.com/v1/projects" -H "Authorization: Bearer $NOWSCALE_API_KEY"
curl "https://api.nowscale.com/v1/accounts?project_id=PROJECT_ID" -H "Authorization: Bearer $NOWSCALE_API_KEY"
```

## 4. Schedule a post

Send an `Idempotency-Key` with every create, so a retry never makes a second post.

```bash
curl https://api.nowscale.com/v1/posts \
  -H "Authorization: Bearer $NOWSCALE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: launch-2026-12-01" \
  -d '{
    "project_id": "PROJECT_ID",
    "title": "We are live",
    "caption": "Our new collection is out today.",
    "media_ids": ["MEDIA_ID"],
    "scheduled_at": "2026-12-01T15:00:00Z",
    "targets": [{ "account_id": "ACCOUNT_ID" }]
  }'
```

The response is the post, with one target per account. Each target's `status` moves from `pending` to `published` (or `failed` with an `error_code`). Follow it with `GET /v1/posts/{post_id}` or, better, a [webhook](/webhooks).

## Next steps

- [Upload media](/media) to get a `MEDIA_ID` for videos and images.
- [Network settings](/posts#network-settings) for YouTube titles, TikTok privacy and more.
- [Webhooks](/webhooks) to hear about published and failed posts.
