Declare one of the platform's own types, or its next version
post/data/types
Declare one of the platform's own types, or its next version: typed fields (the content model's), an optional unique field, which of business and customer every row carries, who besides the platform may read or write (a business's owner reads; a customer reads or writes their own), whose a business's rows are when its connection ends, and what forgetting a customer does to theirs. A change that would refuse rows already kept is refused with what breaks; the same declaration again changes nothing.
Before you call
- Credential
Authorization: Bearer $KEY- Scope
content:admin- Graphql
Mutation.contentDataTypeDeclare- Sdk
content.dataType.declare- Cli
content data type declare
Request bodyapplication/json, required
- keystringrequiredPattern: ^[a-z][a-z0-9_]{0,39}$.
- namestringrequiredAt most 120 characters.
- descriptionstringAt most 600 characters.
- fieldsobjectrequired
- titleFieldstringPattern: ^[a-z][A-Za-z0-9_]{0,39}$.
- uniquestringPattern: ^[a-z][A-Za-z0-9_]{0,39}$.
- scopestringOne of: project, business, customer, business_customer. Default: project.
- accessobjectDefault: {}.
- businessstringOne of: none, read. Default: none.
- customerstringOne of: none, read, write. Default: none.
- businessstring
- keepstringOne of: platform, business. Default: platform.
- erasestringOne of: remove, detach. Default: remove.
Responses
- 201application/jsonSuccess
- 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring