--- title: Push API tutorials slug: '161' canonical_url: https://docs.coveo.com/en/161/ collection: index-content source_format: adoc --- # Push API tutorials This section contains introductory, intermediate, and advanced Push API tutorials. These tutorials assume that the reader knows how to make HTTP requests, and is familiar with REST interfaces and microservices in general. ## Tutorial setup The tutorial setup consists of three mandatory requirements and one optional recommendation: * [A dedicated Coveo organization](#the-dedicated-coveo-organization). * [A public content Push source](#the-public-content-push-source). * [An API key](#the-api-key). * [(Recommended) The **Coveo Push API Tutorials** Postman collection](#recommended-the-coveo-push-api-tutorials-postman-collection). ### The dedicated Coveo organization You need a dedicated [Coveo organization](https://docs.coveo.com/en/185/) in which you have administrator privileges. This [Coveo organization](https://docs.coveo.com/en/185/) will contain the Push source and will be used to perform all Push API HTTP requests in the tutorials. You can [create a free trial organization](https://www.coveo.com/en/free-trial/) for this purpose. [Note your organization ID](https://docs.coveo.com/en/n1ce5273/) as you'll need it for the Push API requests. It appears in the URL when you're in your organization. ![Getting the organization ID from the URL | Coveo](https://docs.coveo.com/en/assets/images/manage-an-organization/url.png) > **Note** > > Your [trial organization](https://docs.coveo.com/en/2959#trial-organization) will be hosted in the US East [deployment region](https://docs.coveo.com/en/2976/). > You may create a free [test organization](https://docs.coveo.com/en/2959#test-organization) within your trial organization, should you prefer testing the Push API on another deployment region supported by Coveo. ### The public content Push source When you index content using the Coveo Push API, the created [items](https://docs.coveo.com/en/210/) are associated with a Push source. For the first tutorial, you'll need a public content Push source. . In the [Coveo Administration Console](https://docs.coveo.com/en/183/), access the [**Sources**](https://platform.cloud.coveo.com/admin/#/orgid/content/sources/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/sources/)) page. . Click **Add source**. . In the **Add a source of content** panel, select **Push**. . Name your source. . Click **Add source**. . In the **Make content accessible to everyone?** dialog, check **I understand** and click **Continue**. This will make your source content public. In tutorial 2, you'll edit the source to secure its content. . [Note your source ID](https://docs.coveo.com/en/3390#copy-a-source-name-or-id) as you'll need it for the Push API requests. ![Getting the source ID | Coveo](https://docs.coveo.com/en/assets/images/index-content/copy-source-id.gif) ### The API key The API key will grant you the [privileges](https://docs.coveo.com/en/228/) required to perform all Push API HTTP requests in the tutorial. The content of your Push source is public for the first tutorial, but you'll need to secure it in the second tutorial. Consequently, we'll create an API key that grants you the required privileges for all three tutorials right away, instead of using one of the [dedicated Push source API key creation methods](https://docs.coveo.com/en/1546#api-key). . In the [Coveo Administration Console](https://docs.coveo.com/en/183/), access the [**API Keys**](https://platform.cloud.coveo.com/admin/#/orgid/organization/api-access/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/organization/api-access/)) page. . Click **Add key**. . In the **Add an API key** panel, select the **Push API** template, and then click **Next**. . Name your key, and then click **Next**. . On the **Configuration** tab, limit the scope of the API key: .. For **Target sources**, select `Specific sources`, and then select the Push source you created earlier. .. For **Target security identity providers**, keep the default `All security identity providers` value. > **Note** > > With the above settings, the privileges of the API key are the same as those automatically granted when [you create an API key for a specific Push source](https://docs.coveo.com/en/1546#api-key) using the **Same users and groups as in your current permission system** content security setting. .. If you want to restrict the use of the API key to specific IP addresses or ranges, add them under **Allowed IPs**. . Click **Next**. . Click **Add API key**. . In the **API key successfully created** dialog, click icon:clipboard-text[alt=clipboard-text,width=16] to copy the key to your clipboard, and then click **Done**. . Store your API key securely. You'll need it for the Push API requests. ### (Recommended) The Coveo Push API Tutorials Postman collection The **Coveo Push API Tutorials** [Postman](https://www.postman.com/) collection JSON file contains all Push API HTTP requests used in the tutorials. The requests are ordered sequentially and grouped into folders that correspond to the three tutorials. The request payloads are set, and collection variables are used to store values that are repeatedly used in requests. The collection also contains pre-request and post-response scripts to help prevent common errors and speed up request execution. . Download the Coveo Push API Tutorials Postman collection . In your Postman workspace, [import](https://learning.postman.com/docs/getting-started/importing-and-exporting/importing-data/) the **Coveo Push API Tutorials** collection JSON file. . In your Postman workspace, [set the appropriate value](https://learning.postman.com/docs/sending-requests/variables/variables/#viewing-and-editing-variables-in-an-element) for the **baseUrl** collection variable, depending on your Coveo organization region. ** For the US region, set it to `+https://api.cloud.coveo.com+`. ** For the EU region, set it to `+https://api-eu.cloud.coveo.com+`. ** For the CA region, set it to `+https://api-ca.cloud.coveo.com+`. ** For the AU region, set it to `+https://api-au.cloud.coveo.com+`. . Set the values for the **organizationId**, **sourceId**, and **apiKey** collection variables that you noted earlier. > **Tip** > > To protect your API key, we recommend creating and using an environment variable named **apiKey** in Postman and setting its type to **Secret**. > > Postman automatically [uses environment variables over collection variables](https://learning.postman.com/docs/sending-requests/variables/variables/#variable-scopes) when they have the same name. > This way, your sensitive Coveo API key stays safe. The value of the **securityIdentityProviderId** variable is set in the collection JSON file. This is intentional, as you'll see later on. The tutorials will inform you, in note boxes with the ![Postman icon](index-content/postman.svg) Postman logo, whenever you need to set variable values or when you need to be aware of collection automations working in the background. ## What's next? You're ready to start the tutorials. You should do the three tutorials sequentially, as the outcome of one tutorial may be used as a prerequisite for the next one. Proceed to [Push API tutorial 1: Manage public content](https://docs.coveo.com/en/92/).