Custom API Action

Make a custom, authenticated HTTP call to the Mixpanel API.

Options

These are supported HTTP request methods, or HTTP verbs, in a custom API call (see HTTP request methods).

Field Definition Type Required
Request Type

GET: Retrieves data from a web server based on your parameters. This method requests a representation of the specified resource. If a request is successful, you receive a 200 (OK) response message with the requested content.

POST: Sends data to a web server based on your parameters (for example, uploading a file). Multiple POST requests may result in a different outcome than a single POST, so you should be cautious about unintentionally sending multiple POST requests. If a request is successful, you receive a 200 (OK) response message.

PUT: Sends data to be stored at a specific location on a web server based on your parameters (for example, uploading a file). The difference between PUT and POST requests is that PUT is idempotent. This means that for successful requests, the result of a single PUT request is the same as many identical PUT requests. If a request is successful, you receive a 200 (OK), 201 (Created), or 204 (No Content) response message.

PATCH: Applies partial modifications to a resource on a web server based on your parameters. PATCH is not idempotent, which means that multiple PATCH requests could have unintended consequences. If a PATCH is successful, you receive a 200 (OK) or 204 (No Content) response message.

DELETE: Deletes the specified resource from the web server based on your parameters (if the resource exists). If a DELETE is successful, you receive a 200 (OK) response message.

Dropdown

TRUE

Select API

Specify the Mixpanel API for the HTTP request.

Options are:

  • Ingestion API

  • Query API

  • Lexicon Schemas API

To authenticate the Custom API Action card for the Mixpanel connector, several credentials are required:

  • Project: Token

  • Project: API Secret

  • Service Account (Username and Secret)

For more information, see Authorization.

Input

Field Definition Type Required
Relative URL

The URL address of the web server that you're attempting to call. Specify the relative URL as /{insert_remaining_URL}. You can specify query parameters in the relative URL using "?", or specify the query parameters as an object key pair in the Query input.

Example: https://mixpanel.com/api/2.0/jql the relative URL is: /2.0/jql.

Example for Ingestion API (Standard): https://api.mixpanel.com/engage#profile-set the relative URL is: /engage#profile-set.

Example for Ingestion API (EU): https://api.mixpanel.com/engage#profile-set the relative URL is: /engage#profile-set.

Example for Query API (Standard): https://api.mixpanel.com/engage#profile-set the relative URL is: /engage#profile-set.

Example for Query API (EU): https://api.mixpanel.com/engage#profile-set the relative URL is: /engage#profile-set.

Example for Lexicon Schemas API (Standard): https://mixpanel.com/api/app/projects/{Project ID}/schemas the relative URL is: /{Project ID}/schemas.

Example for Lexicon Schemas API (EU): https://mixpanel.com/api/app/projects/{Project ID}/schemas the relative URL is: /{Project ID}/schemas.

Example for Raw Data Export API (Standard): https://data.mixpanel.com/api/2.0/export{{ / input.Request.Relative URL }}

Example for Raw Data Export API (EU): https://data-eu.mixpanel.com/api/2.0/export{{ / input.Request.Relative URL }}

Example for Data Pipelines API (Standard): https://data.mixpanel.com/api/2.0/nessie{{ / input.Request.Relative URL }}

Example for Data Pipelines API (EU): https://data-eu.mixpanel.com/api/2.0/nessie{{ / input.Request.Relative URL }}

Example for Connectors API (Standard): https://data.mixpanel.com/api/2.0/export{{ / input.Request.Relative URL }}

Example for Connectors API (EU): https://data-eu.mixpanel.com/api/2.0/export{{ / input.Request.Relative URL }}

Text

TRUE

Query Specify any additional query parameters that should be included in object format (key value pairs).

Object

FALSE

Headers Specify any headers required in addition to authorization or content-type (these are already handled by this connector).

Object

FALSE

Body Specify a request body in JSON format. Only available for POST, PUT, and PATCH requests.

Object

FALSE

Output

Field Definition Type

Response

Status Code

Result of the operation. The connector returns an HTTP status code that indicates whether the action taken by the card succeeded or failed. For example:

  • A 201 Created status code indicates success where a new resource was created.
  • A 403 Forbidden error indicates that the HTTP request wasn't processed because the necessary permissions were missing.

For a full list of possible status codes, see HTTP status codes.

Number

Headers

Detailed context for the status code, unrelated to the output body. Response headers depend on your selected HTTP request option. Not all headers are response headers. This is similar to {"Content-type":"application/json"}.

Object

Body

Data returned from your selected HTTP request.

For example, the data from a GET request.

Object

Related topics

Mixpanel connector

Workflow elements

Mixpanel API Reference