Skip to main content
A workspace is the container for your API keys, usage, workflows, and team. Every account starts with one, and everything you do through the API runs inside it. This guide walks you through creating a workspace, bringing your team in, and giving each person the right level of access.

Before you start

1

Get an API key

Every request needs a bearer key. Grab one from the dashboard or read Authentication.
2

Set your base URL

All calls in this guide go to https://developer.encrata.com with an Authorization: Bearer enc_... header.
Workspace endpoints accept either a dashboard session or an enc_ API key, so the same calls work from your app, the CLI, and an agent.

Set up your workspace

1

Create a workspace

Send a name. The slug is optional and is generated from the name when you omit it.
A 201 returns the new workspace. The creator is added as an active admin automatically.
2

Invite your team

Invite by email and set the role they land with. The role defaults to readonly when you omit it. The invitee gets an email with a link to accept.
A 201 returns the pending membership.
Only an admin can invite. Inviting an address that already has a pending invite re-sends it, rate-limited to once per minute.
3

Accept the invite

The invited person signs in with the invited email, then posts the token from their invitation link.
The signed-in account must match the invited email. An invite for bob@acme.com can only be accepted by the account that owns that address.

Choose a role for each member

Every member holds one role: admin, tech, or readonly. You set it when you invite someone, and an admin can change it later. Give each person the lowest role that covers their work.
  • admin runs the workspace. Admins manage settings and members, and can delete the workspace. The workspace creator starts here.
  • tech builds with the API. Tech members run lookups, manage API keys, build workflows and webhooks, handle files, and buy credits. They cannot manage workspace settings or members.
  • readonly observes. Read-only members run lookups and view workflows, files, and webhooks. They cannot create, change, or delete anything.

What each role can do

An account that doesn’t belong to any workspace yet has admin access.
There is no separate owner role. The person who creates a workspace is added as an admin and cannot be removed or leave while they are the last admin.

Manage members

Returns every member of your current workspace. Pass ?workspace_id= to read a specific workspace you belong to.
Pass the member id (from the list response), not the user id. Admin only.
You cannot demote the last remaining admin. Promote someone else first.
Pass the member id as the id query parameter. Admin only. To remove yourself, use Leave a workspace instead.
Leaving requires an OTP code for security. Check whether you can leave with a GET, then confirm with a POST and the code.
You cannot leave if you are the only member or the last admin.

Manage workspaces

Returns every workspace you belong to.
Use PUT, not POST. This sets which workspace subsequent calls run against.
Updates your current workspace when workspace_id is omitted. Admin only.
Deletes your current workspace and all of its data. Admin only.
This permanently deletes the workspace, its members, API keys, and workflows. It cannot be undone.

Next steps