Types
Create type
Creates a new type in the specified space using a JSON payload. The creation process is subject to rate limiting. The payload must include type details such as the name, icon, and layout. The endpoint then returns the full type data, ready to be used for creating objects.
post/v1/spaces/{space_id}/types
Path parameters
space_idstring required
The ID of the space in which to create the type; must be retrieved from ListSpaces endpoint
Headers
Anytype-Versionstring required
The version of the API to use
Request body
Example request
{
"icon": {
"emoji": "📄"
},
"key": "some_user_defined_type_key",
"name": "Page",
"plural_name": "Pages",
"properties": [
{
"key": "last_modified_date",
"name": "Last modified date"
}
]
}Response
The created type
Example response
{
"type": {
"icon": {
"emoji": "📄"
},
"id": "bafyreigyb6l5szohs32ts26ku2j42yd65e6hqy2u3gtzgdwqv6hzftsetu",
"key": "page",
"name": "Page",
"object": "type",
"plural_name": "Pages",
"properties": [
{
"id": "bafyreids36kpw5ppuwm3ce2p4ezb3ab7cihhkq6yfbwzwpp4mln7rcgw7a",
"key": "last_modified_date",
"name": "Last modified date",
"object": "property"
}
]
}
}