# Objects

The following endpoints allow you to add, edit and delete Objects in your Bucket.

Quick Tip

Your read and write keys will be required to perform the following requests. These can be found in Your Bucket > Basic Settings in your Bucket Dashboard .

# Add Object

Add a new Object to your Bucket.

Parameter Required Type Description
type_slug required String Add Object to Object Type
title required String Your Object title
slug String Unique identifier for your Object
content String Add Content to your Object
status Enum draft, published, defaults to published
options.slug_field Bool Set to false to hide the slug field
options.content_editor Bool Set to false to hide the content editor
metafields Array Add Metafields to your Object. See Metafields Model.
locale String Add localization to the Object
write_key String Your Bucket write key
publish_at Number UNIX millisecond timestamp. Publish automatically at a later time.

    # Get Objects

    Get Objects in your Bucket.

    Quick Tip

    For a quick reference to this endpoint click the "Developer Tools" button on your Object table in your Bucket Dashboard .

    Parameter Required Type Description
    type String The Object Type slug
    limit Number The number of Objects to return
    skip Number The number of Objects to skip
    status Enum published, draft, all
    hide_metafields Enum true, Hides metafields
    sort Enum created_at, -created_at, modified_at, -modified_at, random
    locale String Filter by locale
    q String Searches title and content properties for this string
    metadata[key] String Search by Metafield value. Object IDs for Object Metafields (comma separated for multiple)
    metafield_key String (Deprecated, use metadata[key] instead) Metafield key to search for
    metafield_value String (Deprecated, use metadata[key] instead) Metafield contains value
    metafield_object_id String (Deprecated, use metadata[key] instead) Object Metafield Object ID (stored as Metafield value)
    filters[_id] String Filter by Object IDs (comma separated for multiple)
    filters[connected_to] String Returns Objects that reference the specified Object ID (String)
    props Enum Declare which properties to return in comma-separated string. Down to first-level metadata properties only. Reference full Object for all available properties. Example: ?props=slug,title,metadata.categories,metadata.author
    depth Number 0-3, Limits the depth of nested Objects from Object Metafields
    created_by String Created by User ID
    pretty Enum true, Makes the response more reader-friendly
    read_key String Your Bucket read key

      # Search and Filter

      Get Objects based on search variables.

      Quick TipS

      Read the Changelog announcement to learn more.

      See the Get Objects Params to learn how to use params q, metadata[key], and created_by for flexible searching and filterting.

        # Get Object

        Returns a single Object from your Bucket.

        Quick Tip

        For a quick reference to this endpoint click the "Developer Tools" button on your Edit Object view in your Bucket Dashboard .

        Parameter Required Type Description
        slug required String Unique identifier for your Object
        status Enum all, Return published and draft status Objects
        revision String The revision_id of the Object Revision
        hide_metafields Enum true, Hides metafields
        locale String Filter by locale
        props Enum Declare which properties to return in comma-separated string. Down to first-level metadata properties only. Reference full Object for all available properties. Example: ?props=slug,title,metadata.categories,metadata.author
        depth Number 0-3, Limits the depth of nested Objects from Object Metafields
        pretty Enum true, Makes the response more reader-friendly
        read_key String Your Bucket read key

          # Object Revisions

          Every Object has Revisions saved. Object Revisions cannot be edited or deleted.

          # Get Object Revisions

          Get Object Revisions from an Object.

          Parameter Required Type Description
          slug required String Unique identifier for your Object
          limit Number The number of Revisions to return
          skip Number The number of Revisions to skip
          sort Enum created_at, -created_at (default is -created_at)
          hide_metafields Enum true, Hides metafields
          locale String Filter by locale
          props Enum Declare which properties to return in comma-separated string. Down to first-level metadata properties only. Reference full Object for all available properties. Example: ?props=slug,title,metadata.categories,metadata.author
          depth Number 0-3, Limits the depth of nested Objects from Object Metafields
          pretty Enum true, Makes the response more reader-friendly
          read_key String Your Bucket read key

            # Add Object Revision

            Adds Revision to an Object set to draft status. To edit a published Object use the Edit Object method. Same properties as Add Object params.

              # Edit Object

              Edit an existing Object in your Bucket.

              Parameter Required Type Description
              slug required String Unique identifier for your Object
              type_slug String Object Type
              title String Your Bucket title
              content String Add Content to your Object
              status Enum draft, published, defaults to published
              options.slug_field Bool Set to false to hide the slug field
              options.content_editor Bool Set to false to hide the content editor
              metafields Array Add Metafields to your Object. See Metafields Model.
              locale String Edit Object locale
              write_key String Your Bucket write key
              publish_at Number UNIX millisecond timestamp. Publish automatically at a later time.

                # Delete Object

                Delete an existing Object in your Bucket.

                Parameter Required Type Description
                slug required String Unique identifier for your Object
                write_key String Your Bucket write key