---
name: ateliq-workspace
description: Work inside a brand's own Ateliq workspace through its signed-in API (https://app.ateliq.co/api/v1) or MCP server (https://app.ateliq.co/api/mcp/workspace) - run the brand's AI agents (trend scout, designer, photographer, marketer and others), read runs, decide approvals, read and add Knowledge Hub documents, manage leads, triggers and webhooks - with OAuth 2.1 (PKCE) or an API key. Use when someone who uses Ateliq asks an assistant or a script to run their Ateliq agents, approve or reject waiting actions, or connect their Ateliq workspace.
license: MIT
metadata:
  homepage: https://ateliq.co/auth.md
  openapi: https://app.ateliq.co/api/v1/openapi.json
  version: 1.0.0
---

# A brand's Ateliq workspace

This is the signed-in side of Ateliq. It acts **for a person in a workspace**, with their permissions, and every run is governed as it is inside Ateliq: the same knowledge, tools, autonomy level and approvals. For public questions (products, prices, a demo) no sign-in is needed: use the `ateliq-mcp` or `ateliq-api` skill instead.

| | |
| --- | --- |
| API | `https://app.ateliq.co/api/v1` - OpenAPI: `https://app.ateliq.co/api/v1/openapi.json` |
| MCP server | `https://app.ateliq.co/api/mcp/workspace` |
| Sign-in guide | https://ateliq.co/auth.md |

## Sign in

- **An MCP client with a person present:** add `https://app.ateliq.co/api/mcp/workspace`. A call without a token answers `401` with `WWW-Authenticate: Bearer resource_metadata=...`; the client follows it, registers itself (RFC 7591), and sends the person to sign in, pick the workspace and approve the scopes (OAuth 2.1, PKCE S256).
- **A script or scheduled job:** a workspace admin creates an API key in Settings > API & MCP at https://app.ateliq.co (`nag_live_...`, or `nag_test_...` for testing). Send `Authorization: Bearer <key>`. Keep it in a secret store or environment variable, never in code or chat.

Ask only for the scopes the task needs:

| Scope | Allows |
| --- | --- |
| `agents:read`, `agents:run`, `runs:read` | List agents, run one, read the result |
| `approvals:read`, `approvals:decide` | See and decide actions waiting for a person |
| `knowledge:read`, `knowledge:write` | Read and add Knowledge Hub documents |
| `webhooks:manage` | Add and remove webhook endpoints |

## Run an agent

```bash
curl https://app.ateliq.co/api/v1/agents -H "Authorization: Bearer $ATELIQ_KEY"      # the agents this key reaches, with their keys

curl -X POST https://app.ateliq.co/api/v1/agents/<agent-key>/runs \
  -H "Authorization: Bearer $ATELIQ_KEY" -H "content-type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" -H "Prefer: respond-async" \
  -d '{"input":"Find the three strongest festive-wear trends for next month and brief the designer."}'
```

- Body: `input` (required, up to 20,000 characters), `sessionId` to continue a conversation, `metadata` (up to 16 string labels, returned on the run and its webhooks).
- Without `Prefer: respond-async` the call waits and answers `200` with the finished run. With it, it answers `202` at once: poll the `Location` (`GET /runs/{id}`), stream `GET /runs/{id}/events` (server-sent events), or wait for the `run.completed` webhook.
- A run's `status` is `running`, `completed`, `waiting_for_approval` or `failed`. Read `output`, the `actions` it took, and `waitingOn` (what needs a person).
- `Idempotency-Key`: a replay within 24 hours is refused with `409`, so a retry never runs an agent twice.

## Approvals

An action above the agent's autonomy level waits for a person. `GET /approvals` lists them; `POST /approvals/{id}/decide` with `{"decision":"approve"}` or `{"decision":"reject","note":"..."}` decides one. Only a personal key or a signed-in person can decide, and the check is exactly the one on screen. **Never approve on the person's behalf without showing them the action and getting a clear yes.**

## Other endpoints

`GET/POST /knowledge`, `GET /knowledge/{id}`; `GET/POST /leads`, `GET/PATCH /leads/{id}`; `GET /triggers`, `POST /triggers/{id}/fire`; `GET/POST /webhooks`, `DELETE /webhooks/{id}`; `GET /agents/{key}/agent.md` (an agent's spec as Markdown). Read the OpenAPI file for each body and answer.

## Errors

Errors are `application/problem+json`. `401`: token missing, expired or revoked - refresh it or sign in again. `403`: the scope is missing or the person may not do this - ask for the scope named in the answer. `429`: wait `Retry-After`. Revoke tokens at `https://app.ateliq.co/api/oauth/revoke`; an admin can remove an app or key in Settings > API & MCP.
