Get started with the CSS API

Here's how to use the CSS API:


Create a service account in the Google API console similar to the instructions for Content API and download a JSON file with the credentials.

If you want to access the service document (only needed for direct REST access or for the Google API Client libraries), you also need to generate and use an API key. You can do that in the Google API console. You can find more information in the general documentation about API Keys.

The email address of that service account needs to be added with Admin access permissions to your CSS group or domain account. The propagation of these permissions can take half an hour, so retry a bit later if you get permission denied errors.

Enable the CSS API

In order to use the CSS API, you need to enable it in your google cloud project. You can find the library at

Start programming

The CSS API has code samples, and client libraries to help you get started. We also have a best practices page.

Send requests

Send requests to URLs in the following format:{version}/{resource name}:{method}

Where {resource name} is the name of the resource your call impacts.

For example, here's how to delete a resource with gRPC:{resource name}:delete

Here's how to delete a resource with REST:

DELETE{resource name}

See the CSS API reference documentation for more details on specific services.

Use gRPC or REST

The CSS API supports gRPC and REST. Here are the two ways to make CSS API calls:

gRPC (recommended) REST
  1. Create the body of the request as a protocol buffer.
  2. Send the request body to the server with HTTP/2.
  3. Deserialize the response to a protocol buffer.
  4. Interpret the results.
  1. Create the body of request as a JSON object.
  2. Send it to the server using HTTP 1.1.
  3. Deserialize the response as a JSON object.
  4. Interpret the results.

Get help

Contact your Google representative for support, or use the feedback form to report any issues.

Here's how you can provide more feedback if you experience issues:

Give feedback

To provide feedback, submit one of the following:

  • API features: Submit the feedback form
  • Documentation: Use the in-page thumb ratings and Send feedback button.
  • Samples and libraries: Use the New issue button on Github.

To provide general feedback after implementing each task, use the feedback form.