Actions
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
List all actions
Path Parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query Parameters
- formatstringOne of:
"csv"
"json"
- limitinteger
Number of results to return per page.
- offsetinteger
The initial index from which to return the results.
Response
Request
GET
/api /projects /:project_id /actions
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/actions/
Response
Status 200
{"count": 123,"next": "http://api.example.org/accounts/?offset=400&limit=100","previous": "http://api.example.org/accounts/?offset=200&limit=100","results": [{"id": 0,"name": "string","description": "string","tags": [null],"post_to_slack": true,"slack_message_format": "string","steps": [{"id": "string","event": "string","tag_name": "string","text": "string","text_matching": "contains","href": "string","href_matching": "contains","selector": "string","url": "string","name": "string","url_matching": "contains","properties": {"property1": null,"property2": null}}],"created_at": "2019-08-24T14:15:22Z","created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","email": "user@example.com","is_email_verified": true},"deleted": true,"is_calculating": true,"last_calculated_at": "2019-08-24T14:15:22Z","team_id": 0,"is_action": true,"bytecode_error": "string"}]}
Create actions
Path Parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query Parameters
- formatstringOne of:
"csv"
"json"
Request Parameters
- namestring
- descriptionstring
- tagsarray
- post_to_slackboolean
- slack_message_formatstring
- stepsarray
- deletedboolean
- last_calculated_atstring
Response
Request
POST
/api /projects /:project_id /actions
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/actions/\-d name="string"
Response
Status 201
{"id": 0,"name": "string","description": "string","tags": [null],"post_to_slack": true,"slack_message_format": "string","steps": [{"id": "string","event": "string","tag_name": "string","text": "string","text_matching": "contains","href": "string","href_matching": "contains","selector": "string","url": "string","name": "string","url_matching": "contains","properties": {"property1": null,"property2": null}}],"created_at": "2019-08-24T14:15:22Z","created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","email": "user@example.com","is_email_verified": true},"deleted": true,"is_calculating": true,"last_calculated_at": "2019-08-24T14:15:22Z","team_id": 0,"is_action": true,"bytecode_error": "string"}
Retrieve actions
Path Parameters
- idinteger
A unique integer value identifying this action.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query Parameters
- formatstringOne of:
"csv"
"json"
Response
Request
GET
/api /projects /:project_id /actions /:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/actions/:id/
Response
Status 200
{"id": 0,"name": "string","description": "string","tags": [null],"post_to_slack": true,"slack_message_format": "string","steps": [{"id": "string","event": "string","tag_name": "string","text": "string","text_matching": "contains","href": "string","href_matching": "contains","selector": "string","url": "string","name": "string","url_matching": "contains","properties": {"property1": null,"property2": null}}],"created_at": "2019-08-24T14:15:22Z","created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","email": "user@example.com","is_email_verified": true},"deleted": true,"is_calculating": true,"last_calculated_at": "2019-08-24T14:15:22Z","team_id": 0,"is_action": true,"bytecode_error": "string"}
Update actions
Path Parameters
- idinteger
A unique integer value identifying this action.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query Parameters
- formatstringOne of:
"csv"
"json"
Request Parameters
- namestring
- descriptionstring
- tagsarray
- post_to_slackboolean
- slack_message_formatstring
- stepsarray
- deletedboolean
- last_calculated_atstring
Response
Request
PATCH
/api /projects /:project_id /actions /:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl -X PATCH \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/actions/:id/\-d name="string"
Response
Status 200
{"id": 0,"name": "string","description": "string","tags": [null],"post_to_slack": true,"slack_message_format": "string","steps": [{"id": "string","event": "string","tag_name": "string","text": "string","text_matching": "contains","href": "string","href_matching": "contains","selector": "string","url": "string","name": "string","url_matching": "contains","properties": {"property1": null,"property2": null}}],"created_at": "2019-08-24T14:15:22Z","created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","email": "user@example.com","is_email_verified": true},"deleted": true,"is_calculating": true,"last_calculated_at": "2019-08-24T14:15:22Z","team_id": 0,"is_action": true,"bytecode_error": "string"}
Delete actions
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
Path Parameters
- idinteger
A unique integer value identifying this action.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query Parameters
- formatstringOne of:
"csv"
"json"
Request
DELETE
/api /projects /:project_id /actions /:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl -X DELETE \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/actions/:id/
Response
Status 405 No response body
Retrieve actions count
Path Parameters
- idinteger
A unique integer value identifying this action.
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query Parameters
- formatstringOne of:
"csv"
"json"
Response
Request
GET
/api /projects /:project_id /actions /:id /count
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/actions/:id/count/
Response
Status 200
{"id": 0,"name": "string","description": "string","tags": [null],"post_to_slack": true,"slack_message_format": "string","steps": [{"id": "string","event": "string","tag_name": "string","text": "string","text_matching": "contains","href": "string","href_matching": "contains","selector": "string","url": "string","name": "string","url_matching": "contains","properties": {"property1": null,"property2": null}}],"created_at": "2019-08-24T14:15:22Z","created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","email": "user@example.com","is_email_verified": true},"deleted": true,"is_calculating": true,"last_calculated_at": "2019-08-24T14:15:22Z","team_id": 0,"is_action": true,"bytecode_error": "string"}
Retrieve actions people
Path Parameters
- project_idstring
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Query Parameters
- formatstringOne of:
"csv"
"json"
Response
Request
GET
/api /projects /:project_id /actions /people
export POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \https://app.posthog.com/api/projects/:project_id/actions/people/
Response
Status 200
{"id": 0,"name": "string","description": "string","tags": [null],"post_to_slack": true,"slack_message_format": "string","steps": [{"id": "string","event": "string","tag_name": "string","text": "string","text_matching": "contains","href": "string","href_matching": "contains","selector": "string","url": "string","name": "string","url_matching": "contains","properties": {"property1": null,"property2": null}}],"created_at": "2019-08-24T14:15:22Z","created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","email": "user@example.com","is_email_verified": true},"deleted": true,"is_calculating": true,"last_calculated_at": "2019-08-24T14:15:22Z","team_id": 0,"is_action": true,"bytecode_error": "string"}