Developers · Notifications and Email
Creating an API Call Notification
Last updated 1 November 2026
This document shows you how to create an API Call Notification that pings an API endpoint when a new user signs up.
Prerequisites
To follow the steps in this tutorial, you must understand how notifications work and have created a sign-up form as demonstrated in a previous tutorial.
Steps
Creating an API Call Notification and attatching it to a form is a three-step process:
- Step 1: Create an API call notification
- Step 2: Invoke notification directly via GraphQL api_call_send
- Step 3: Connect the notification to the sign-up form
Step 1: Create an API call notification
app/api_calls/ping_example_com_on_user_sign_up.liquid
---
to: "https://example.com/endpoint/{{ form.id }}"
format: http
callback: >
{% log response, type: "response object" %}
{% assign response_hash = response.body | parse_json %}
{% log response_hash, type: "response body as hash" %}
request_type: POST
request_headers: '{
"Content-Type": "application/json"
}'
---
{
"first_name": "{{ form.first_name }}",
"id": "{{ form.id }}"
}This defines a POST request to the endpoint with the newly created user's ID. In this example, the request's body is JSON, and to notify the endpoint about it, you set the
Step 2: Invoke notification directly via GraphQL 'api_call_send'
The API Call notification name is a file path relative to the
For app/api_calls/ping_example_com_on_user_sign_up.liquid - the bolded part is the name (physical_file_path).
To test your newly created API Call Notification, trigger it using the following query:
mutation send_api_call ($data: HashObject) {
api_call_send(
data: $data
template: { name: "ping_example_com_on_user_sign_up" }
) {
response {
status
body
}
}
}All parameters provided via GraphQL as a
Save the mutation above as
{% assign data = { "first_name": "Michael", "id": "0386676" } %}
{% graphql notify = "send_api_call", data: data %}Step 3: Connect the notification to the sign-up form
Connect the API Call Notification you created with the sign-up form
api_call_notifications:
- ping_example_com_on_user_sign_upWhenever a user successfully signs up, the
Next steps
Congratulations! You have created an API Call Notification. Now you can learn about parsing an API response: Parsing an API Response