Create a container custom field
Containers
Create container custom field
Create or update a custom field value on a container in the Terminal49 API. Attach internal metadata like reference codes, priority, or cost centers.
POST
Create a container custom field
Creates or updates a custom field on a container. If a custom field with the specified
The container is implied by the path, so do not send
api_slug already exists, it will be updated.
Path parameters
| Parameter | Required | Description |
|---|---|---|
container_id | Yes | The ID of the container |
Request body
| Parameter | Required | Description |
|---|---|---|
data.type | Yes | Must be custom_field |
data.attributes.api_slug | Yes | The slug of the custom field definition |
data.attributes.value | Yes | The value to set (type depends on the definition’s data type) |
data.relationships.entity on this endpoint.
Authorization
Requiresupdate permission on the container.
Response
Returns201 Created with the custom field resource on success.
Behavior
- Uses
find_or_initialize_byinternally, so it creates if missing or updates if it exists - Values are validated against the definition’s data type
- For enum fields, values are validated against the definition’s options
Example request
Example response
Authorizations
Use a Terminal49 API key in the Authorization header with the Token prefix.
Authorization: Token YOUR_API_KEY
Path Parameters
Container ID
Body
application/json