Schema-per-tenant APIs
There is no static API reference for Twenty. Each workspace has its own schema — when you add a custom object (sayInvoice), it immediately gets REST and GraphQL endpoints identical to built-in objects like Company or Person. The API is generated from the schema, so endpoints use your object and field names directly — no opaque IDs.
Your workspace-specific API reference lives in the API playground (see below). It reflects your custom objects and fields and lets you execute real calls against your data.
API access is included on every plan, Cloud and self-hosted.
Two APIs
Core API —/rest/ and /graphql/
CRUD on records: People, Companies, Opportunities, your custom objects. Query, filter, traverse relations.
Metadata API — /rest/metadata/ and /metadata/
Schema management: create/modify/delete objects, fields, and relations. This is how you programmatically change your data model — for example, to create a large number of custom fields during a migration instead of adding them by hand. See Create fields with the Metadata API.
Both are available as REST and GraphQL. Same underlying data either way; GraphQL lets you traverse relations and pick nested fields in a single query.
Base URLs
Before you start: who can see the Developers settings
Settings → Developers is only visible to members whose role has the Developers permission (“Manage API keys, webhooks, and apps”). Admins have it by default; the default Member role does not. If you don’t see Developers in your settings sidebar, it’s a permission issue, not a plan issue. Ask a workspace admin to either:- create the API key for you, or
- give you a role with the Developers permission under Settings → Members → Roles (see Permissions).
Authentication
Create an API key
- Go to Settings → Developers. The API tab is open by default.
- Under API Keys, click Create API key.
- Fill in:
- Name — a descriptive name, e.g. “Salesforce migration”.
- Role — the role whose permissions the key will use. Required. Only roles marked as assignable to API keys are listed.
- Expiration Date — when the key stops working.
- Save, then copy the key immediately — it’s shown only once.
Pick the right role for the key
An API key can do exactly what its role allows — nothing more. In particular:- Reading and writing records (Core API) requires object permissions on the objects you touch.
- Creating or editing objects and fields (Metadata API) requires the Data model settings permission. A key whose role lacks it gets a permission error on
/rest/metadata/and/metadata/write calls.
Manage API keys
Open Settings → Developers → API and click a key to:- Change its role or rename it.
- Regenerate it — the old key stops working immediately and the new one is shown once.
- Delete it.
API playground
- Go to Settings → Developers → API.
- Under Documentation, pick a Schema (Core for records, Metadata for objects and fields) and an API (REST or GraphQL).
- Click Launch.
Create fields with the Metadata API
Example: add a text field to thecompany object over REST.
1. Find the object’s ID.
nameSingular is company and note its id.
2. Create the field.
"type": "SELECT" (or MULTI_SELECT) and an options array:
createOneField(input: { field: { ... } }) mutation on /metadata.
Rules that trip up scripted migrations:
namemust start with a lowercase letter and contain only letters and digits (camelCase, e.g.annualRevenue2024). It must be unique on the object and not a reserved word.- Select option
values must beUPPER_SNAKE_CASE. - Fields are created one per request. Creating 150 fields is 150 calls — well within the rate limit if you send them sequentially.
- Common
typevalues:TEXT,NUMBER,BOOLEAN,DATE,DATE_TIME,SELECT,MULTI_SELECT,CURRENCY,LINKS,EMAILS,PHONES,ADDRESS,RATING,RICH_TEXT,RELATION.
Batch operations
Batch create and upsert accept up to 200 records per request. Update and delete many apply to all records matching the filter.
Selecting fields (REST)
REST record endpoints accept afields query parameter to return only the fields you need:
idis always returned.- Composite fields (like
emailsorname) are selected as a whole by their field name. - A many-to-one relation field returns its join column (e.g.
companyId) withdepth=0. One-to-many relation fields are only returned withdepth=1. Withdepth=1, only the relation fields listed infieldsare expanded. - Unknown fields, or fields your role cannot read, return a
400error.
fields is omitted on an object with more than 200 readable fields, each record returns a default set of 200 fields: id, the label and image identifier fields, createdAt, updatedAt, deletedAt, position, then standard fields before custom fields, ordered by name. Pass fields explicitly to read any field beyond that default set.
Pagination
List endpoints return 60 records per page by default. Passlimit to change it, up to a maximum of 200. To fetch the next page over REST, pass the endCursor from the response’s pageInfo as starting_after (or startCursor as ending_before to go back). GraphQL uses the standard first/after connection arguments.
Rate limits
When you exceed the rate limit, the API returns
429 Too Many Requests. Back off and retry.
Self-hosted instances can change the request limits with the API_RATE_LIMITING_* environment variables.