Actions
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
List all actions
Path Parameters
- project_idstring
Query Parameters
- formatstringOne of:
"csv"
"json"
- limitinteger
- offsetinteger
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
RESPONSE
{"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","href": "string","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}]}
Create actions
Path Parameters
- project_idstring
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
RESPONSE
{"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","href": "string","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}
Retrieve actions
Path Parameters
- idinteger
- project_idstring
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
RESPONSE
{"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","href": "string","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}
Update actions
Path Parameters
- idinteger
- project_idstring
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
RESPONSE
{"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","href": "string","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}
Delete actions
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
Path Parameters
- idinteger
- project_idstring
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
No responseRetrieve actions count
Path Parameters
- idinteger
- project_idstring
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
RESPONSE
{"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","href": "string","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}
Retrieve actions people
Path Parameters
- project_idstring
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
RESPONSE
{"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","href": "string","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}